live-initramfs with NFSROOT=auto
Hello,
I'm trying to update my FAI (automatic install) with version 3.2,
which now use Debian kernels and live-initramfs. I'm using net boot
with PXE and NFS, and tried to find the correct arguments to give on
linux command line. I've tried following options :
initrd=<my-initrd> debug boot=live netboot=nfs NFSOPTS="-o udp" vga=791 <FAI options>
but it fails because the NFS server and root path isn't explicitely
given by 'nfsroot=<server>:<rootpath>' argument.
It should work as these parameters are already given by DHCP and
initramfs' NFSROOT option is set to 'auto', but I've found in
scripts/live that these data from DHCP is read too late :
do_netmount ()
{
...
ipconfig ${DEVICE} | tee /netboot.config
if [ "${NFSROOT}" = "auto" ]
then
NFSROOT=${ROOTSERVER}:${ROOTPATH}
fi
# source relevant ipconfig output
OLDHOSTNAME=$HOSTNAME
. /tmp/net-${DEVICE}.conf
...
}
I think it should read /tmp/net-${DEVICE}.conf script (which contains
definitions from DHCP lease) *before* setting NFSROOT to real values
when it is 'auto' ?
I found a script in my initrd, scripts/nfs (coming from FAI ?) which do
it that way :
do_nfsmount()
{
# support ip options see linux sources Documentation/nfsroot.txt
case ${IPOPTS} in
none|off)
# Do nothing
;;
""|on|any)
# Bring up device
ipconfig ${DEVICE}
;;
dhcp|bootp|rarp|both)
ipconfig -c ${IPOPTS} -d ${DEVICE}
;;
*)
ipconfig -d $IPOPTS
...
;;
esac
# source relevant ipconfig output
. /tmp/net-${DEVICE}.conf
# get nfs root from dhcp
if [ "x${NFSROOT}" = "xauto" ]; then
NFSROOT=${ROOTSERVER}:${ROOTPATH}
# nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>]
...
}
If you agree, can you correct live-initramfs's script ?
with regards,
Fred.
Reply to: