my installation odyssey

Kjetil T Homme kjetilho at linpro.no
Fri Jul 13 14:35:05 CEST 2001


  # fai-setup 
  [...]
  Fetching ftp://ftp.no.debian.org/debian/dists/stable/main/disks-i386/current/base?_?.tgz via wget. This may take some time.
  --20:34:17--  ftp://ftp.no.debian.org:21/debian/dists/stable/main/disks-i386/current/base?_?.tgz
             => `/tmp/FAI-wget-Jr5P7F/base?_?.tgz'
  Connecting to cache.linpro.no:8080... connected!
  Proxy request sent, awaiting response... 404 Not Found
  20:34:18 ERROR 404: Not Found.

As you can see, the wildcards didn't work.  This may be dependent on
the FTP server?

I changed it into 2_2 and tried again:

  # fai-setup 
  Account $LOGUSER=fai already exists.
  Make sure, that all install clients can
  log into this account without a password.
  Generating RSA keys:  .............................oooooO............................oooooO
  Key generation complete.
  /home/fai/.ssh/identity already exists.
  Overwrite (y/n)? n
  #

It aborts, which is wrong IMO.

Okay, let's try again, answering yes.

  # fai-setup 
  [...]
  Creating FAI nfsroot can take a long time and will
  need more than 100MB disk space in /help/fai/nfsroot.
  /help/fai/nfsroot already exists. Removing /help/fai/nfsroot
  rm: cannot remove directory `/help/fai/nfsroot': Device or resource busy
  /dev/vg_help/nfsroot on /help/fai/nfsroot type ext2 (rw)
  #

It is good practice to put the nfsroot in a partition by itself, due
to the security model of NFS.  (A nasty NFS-client can access files
"outside" the tree it has mounted by guessing inodes.  It doesn't even
have to guess -- the root of a filesystem is always inode 2.)

Simple patch:

--- /usr/sbin/make-fai-nfsroot  Thu Jun 28 14:15:14 2001
+++ /tmp/make-fai-nfsroot      Thu Jul 12 20:52:12 2001
@@ -240,7 +240,7 @@
 if [ -d $NFSROOT/fai ]; then
     echo $NFSROOT already exists. Removing $NFSROOT
     umount $NFSROOT/dev/pts 1>/dev/null 2>&1 || true
-    rm -rf $NFSROOT
+    rm -rf $NFSROOT/.??* $NFSROOT/*
 fi
 
 create_nfsroot

Another bug in make-fai-nfsroot:
    cp $LIBFAI/sbin/start-stop-daemon $NFSROOT/sbin
LIBFAI should be replaced by the proper prefix, either hardcoded to
/usr/lib/fai, or queried from dpkg (if installed elsewhere).
Hmm.  Perhaps it wasn't intended that users should change LIBFAI in
/etc/fai.conf.  Change
  # a constant
into
  # where fai utilities are stored, don't change
or something like that.  Also, don't use $LIBFAI in the definition of
NFSROOT.


Next problem was that depmod -a invoked by apt-get used my running
kernel version

  + chroot /help/fai/nfsroot apt-get -y remove pcmcia-cs
  depmod: Can't open /lib/modules/2.4.2-xfs-20010304/modules.dep for writing

Not sure if this really matters, though.  As long as depmod is run
correctly afterwards (and it is), modules.dep will probably be fine.


Okay, next onto configuring the DHCP server.  I had to use
"next-server FAISERVER;" to make it work (this tells the DHCP server
to fake the source address on the BOOTP reply).

It didn't find FAI_LOCATION or FAI_ACTION, so I had to define them in
/fai/fai_config/IPADDR instead.

This may be due to our DHCP server, we're running 2.0pl5-5 here.


Phew, I now finally have FAI running in sysinfo mode. :-)
I'll let you know more about my experiences with the actual install
mode later.


Kjetil T.



More information about the linux-fai mailing list