FAI and diskless clients

Toomas Tamm tt-fai at kky.ttu.ee
Mon Jan 16 10:30:22 CET 2012


Hello!

We have used diskless clients for years. I am typing this answer on
one :-) .

I install them just like regular machines. A couple of hooks are needed:

chboot.DISKLESS contains just "skiptask chboot". I manually change the
tftp configuration afterwards to boot the installed kernel;

partition.DISKLESS (below) is a bit longer, and involves mounting the
appropriate install location from the disk server onto "/target",
creating a one-line fstab, and an empty disk_var.sh, and skipping the
tasks partition and mountdisks.

There are a couple of other modifications for the sake of efficiency,
but these two should be the only changes which enable installation of a
diskless client.

Of course you also need to set up a server to export the root directory
with appropriate permissions and make sure that the NFS is efficient
and reliable in *your* network. My root is currently mounted as
rw,vers=3,rsize=32768,wsize=32768,namlen=255,hard,intr,nolock,proto=tcp,
timeo=7,retrans=3,sec=sys,mountproto=udp  . Your preferences and
situation may vary.

Here is my partition.DISKLESS, derived from sample code which came with
FAI some versions ago.

------------------------------- snip --------------------------------

#! /bin/sh

# install a diskless workstation
# this is just an example, but not perfect code
#
# (c) Thomas Lange, 2001, lange at debian.org

# server and all filesystems for diskless client
server=glauber
root=/export/$HOSTNAME
usr=
var=
swap=

# The mount point does not necessarily exist at this stage yet.
[ ! -d $target ] && mkdir $target

# dpkg wants a lock but linux NFS can't do it yet
mountopt="-o nolock,async"
# Add the options which helped to speed up diskless machines under etch.
mountopt=${mountopt},tcp,intr,rsize=8192,wsize=8192,retrans=10

# mount2dir can't mount nfs directories yet, so do it now
# and skip the default task later
# also clean up the directories (preserve is not yet possible)
mount $mountopt $server:$root $target
echo 'Deleting target files from previous OS may take some time...'
echo 'You may help a little by deleting files yourself on the server.'
rm -rf $target/.[0-z]* $target/*
(cd $target; mklost+found)
#mkdir $target/usr
#mount $mountopt $server:$usr $target/usr

------------------------------- snip --------------------------------

Toomas Tamm




More information about the linux-fai mailing list