On Fri, 2011-02-11 at 11:05 +0000, mamadou diop wrote: > Hello, > > Default, the hook partition.DISKLESS doesn't exist in the > configuration space. > Who can give me it? Is FAI diskless better than DRBL and LTSP?
Hello! I have the following in my partition.DISKLESS (slightly sanitized). Please note that this wipes out any previous data on the target partition, so you must be very sure that the correct partition is exported and mounted. This works under lenny. Untested for squeeze. You may want to play with the mount options. The ones listed here work for me, and I mount the nfs root with the same options when the machine boots into production. ---------------------------------------------- #! /bin/sh # install a diskless workstation # this is just an example, but not perfect code # # (c) Thomas Lange, 2001, [email protected] # server and all filesystems for diskless client server=...... # Fill in your server's name root=/export/$HOSTNAME # Change according to your situation var= swap= # Under lenny, the mount point does not 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) # create fstab cat > /tmp/fai/fstab <<EOF $server:$root / nfs rw,errors=remount-ro 0 0 EOF # $server:$usr /usr nfs rw 0 0 echo "#!" > $LOGDIR/disk_var.sh # now skip some default tasks skiptask partition mountdisks -------------------------------------------------------------- I also have a chboot.DISKLESS with a single line "skiptask chboot" in it. Not sure if it is really necessary, but it was needed at one time. Other than these two files, installation of a diskless workstation is no different than a diskfull one. For booting, you must get the installed kernel onto your TFTP server and supply the proper mount options to it. I also run a daily check which automatically updates the kernel on the TFTP server if the original has been upgraded due to a security update. Toomas
