| 1 |
lange |
173 |
<!DOCTYPE debiandoc PUBLIC "-//DebianDoc//DTD DebianDoc//EN" [ |
| 2 |
|
|
<!-- include version information so we don't have to hard code it |
| 3 |
|
|
within the document --> |
| 4 |
|
|
<!entity % versiondata SYSTEM "version.ent"> %versiondata; |
| 5 |
|
|
<!-- common, language independant entities --> |
| 6 |
|
|
<!entity % commondata SYSTEM "common.ent" > %commondata; |
| 7 |
|
|
<!-- CVS revision of this document --> |
| 8 |
|
|
<!entity cvs-rev "$Id$"> |
| 9 |
|
|
|
| 10 |
|
|
]> |
| 11 |
|
|
|
| 12 |
|
|
<debiandoc> |
| 13 |
|
|
<book> |
| 14 |
|
|
<title>FAI (Fully automatic installation) Guide |
| 15 |
|
|
<author>Thomas Lange <email>lange@informatik.uni-koeln.de</email> |
| 16 |
|
|
<version>ver. &version;, &date; |
| 17 |
|
|
|
| 18 |
|
|
<abstract> |
| 19 |
|
|
This manual describes the fully automatic installation package for |
| 20 |
|
|
&dgl;. This includes the installation of the package, the planing and |
| 21 |
|
|
creating of the configuration and how to circumvent errors. |
| 22 |
|
|
|
| 23 |
|
|
|
| 24 |
|
|
<copyright> |
| 25 |
|
|
<copyrightsummary> |
| 26 |
|
|
copyright © 2000 Thomas Lange |
| 27 |
|
|
</copyrightsummary> |
| 28 |
|
|
<p> |
| 29 |
|
|
This manual is free software; you may redistribute it and/or modify it |
| 30 |
|
|
under the terms of the GNU General Public License as published by the |
| 31 |
|
|
Free Software Foundation; either version 2, or (at your option) any |
| 32 |
|
|
later version. |
| 33 |
|
|
<p> |
| 34 |
|
|
This is distributed in the hope that it will be useful, but |
| 35 |
|
|
<em>without any warranty</em>; without even the implied warranty of |
| 36 |
|
|
merchantability or fitness for a particular purpose. See the GNU |
| 37 |
|
|
General Public License for more details. |
| 38 |
|
|
<p> |
| 39 |
|
|
A copy of the GNU General Public License is available as &file-GPL; in |
| 40 |
|
|
the &dgl distribution or on the World Wide Web at <url id="&url-gpl;" |
| 41 |
|
|
name="the GNU website">. You can also obtain it by |
| 42 |
|
|
writing to the &fsf-addr;. |
| 43 |
|
|
|
| 44 |
|
|
<toc detail="sect2"> |
| 45 |
|
|
|
| 46 |
|
|
<chapt id="motivation">Motivation<p> |
| 47 |
|
|
There was lot of motivation for creating FAI ! |
| 48 |
|
|
|
| 49 |
|
|
<chapt id="overview">Overview and concepts of FAI<p> |
| 50 |
|
|
<em>Plan your installation, and FAI installs your plans.</em> |
| 51 |
|
|
<p> |
| 52 |
|
|
FAI is a non interactive system to install a &dgl operating system on |
| 53 |
|
|
a single computer or a whole cluster. You can take one or more virgin |
| 54 |
|
|
PC's, turn on the power and after a few minutes Linux is installed, |
| 55 |
|
|
configured and running on the whole cluster, without any interaction |
| 56 |
|
|
necessary. Thus it's a scalable method for installing and updating a |
| 57 |
|
|
cluster unattended with little effort involved. FAI uses the &dgl; |
| 58 |
|
|
distribution and a collection of shell- and Perl-scripts for the |
| 59 |
|
|
installation process. Changes to the configuration files of the |
| 60 |
|
|
operating system are made by cfengine, shell and perl scripts. |
| 61 |
|
|
|
| 62 |
|
|
<p> |
| 63 |
|
|
FAI's target group are system administrators how have to install |
| 64 |
|
|
Debian onto one or even hundreds of computers. First, some terms used |
| 65 |
|
|
in this manual are described. |
| 66 |
|
|
|
| 67 |
|
|
<taglist> |
| 68 |
|
|
<tag> install server : <item> host where the package FAI is installed. </item> |
| 69 |
|
|
<tag>install client : <item> host which will be installed using |
| 70 |
|
|
FAI and a configuration from the install server. Also called |
| 71 |
|
|
client for short.</p> </item> |
| 72 |
|
|
<tag> nfsroot : <item> filesystem located on the install |
| 73 |
|
|
server. It's the complete filesystem for the install |
| 74 |
|
|
client, which will be mounted by the client during booting.</item> |
| 75 |
|
|
|
| 76 |
|
|
<tag> configuration : <item> details of how the installation |
| 77 |
|
|
should be performed. This includes information about: |
| 78 |
|
|
<list> |
| 79 |
|
|
<item> <p>Disk layout</p> </item> |
| 80 |
|
|
<item> <p>Local filesystems</p> </item> |
| 81 |
|
|
<item> <p>Software packages</p> </item> |
| 82 |
|
|
<item> <p>Keyboard layout, timezone, NIS |
| 83 |
|
|
configuration, user accounts...</p> </item> |
| 84 |
|
|
</list> |
| 85 |
|
|
</taglist> |
| 86 |
|
|
|
| 87 |
|
|
<sect id="work">How does FAI work ?<p> |
| 88 |
|
|
|
| 89 |
|
|
The computer which will be installed using FAI (called client) is |
| 90 |
|
|
booted from floppy disk or via network card. It gets an IP-address and |
| 91 |
|
|
boots a linux kernel which mounts all filesystems via NFS from a |
| 92 |
|
|
server. After the operating system is running the FAI startup script |
| 93 |
|
|
performs the automatic installation which doesn't need any |
| 94 |
|
|
interaction. First, the harddisks will be partitioned, filesystems are |
| 95 |
|
|
created and then software packages will be installed. Then the new |
| 96 |
|
|
installed operating system is configured to your local needs. Finaly |
| 97 |
|
|
the system will be booted from the local disk. |
| 98 |
|
|
<p> |
| 99 |
|
|
The details of how to install the computer (the configuration) are stored in the |
| 100 |
|
|
configuration space on the server. Configuration files can be shared |
| 101 |
|
|
among multiple computers if the are equal, so you need not to create a |
| 102 |
|
|
configuration for every new host. Hence FAI is a scalable method to |
| 103 |
|
|
install a big cluster with a great number of nodes. |
| 104 |
|
|
|
| 105 |
|
|
<p> |
| 106 |
|
|
FAI can also be used as an network rescue system. You can boot your |
| 107 |
|
|
computer and it won't perform an installation. Instead it will run a |
| 108 |
|
|
fully functional Linux without using the local hardisks. You can then |
| 109 |
|
|
do remote login and perform backups, restore data, check filesystem |
| 110 |
|
|
, inspect the hardware or do any other task. |
| 111 |
|
|
|
| 112 |
|
|
<sect id="features">Features of FAI<p> |
| 113 |
|
|
<list> |
| 114 |
|
|
<item> <p>a fully automatic installation can be perfomed</p> </item> |
| 115 |
|
|
<item> <p>boot from floppy or from network card </p> </item> |
| 116 |
|
|
<item> <p>BOOTP and DHCP protocol supported</p> </item> |
| 117 |
|
|
<item> <p>remote login via ssh during installation process</p> </item> |
| 118 |
|
|
<item> <p>two additional virtual terminals available |
| 119 |
|
|
during installation</p> </item> |
| 120 |
|
|
<item> <p>all similar configuration can be shared among |
| 121 |
|
|
all clients</p> </item> |
| 122 |
|
|
<item> <p>configuration for multiple node of a cluster can |
| 123 |
|
|
be shared</p> </item> |
| 124 |
|
|
<item> <p>kernel modules can be loaded</p> </item> |
| 125 |
|
|
<item> <p>log files are copied to the isntallation server</p> </item> |
| 126 |
|
|
<item> <p>shell, perl, expect script supported for configuration</p> </item> |
| 127 |
|
|
</list> |
| 128 |
|
|
<chapt id="inst">Installing FAI |
| 129 |
|
|
<sect id="requirements">Requirements<p> |
| 130 |
|
|
|
| 131 |
|
|
Following items are required for an installation via FAI. |
| 132 |
|
|
|
| 133 |
|
|
<taglist> |
| 134 |
|
|
<tag>BOOTP or DHCP server <item> The clients need one of |
| 135 |
|
|
these daemons to obtain information. </item> |
| 136 |
|
|
<tag>TFTP server <item> The TFTP daemon is used for |
| 137 |
|
|
transfering the kernel to the clients (only used when |
| 138 |
|
|
booting from network card).</item> |
| 139 |
|
|
<tag>Debian mirror <item> Fast access to a Debian |
| 140 |
|
|
mirror is needed. A local mirror of all Debian |
| 141 |
|
|
packages is recommended if you install multiple computers.</item> |
| 142 |
|
|
<tag>install kernel image <item> A kernel image that supports the |
| 143 |
|
|
network card and mounts its root filesystem via NFS. </item> |
| 144 |
|
|
<tag>Configuration data<item> A mountable directory which contains the configuration data. </item> |
| 145 |
|
|
</taglist> |
| 146 |
|
|
<p> |
| 147 |
|
|
|
| 148 |
|
|
The TFTP daemon and a nfs server will be enabled automaticlly. Also |
| 149 |
|
|
the kernel images for BOOTP and DHCP are available with the package. All |
| 150 |
|
|
clients must have a network card, which is recognized by the kernel. |
| 151 |
|
|
<p> |
| 152 |
|
|
|
| 153 |
|
|
The FAI package is available as a Debian package from &faidownload; |
| 154 |
|
|
until it will become an official Debian package (comming soon |
| 155 |
|
|
;-)). |
| 156 |
|
|
|
| 157 |
|
|
|
| 158 |
|
|
<sect id=aptsetup> Setting up apt-get |
| 159 |
|
|
<p> |
| 160 |
|
|
Before installing FAI, you'll have to set up <prgn>apt-get</prgn>. FAI |
| 161 |
|
|
uses <prgn>apt-get</prgn> to create the nfsroot filesystem and when it |
| 162 |
|
|
installs additional packages to the nfsroot. |
| 163 |
|
|
|
| 164 |
|
|
Use the tool <prgn>apt-setup</prgn> or directly edit the file |
| 165 |
|
|
<file>/etc/apt/sources.list</file>. There you have to define how you |
| 166 |
|
|
want to acces all the Debian packages. |
| 167 |
|
|
|
| 168 |
|
|
<example> |
| 169 |
|
|
# example for sources.list |
| 170 |
|
|
deb ftp://ftp.debian.org/debian stable main contrib non-free |
| 171 |
|
|
deb ftp://ftp.debian.org/debian dists/proposed-updates/ |
| 172 |
|
|
deb ftp://non-us.debian.org/debian-non-US stable/non-US main contrib non-free |
| 173 |
|
|
#deb file:/mnt/ftp.debian.org/debian stable main contrib non-free |
| 174 |
|
|
#deb file:/mnt/ftp.debian.org/debian dists/proposed-updates/ |
| 175 |
|
|
#deb file:/mnt/non-us.debian.org/debian-non-US stable/non-US main contrib non-free |
| 176 |
|
|
</example> |
| 177 |
|
|
|
| 178 |
|
|
The last three lines are examples for a mounted directory, which |
| 179 |
|
|
contains a local mirror of Debian. You can use <prgn>apt-setup</prgn> |
| 180 |
|
|
to define other sources of your Debian mirror. For more information on |
| 181 |
|
|
the file format see <manref name="sources.list" section="5">. |
| 182 |
|
|
|
| 183 |
|
|
When the configuration for <prgn>apt-get</prgn> is finished up, you can |
| 184 |
|
|
check it for errors. Without any error, it should look like this: |
| 185 |
|
|
|
| 186 |
|
|
<example> |
| 187 |
|
|
# apt-get update |
| 188 |
|
|
Reading Package Lists... Done |
| 189 |
|
|
Building Dependency Tree... Done |
| 190 |
|
|
# apt-get check |
| 191 |
|
|
Reading Package Lists... Done |
| 192 |
|
|
Building Dependency Tree... Done |
| 193 |
|
|
</example> |
| 194 |
|
|
|
| 195 |
|
|
|
| 196 |
|
|
<sect id="">Installing the FAI package <p> |
| 197 |
|
|
About 90Mb of free disk space is needed. |
| 198 |
|
|
<p> |
| 199 |
|
|
|
| 200 |
|
|
During the installation of the FAI package the script |
| 201 |
|
|
<prgn>make-fai-nfsroot</prgn> is called to create the nfsroot for |
| 202 |
|
|
FAI. It requires a <em>base</em> file (&basetgz), which is a minimal |
| 203 |
|
|
collection of all required packages for Debian. You need this big |
| 204 |
|
|
(&basetgzsize) file for creating the nfsroot during the installation |
| 205 |
|
|
of the FAI package. If you don't have a copy in <file>/tmp</file> it |
| 206 |
|
|
will be automaticlly fetched from a location defined in |
| 207 |
|
|
<file>/etc/fai.conf</file> and stored into <file>/tmp </file>. This |
| 208 |
|
|
could take much time, a ftp server is used and you do not have a fast |
| 209 |
|
|
connection to it. You can find the current version in the directory |
| 210 |
|
|
<tt>debian/dists/stable/main/disks-i386/current/</tt> of your Debian |
| 211 |
|
|
mirror. After it's available in <file>/tmp</file>, install FAI using |
| 212 |
|
|
<prgn>dpkg -i</prgn>. |
| 213 |
|
|
|
| 214 |
|
|
<example> |
| 215 |
|
|
kueppers[~lange]# dpkg -i fai_1.3.0test3_i386.deb |
| 216 |
|
|
Selecting previously deselected package fai. |
| 217 |
|
|
(Reading database ... 39333 files and directories currently installed.) |
| 218 |
|
|
Unpacking fai (from fai_1.3.0test3_i386.deb) ... |
| 219 |
|
|
Setting up fai (1.3.0test3) ... |
| 220 |
|
|
Creating FAI nfsroot can take a long time |
| 221 |
|
|
You have no FAI configuration. Copy FAI template files with: |
| 222 |
|
|
cp -pR /usr/share/doc/fai/templates/* /usr/local/share/fai |
| 223 |
|
|
Then change the configuration files to meet your local needs. |
| 224 |
|
|
</example> |
| 225 |
|
|
<p> |
| 226 |
|
|
|
| 227 |
|
|
The installation process adds lines to <file>/etc/exports</file> to export |
| 228 |
|
|
some directories to all hosts that belong to the netgroup |
| 229 |
|
|
<em>faiclients</em>. Netgroups can be defined in |
| 230 |
|
|
<file>/etc/netgroup</file> or in the correspondening NIS map. An |
| 231 |
|
|
example for the netgroup file can be found |
| 232 |
|
|
<file>/usr/share/doc/fai/examples/etc/netgroup</file>. For more |
| 233 |
|
|
information read the manual pages <manref name="netgroup" section="5"> |
| 234 |
|
|
and the NIS HOWTO. After changing the netgroups the nfs server has to |
| 235 |
|
|
reload its configuration. |
| 236 |
|
|
|
| 237 |
|
|
<example> |
| 238 |
|
|
/etc/init.d/nfs-*server reload |
| 239 |
|
|
</example> |
| 240 |
|
|
|
| 241 |
|
|
<p> |
| 242 |
|
|
|
| 243 |
|
|
After that, FAI is installed successfully on your server, but has no |
| 244 |
|
|
configuration for the install clients. Start with the templates from |
| 245 |
|
|
<tt> /usr/share/doc/fai/templates</tt> using the copy command above. |
| 246 |
|
|
|
| 247 |
|
|
|
| 248 |
|
|
<chapt id="booting">Booting hosts <p> |
| 249 |
|
|
Now it's time to boot your install clients for the first time. You can |
| 250 |
|
|
use the boot floppy or configure them to boot via network card, which |
| 251 |
|
|
is much smarter. They will fail to boot, because there will be no |
| 252 |
|
|
BOOTPD or DHCP daemon yet, who could give them the required network |
| 253 |
|
|
parameters. But you can use this boot attempt to easily collect all |
| 254 |
|
|
ethernet addresse of the network cards. |
| 255 |
|
|
|
| 256 |
|
|
<sect id="bootfloppy">Creating the boot floppy |
| 257 |
|
|
<p> |
| 258 |
|
|
If your network card can't boot itself, you have to boot via |
| 259 |
|
|
floppy. Use the command |
| 260 |
|
|
<prgn>make-fai-bootfloppy</prgn> to creates a suitable bootfloppy |
| 261 |
|
|
for all install clients. There's no host specific information on this |
| 262 |
|
|
floppy, so a copy of this floppy is suitable for all your install clients. |
| 263 |
|
|
|
| 264 |
|
|
<sect id="bootnetwork">Set up booting via network card |
| 265 |
|
|
<p> |
| 266 |
|
|
If your network interface card can boot itself using the BOOTP |
| 267 |
|
|
protocol, you should use it. See section XXX how to enable this on |
| 268 |
|
|
some types of 3Com cards. |
| 269 |
|
|
|
| 270 |
|
|
<list> |
| 271 |
|
|
<item> |
| 272 |
|
|
<p>mknbi-linux</p> |
| 273 |
|
|
</item> |
| 274 |
|
|
|
| 275 |
|
|
<item> |
| 276 |
|
|
<p>imggen</p> |
| 277 |
|
|
</item> |
| 278 |
|
|
</list> |
| 279 |
|
|
<p> |
| 280 |
|
|
|
| 281 |
|
|
<sect id="mac">Collecting MAC addresses |
| 282 |
|
|
<p> |
| 283 |
|
|
You have to collect all ethernet (MAC) addresse of the install clients |
| 284 |
|
|
and assign a hostname and IP-address to each client. So first we |
| 285 |
|
|
collect all MAC addresses. Now boot all your install clients. While the |
| 286 |
|
|
install client is booting, it sends broadcast packets to the LAN. You |
| 287 |
|
|
can log the MAC addresses of these hosts, if following |
| 288 |
|
|
command is run simultaneously on the server: |
| 289 |
|
|
|
| 290 |
|
|
<example># tcpdump -qte broadcast and port bootpc >/tmp/mac.lis</example> |
| 291 |
|
|
|
| 292 |
|
|
After the hosts has been send some broadcast packets (they will fail |
| 293 |
|
|
to boot because <prgn>bootpd</prgn> isn't running or does not recognise the MAC |
| 294 |
|
|
address yet) you abort <prgn>tcpdump</prgn> by typing <tt>ctrl-c</tt>. You get a list |
| 295 |
|
|
of all unique MAC addresses with these commands: |
| 296 |
|
|
|
| 297 |
|
|
<example># perl -ane 'print "0x\U$F[0]\n"' /tmp/mac.lis|sort|uniq|sed -e 's/://g' |
| 298 |
|
|
</example> |
| 299 |
|
|
|
| 300 |
|
|
After that, you only have to assign these MAC addresses to hostnames and |
| 301 |
|
|
IP-addresses (<file>/etc/ethers</file> and <file>/etc/hosts</file> or |
| 302 |
|
|
corresponding NIS maps). With these information you can configure your |
| 303 |
|
|
<prgn>BOOTP</prgn> or <prgn>DHCP</prgn> daemon (see the section <ref id="bootptab">). |
| 304 |
|
|
|
| 305 |
|
|
I recommend to write the MAC addresses (last three bytes will suffice |
| 306 |
|
|
if you have network card from the same vendor) and the hostname in the |
| 307 |
|
|
front of each chassis. |
| 308 |
|
|
|
| 309 |
|
|
<sect id=bootptab>Configuration of BOOTP daemon |
| 310 |
|
|
<p> |
| 311 |
|
|
|
| 312 |
|
|
An example configuration for the BOOTP daemon is included in FAI. If |
| 313 |
|
|
you have no <file>/etc/bootptab</file> file you can use |
| 314 |
|
|
<file>/usr/share/doc/fai/examples/etc/bootptab</file> as template. |
| 315 |
|
|
|
| 316 |
|
|
<example> |
| 317 |
|
|
# /etc/bootptab example for fai |
| 318 |
|
|
# replace FAISERVER with the name of your server |
| 319 |
|
|
|
| 320 |
|
|
# don't change these values |
| 321 |
|
|
.faiglobal:\ |
| 322 |
|
|
:ms=1024:\ |
| 323 |
|
|
:hd=/boot/fai:\ |
| 324 |
|
|
:hn:bs=auto:\ |
| 325 |
|
|
:rp=/usr/lib/fai/nfsroot: |
| 326 |
|
|
|
| 327 |
|
|
# your local values |
| 328 |
|
|
# |
| 329 |
|
|
# sa: your tftp server |
| 330 |
|
|
# ts: your timeserver (time enabled in inetd.conf) |
| 331 |
|
|
# T170 location of fai directory |
| 332 |
|
|
# T171 FAI_ACTION |
| 333 |
|
|
# T172 FAI_FLAGS, e.g. verbose, debug, reboot, sshd |
| 334 |
|
|
# T173 reserved for future use |
| 335 |
|
|
# T174 reserved for backup devices and backup options; NOT YET USED |
| 336 |
|
|
# sm: subnet mask |
| 337 |
|
|
# gw: router/gateway address |
| 338 |
|
|
# dn: domainname |
| 339 |
|
|
# ds: list of nameservers |
| 340 |
|
|
|
| 341 |
|
|
# these are optional |
| 342 |
|
|
# ys: NIS server |
| 343 |
|
|
# yd: NIS domainname |
| 344 |
|
|
# nt: list of NTP servers |
| 345 |
|
|
|
| 346 |
|
|
.failocal:\ |
| 347 |
|
|
:tc=.faiglobal:\ |
| 348 |
|
|
:sa=FAISERVER:\ |
| 349 |
|
|
:ts=FAISERVER:\ |
| 350 |
|
|
:T170="FAISERVER:/usr/local/share/fai":\ |
| 351 |
|
|
:T171="sysinfo":\ |
| 352 |
|
|
:sm=255.255.255.0:\ |
| 353 |
|
|
:gw=134.95.9.254:\ |
| 354 |
|
|
:dn=informatik.uni-koeln.de:\ |
| 355 |
|
|
:ds=134.95.9.136,134.95.100.209,134.95.100.208,134.95.140.208:\ |
| 356 |
|
|
:ys=rubens:yd=informatik4711.YP:\ |
| 357 |
|
|
:nt=time.rrz.uni-koeln.de,time2.rrz.uni-koeln.de: |
| 358 |
|
|
|
| 359 |
|
|
# now one entry for each install client |
| 360 |
|
|
#faiserver:ha=0x00105A200000:bf=faiserver:tc=.failocal:T171="sysinfo":T172="sshd verbose debug ": |
| 361 |
|
|
#faiclient01:ha=0x00105A000000:bf=faiclient01:tc=.failocal:T172="sshd": |
| 362 |
|
|
</example> |
| 363 |
|
|
|
| 364 |
|
|
Insert one line for each install client at the end of this file as |
| 365 |
|
|
done for <em>faiserver</em> and <em>faiclient01</em>. Replace the |
| 366 |
|
|
string <tt>FAISERVER</tt> with the name of your server (where you |
| 367 |
|
|
installed the package FAI). Then adjust the other network tags (sm, |
| 368 |
|
|
gw, dn, ds) to your local needs. The tags for NIS and time servers |
| 369 |
|
|
(yp, yd, nt) are optional. Tags with prefix <tt>T</tt> (starting from |
| 370 |
|
|
T170) are generic tags which are used to transfer some FAI specific |
| 371 |
|
|
data to the clients. <strong> It is important, that T171 is set to |
| 372 |
|
|
sysinfo !</strong> Later you can set it to <em>install</em>, in order |
| 373 |
|
|
to start the automatic installation. For more information see <manref |
| 374 |
|
|
name="bootptab" section="5"> and section XXXXXXX (tags erklaeren). |
| 375 |
|
|
<p> |
| 376 |
|
|
When you have created your <file>/etc/bootptab</file> you have to |
| 377 |
|
|
enable the BOOTP daemon. It's installed but Debian does not enable it |
| 378 |
|
|
by default. Edit <file>/etc/inetd.conf</file> and remove the comment |
| 379 |
|
|
(the hash) in the line containing <tt>#bootps</tt>. Then tell |
| 380 |
|
|
<prgn>inetd</prgn> to reload its configuration. |
| 381 |
|
|
|
| 382 |
|
|
<example># /etc/init.d/inetd reload</example> |
| 383 |
|
|
|
| 384 |
|
|
|
| 385 |
|
|
I recommend to use the BOOTP daemon because it automaticlly reloads |
| 386 |
|
|
the configuration file if any changes are made to it. The daemon for |
| 387 |
|
|
DHCP must always be manually restarted after changes to the |
| 388 |
|
|
configuration file are made <footnote> <p>If you can't use one of |
| 389 |
|
|
these, there's also the possibility to supply all information via a file |
| 390 |
|
|
or compile them into the kernel, but it's easier to use a daemon. See XXXX |
| 391 |
|
|
</p> |
| 392 |
|
|
</footnote>. Now it's time to boot all install clients ! |
| 393 |
|
|
|
| 394 |
|
|
<sect id="boot">Boot messages <p> |
| 395 |
|
|
|
| 396 |
|
|
These are messages, when booting from floppy. |
| 397 |
|
|
<example> |
| 398 |
|
|
LILO Loading FAI-BOOTP. |
| 399 |
|
|
Loading Linux.................... |
| 400 |
|
|
Uncompressing Linux... OK, booting the Kernel. |
| 401 |
|
|
Linux version 2.2.17 (root@kueppers) (gcc version 2.95.2 20000220 |
| 402 |
|
|
. |
| 403 |
|
|
. |
| 404 |
|
|
. |
| 405 |
|
|
</example> |
| 406 |
|
|
The rest of the boot message are equal to booting from network card. |
| 407 |
|
|
|
| 408 |
|
|
|
| 409 |
|
|
When booting from network card you will see: |
| 410 |
|
|
<example> |
| 411 |
|
|
BOOTP........ |
| 412 |
|
|
TFTP.......... |
| 413 |
|
|
SYSLINUX 1.48 1999-09-26 Copyright (C) 1994-1999 H. Peter Anvin |
| 414 |
|
|
Loading Linux.................... |
| 415 |
|
|
Uncompressing Linux... OK, booting the Kernel. |
| 416 |
|
|
Linux version 2.2.17 (root@kueppers) (gcc version 2.95.2 20000220 |
| 417 |
|
|
. |
| 418 |
|
|
. |
| 419 |
|
|
. |
| 420 |
|
|
Sending BOOTP requests ..... OK |
| 421 |
|
|
IP-Config: Got BOOTP answer from 134.95.9.149 |
| 422 |
|
|
IP-Config: Complete: |
| 423 |
|
|
device=eth0, addr=134.95.9.200, mask=255.255.255.0, gw=134.95.9.254, |
| 424 |
|
|
host=faiclient01, domain=informatik.uni-koeln.de, nis-domain=informatik4711.YP, |
| 425 |
|
|
bootserver=134.95.9.149, rootserver=134.95.9.149, rootpath=/usr/lib/fai/nfsroot |
| 426 |
|
|
. |
| 427 |
|
|
. |
| 428 |
|
|
. |
| 429 |
|
|
------------------------------------------------------------ |
| 430 |
|
|
FAI 1.3.0test3, november 7, 2000 |
| 431 |
|
|
Fully Automatic Installation for Debian GNU/Linux |
| 432 |
|
|
------------------------------------------------------------ |
| 433 |
|
|
. |
| 434 |
|
|
. |
| 435 |
|
|
. |
| 436 |
|
|
Press <RETURN> to reboot or ctrl-c to execute a shell |
| 437 |
|
|
</example> |
| 438 |
|
|
|
| 439 |
|
|
There will be some error message from modprobe and insmod, but that doesn't matter. |
| 440 |
|
|
|
| 441 |
|
|
<p> |
| 442 |
|
|
If you get this error the kernel has no driver for your network |
| 443 |
|
|
card. Compile a kernel which support your network card, but not as a module. |
| 444 |
|
|
<example> |
| 445 |
|
|
IP-Config: No network devices available |
| 446 |
|
|
Partition check: |
| 447 |
|
|
hda: hda1 hda2 < hda5 hda6 hda7 hda8 > |
| 448 |
|
|
Root-NFS: No NFS server available, giving up. |
| 449 |
|
|
VFS: Unable to mount root fs via NFS, trying floppy. |
| 450 |
|
|
VFS: Insert root floppy and press ENTER |
| 451 |
|
|
</example> |
| 452 |
|
|
|
| 453 |
|
|
|
| 454 |
|
|
<sect1 id="sysinfo">Collecting other system information<p> |
| 455 |
|
|
|
| 456 |
|
|
Now the clients have booted using the action <em>sysinfo</em>. Type |
| 457 |
|
|
<tt>ctrl-c</tt> to get a shell, or log from your server into the client (for |
| 458 |
|
|
eg. named faiclient01) using the secure shell: |
| 459 |
|
|
<example>> ssh -l root faiclient01 |
| 460 |
|
|
Warning: Permanently added 'faiclient01,134.95.9.200' to the list of known hosts. |
| 461 |
|
|
root@faiclient01's password: |
| 462 |
|
|
</example> |
| 463 |
|
|
|
| 464 |
|
|
You have now a shell and can execute various commands (dmesg, lsmod, |
| 465 |
|
|
df,...). Look at the log file in <file>/tmp</file>. There you can find |
| 466 |
|
|
much information about the boot process. |
| 467 |
|
|
|
| 468 |
|
|
All log files from <file>/tmp </file> are also written to the server in the directory <tt>~fai/faiclient01/sysinfo/</tt> |
| 469 |
|
|
|
| 470 |
|
|
<p> |
| 471 |
|
|
A very nice feature is, that FAI mounts all filesystems |
| 472 |
|
|
it finds on the local disks (but only readonly). It also tell you on |
| 473 |
|
|
which partitions a file <file>/etc/fstab</file> exists. When only one |
| 474 |
|
|
fstab is found, the partitions are mounted according to the |
| 475 |
|
|
information in this <file>/etc/fstab</file>. Here's an example: |
| 476 |
|
|
<example> |
| 477 |
|
|
faiclient01:~# df |
| 478 |
|
|
Filesystem 1k-blocks Used Available Use% Mounted on |
| 479 |
|
|
/dev/root 1249132 855648 330032 72% / |
| 480 |
|
|
/dev/ram0 3963 36 3927 1% /tmp |
| 481 |
|
|
kueppers:/usr/local/share/fai |
| 482 |
|
|
1249132 855648 330032 72% /fai |
| 483 |
|
|
/dev/hda1 54447 9859 41777 19% /tmp/target |
| 484 |
|
|
/dev/hda10 1153576 20 1141992 0% /tmp/target/files/install |
| 485 |
|
|
/dev/hda9 711540 20 711520 0% /tmp/target/home |
| 486 |
|
|
/dev/hda8 303336 13 300191 0% /tmp/target/tmp |
| 487 |
|
|
/dev/hda7 1517948 98252 1342588 7% /tmp/target/usr |
| 488 |
|
|
/dev/hda6 202225 8834 182949 5% /tmp/target/var |
| 489 |
|
|
</example> |
| 490 |
|
|
|
| 491 |
|
|
<strong>This method can be used as an rescue environment !</strong> In |
| 492 |
|
|
future it will be possible to make backups or restore data to existing |
| 493 |
|
|
filesystems. If you need a filesystem with read-write access try: |
| 494 |
|
|
|
| 495 |
|
|
<example>faiclient01:~# mount -o remount,rw /tmp/target/home</example> |
| 496 |
|
|
|
| 497 |
|
|
Reboot the computer using the command <prgn>faireboot</prgn>. |
| 498 |
|
|
|
| 499 |
|
|
<chapt id=instprocess>The installation process<p> |
| 500 |
|
|
|
| 501 |
|
|
FAI can perform several action when the client is booting. This action |
| 502 |
|
|
is defined in the variable <var>FAI_ACTION</var><footnote> |
| 503 |
|
|
<p>Theses names are used in the main installation |
| 504 |
|
|
script. The configuration files for DHCP and BOOTP daemons use other |
| 505 |
|
|
names. Example: <var>FAI_ACTION</var> is equal to <tt>T171</tt> in |
| 506 |
|
|
bootptab or <tt>option-171</tt> in dhcp.conf) </p> |
| 507 |
|
|
</footnote>. |
| 508 |
|
|
|
| 509 |
|
|
Be very carefully if you set <var>FAI_ACTION </var> to |
| 510 |
|
|
<em>sysinfo</em>. This can destroy all your data on the install client |
| 511 |
|
|
(most time it will do this !). It's recommended to change this only |
| 512 |
|
|
on a per client base in the BOOTP configuration. Do not change it in |
| 513 |
|
|
the section <tt>.failocal</tt> in <file>/etc/bootptab</file> which |
| 514 |
|
|
will valid for all clients. |
| 515 |
|
|
<p> |
| 516 |
|
|
|
| 517 |
|
|
<sect id=xxxx>The installation sequence<p> |
| 518 |
|
|
Folloing steps are performed during an installation after the linux kernel |
| 519 |
|
|
has booted. |
| 520 |
|
|
|
| 521 |
|
|
<enumlist> |
| 522 |
|
|
<item> <p>Set up FAI </p> </item> |
| 523 |
|
|
<item> <p>Define classes</p> </item> |
| 524 |
|
|
<item> <p>Partition local disks</p> </item> |
| 525 |
|
|
<item> <p>Create local filesystems</p> </item> |
| 526 |
|
|
<item> <p>Mount these filesystems</p> </item> |
| 527 |
|
|
<item> <p>Install software packages</p> </item> |
| 528 |
|
|
<item> <p>Call configuration scripts</p> </item> |
| 529 |
|
|
<item> <p>Save log files</p> </item> |
| 530 |
|
|
<item> <p>Reboot the new installed system</p> </item> |
| 531 |
|
|
</enumlist> |
| 532 |
|
|
|
| 533 |
|
|
|
| 534 |
|
|
|
| 535 |
|
|
<sect id=setupfai>Set up FAI<p> |
| 536 |
|
|
In this part you don do much |
| 537 |
|
|
|
| 538 |
|
|
sshd keymap consolefont time virtual terminals |
| 539 |
|
|
|
| 540 |
|
|
|
| 541 |
|
|
<sect id=devclasses>Define Classes<p> |
| 542 |
|
|
load modules |
| 543 |
|
|
<sect id=diskpart>Disk partitioning<p> |
| 544 |
|
|
|
| 545 |
|
|
<sect id=instsoft>Installing Software<p> |
| 546 |
|
|
<sect id=config0>Configureing to local needs<p> |
| 547 |
|
|
|
| 548 |
|
|
|
| 549 |
|
|
|
| 550 |
|
|
<chapt id=x1>Preparing your configuration<p> |
| 551 |
|
|
<chapt id="details">Details<p> |
| 552 |
|
|
<sect id=bootpdsetup>bootp setup<p> |
| 553 |
|
|
<sect id=dhcpsetup>dhcp setup<p> |
| 554 |
|
|
|
| 555 |
|
|
<p> |
| 556 |
|
|
A CVS repository for the development version of FAI is available (the password is: fai): |
| 557 |
|
|
|
| 558 |
|
|
<example> |
| 559 |
|
|
> CVSROOT=":pserver:anonymous@poolserver.informatik.uni-koeln.de:/home/fai/cvs" |
| 560 |
|
|
> cvs login |
| 561 |
|
|
> cvs co fai |
| 562 |
|
|
</example> |
| 563 |
|
|
|
| 564 |
|
|
<taglist> |
| 565 |
|
|
<tag>Hint for developers |
| 566 |
|
|
<item>If you do not want to use BOOTP and DHCP, you can |
| 567 |
|
|
define all variables in |
| 568 |
|
|
<file>/usr/lib/fai/nfsroot/fai/fai_config/hostname.conf AND global.conf XXX</file> because it's read before the real |
| 569 |
|
|
fai configuration directory is mounted. |
| 570 |
|
|
</item> |
| 571 |
|
|
</taglist> |
| 572 |
|
|
|
| 573 |
|
|
|
| 574 |
|
|
|
| 575 |
|
|
<chapt id="tutorial">A little tutorial |
| 576 |
|
|
<p> |
| 577 |
|
|
If you want to install a new kernel to nfsroot, you have to change |
| 578 |
|
|
fai.conf, remove nfsroot and call <prgn>make-fai-nfsroot</prgn>. |
| 579 |
|
|
|
| 580 |
|
|
|
| 581 |
|
|
|
| 582 |
|
|
|
| 583 |
|
|
ERROR HINTS |
| 584 |
|
|
<example> |
| 585 |
|
|
> egrep "no such variable|bad variable|E:|ERROR" *.log |
| 586 |
|
|
</example> |
| 587 |
|
|
|
| 588 |
|
|
|
| 589 |
|
|
create boot floppy (dhcp, bootp), boot from network card, get MAC address |
| 590 |
|
|
set up bootp/dhcp action=sysinfo |
| 591 |
|
|
|
| 592 |
|
|
The only task, which has to be done manually for new hardware, is to |
| 593 |
|
|
assign the MAC address to a hostname and to an IP-address and to |
| 594 |
|
|
define classes for this host, or all host which match a certain name |
| 595 |
|
|
(look at <file>class/S01alias.sh</file>). |
| 596 |
|
|
|
| 597 |
|
|
|
| 598 |
|
|
Before installing the FAI package on your server, you should plan your |
| 599 |
|
|
installation. |
| 600 |
|
|
|
| 601 |
|
|
470 MB Software in 10 minutes (10 or 100Mbit is equal when only one |
| 602 |
|
|
client is installing) |
| 603 |
|
|
faiserver != install server |
| 604 |
|
|
</book> |
| 605 |
|
|
</debiandoc> |
| 606 |
|
|
|
| 607 |
|
|
|
| 608 |
|
|
<!-- Keep this comment at the end of the file |
| 609 |
|
|
Local variables: |
| 610 |
|
|
mode: sgml |
| 611 |
|
|
sgml-omittag:t |
| 612 |
|
|
sgml-shorttag:t |
| 613 |
|
|
sgml-minimize-attributes:nil |
| 614 |
|
|
sgml-always-quote-attributes:t |
| 615 |
|
|
sgml-indent-step:2 |
| 616 |
|
|
sgml-indent-data:nil |
| 617 |
|
|
sgml-parent-document:nil |
| 618 |
|
|
sgml-exposed-tags:nil |
| 619 |
|
|
sgml-declaration:nil |
| 620 |
|
|
sgml-local-catalogs:nil |
| 621 |
|
|
sgml-local-ecat-files:nil |
| 622 |
|
|
End: |
| 623 |
|
|
--> |