fix for fai/nfsroot over bootp problem

Jason Aten jaten at ucla.edu
Sun Oct 20 11:37:22 CEST 2002


Dear FAI-fans,

I've been working to try to get FAI to do the automated boot
over the network with my own compiled kernel and the
setup-fai/make-fai-nfsroot scripts. It wasn't working at
first; here, for the record, is what needed fixing in 2.4.18
linux kernel.

Details: Running setup-fai from FAI 2.3.4 on debian-woody on
x86 with mknib-linux version 0.8.1 produced an image whose
kernel command line parameters were non-functional when
booted via BOOTP/TFTP using 3com 3c905c ethernet cards.

<...snip from output of setup-fai...>
Kernel image file name  =
/usr/lib/fai/nfsroot/boot/vmlinuz-2.4.18
Output file name        = /boot/fai/installimage
Kernel command line     = "auto rw root=/dev/nfs
nfsroot=kernel nfsaddrs=kernel"
<...end snip...>

The bad parameters given by mknbi-linux above turned out to
be the defaults:  nfsroot=kernel and nfsaddrs=kernel. These
have probably now become obsolete, because the resulting
kernel fails to properly use the bootp discovered
parameters. The results after kernel transfer via TFTP was
failure on mounting the root partition over nfs. The client
would complain:

Root-NFS: No NFS server available, giving up.

However it was not due to lacking network card drivers
compiled into the kernel.

The solution was to give slightly different parameters to
mknbi-linux when it is called in the make-fai-nfsroot
script. Specifically, forcing mknbi-linux to introduce
"nfsroot=rom" and "nfsaddrs=rom" as the proper kernel
command line parameters fixed the problem with mounting root
over NFS in kernel 2.4.18.

The following patch shows the alteration (along with using
cfengine2 instead of the older cfengine; and noting that you
must use the older version 1.00 of imggen)

Hope this saves somebody else all the time it took me to
figure it out. The fixes to the mknbi-linux call may be
worth adding to the released version.

jason

*** make-fai-nfsroot.patched	Sun Oct 20 01:35:29 2002
--- make-fai-nfsroot	Mon Sep  9 02:49:55 2002
***************
*** 29,35 ****

  # Packages that are install to nfsroot by default Additional packages are
  # defined with $NFSROOT_PACKAGES in fai.conf
! packages="portmap dhcp-client file rdate cfengine2 bootpc wget rsh-client less dump
  ext2resize strace hdparm parted dnsutils grub ntpdate psmisc
  dosfstools sysutils dialog libdetect0 discover mdetect read-edid kudzu hwtools"

--- 29,35 ----

  # Packages that are install to nfsroot by default Additional packages are
  # defined with $NFSROOT_PACKAGES in fai.conf
! packages="portmap dhcp-client file rdate cfengine bootpc wget rsh-client less dump
  ext2resize strace hdparm parted dnsutils grub ntpdate psmisc
  dosfstools sysutils dialog libdetect0 discover mdetect read-edid kudzu hwtools"

***************
*** 302,309 ****
  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  setup_bootp(){

!     mknbi-linux --verbose -d /dev/nfs -i rom -a nfsroot=rom $NFSROOT/boot/vmlinuz-$KERNELVERSION /boot/fai/installimage
!     # imggen is free software from 3com - use ver1.00: 1.01 produces Image too Big errors.
      # it converts netboot image to images, that are bootable by 3com network cards
      imggen=`which imggen || true`
      if [ -x "$imggen" ]; then
--- 302,309 ----
  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  setup_bootp(){

!     mknbi-linux --verbose $NFSROOT/boot/vmlinuz-$KERNELVERSION /boot/fai/installimage
!     # imggen is free software from 3com
      # it converts netboot image to images, that are bootable by 3com network cards
      imggen=`which imggen || true`
      if [ -x "$imggen" ]; then




More information about the linux-fai mailing list