Autor |
Nachricht |
|
Titel: Bug in initramfs nfs script
Verfasst am: 07.09.2012, 04:14 Uhr
|
|
Anmeldung: 07. Sep 2012
Beiträge: 4
|
|
Kanotix Linux Tag 2012 Hellraiser 32 mini
Attempting to netboot the LiveCD over pxe/tftp and mount the squasfs over NFS from a loopback-mounted ISO on a server. This is supprted in Debian (the Debian Live images all boot properly) and Kanotix shares at least some of the capabilities and uses the same boot parameters.
Initially the kernel would panic whenever I attempted to boot with it because it couldn't find the root filesystem. On IRC kano gave me some suggestions and confirmed that the boot parameters were compatible with Debian. However, nothing seemed to work.
In spite of other pressing concerns, I didn't give up and finally found that the initrd line in the confuration had a typo and the initrd image wasn't being found. This allowed it to at least boot but then it couldn't connect the NFS server. The error reported was "nfsmount: need a path" which looped until the script timed out and dropped to an initramfs prompt.
I set break=mountroot to stop the boot just before the mount attempt. I can easily mount the NFS share with nfsmount but after exiting initramfs it still attempted to mount it again then returned to the initramfs prompt when it couldn't load the image. It may be relying on the nfsmount exit status instead of checking for the presence of the mount.
From what I can tell, the nfs script (/scripts/nfs) isn't supplying the root path parameter for the nfsmount command line, only the server: part. In my configuration the NFS root path is specified through the pxe/syslinux boot configuration, not the DHCP server because I have many netboot images with different directory structures. An old Debian bug suggested changing the nfs script to use mount instead of nfsmount:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=359926
Easy to do but changing the script in the running initramfs environment didn't change its execution (still used nfsmount when I exited initramfs) so it may have been already executing when the break occurred. I don't have time to build a custom initrd image.
I tried different variations of the boot command line but always received the same error. My pxe/syslinux config:
Code:
label kanotixlt2012hf32mini
menu label Kanotix
kernel /isomnt/KANOTIX-LinuxTag2012-Hellfire32-mini/live/vmlinuz
initrd /isomnt/KANOTIX-LinuxTag2012-Hellfire32-mini/live/initrd.img
append ip=dhcp boot=live config netboot=nfs nfsdir=192.168.11.5:/srv/tftp/isomnt/KANOTIX-LinuxTag2012-Hellfire32-mini
|
|
|
|
|
![](./modules/PNphpBB2/templates/PNTheme/images/spacer.gif) |
|
Titel:
Verfasst am: 08.09.2012, 02:43 Uhr
|
|
Anmeldung: 07. Sep 2012
Beiträge: 4
|
|
I managed to get Kanotix to boot over NFS with some workarounds.
1. Set "break=mountroot" in the PXE/syslinux config:
Code:
append ip=dhcp boot=live config netboot=nfs nfsdir=192.168.11.5:/srv/tftp/isomnt/KANOTIX-LinuxTag2012-Hellfire32-mini lang=us keyboard=us xkeyboard=us break=mountroot
2. When the boot process halts at initramfs prompt, enter:
Code:
ipconfig eth0
nfsmount -o nolock -o ro 192.168.11.5:/srv/tftp/isomnt/KANOTIX-LinuxTag2012-Hellfire32-mini /live/image
cp /bin/true /bin/nfsmount
3. Then <Ctrl-d> to exit initramfs and resume booting. The ipconfig command will be executed again by the nfs script but this is harmless. The fake nfsmount will return an exit status of 0 making the script behave as if the mount succeeded. It may stall out when it attempts to mount the image with aufs:
Code:
nfs: server 192.168.11.5 not responding, still trying
It will time out and retry after a few minutes then resume booting to the KDE desktop. |
|
|
|
|
![](./modules/PNphpBB2/templates/PNTheme/images/spacer.gif) |
|
Titel:
Verfasst am: 08.09.2012, 18:33 Uhr
|
|
Anmeldung: 17. Dez 2003
Beiträge: 16785
|
|
Did you try httpfs? You only need to extract kernel+initrd, you can use the iso image directly for httpfs. |
|
|
|
|
![](./modules/PNphpBB2/templates/PNTheme/images/spacer.gif) |
|
Titel:
Verfasst am: 08.09.2012, 21:52 Uhr
|
|
Anmeldung: 07. Sep 2012
Beiträge: 4
|
|
Not yet. I wanted to make sure the NFS bug was reported so nobody else has to waste time trying to get it working. |
|
|
|
|
![](./modules/PNphpBB2/templates/PNTheme/images/spacer.gif) |
|
Titel:
Verfasst am: 09.09.2012, 00:17 Uhr
|
|
Anmeldung: 17. Dez 2003
Beiträge: 16785
|
|
Well i do not change debian live packages. |
|
|
|
|
![](./modules/PNphpBB2/templates/PNTheme/images/spacer.gif) |
|
Titel:
Verfasst am: 09.09.2012, 02:15 Uhr
|
|
Anmeldung: 07. Sep 2012
Beiträge: 4
|
|
Since Debian Live 6.0.4 images boot perfectly, I changed the boot parameters to match and it worked.
Code:
label kanotixlt2012hf32mini
menu label Kanotix Hellfire 2012-05 32-bit LiveCD (KDE)
kernel /isomnt/KANOTIX-LinuxTag2012-Hellfire32-mini/live/vmlinuz
initrd /isomnt/KANOTIX-LinuxTag2012-Hellfire32-mini/live/initrd.img
append ip=dhcp boot=live config netboot=nfs nfsroot=192.168.11.5:/srv/tftp/isomnt/KANOTIX-LinuxTag2012-Hellfire32-mini lang=us keyboard=us xkeyboard=us
It looks like the nfsdir= parameter was the problem. Using nfsroot= worked. I'm not sure where nfsdir came from. From the PXE menu it boots in about 75 seconds over 100-BaseT. |
|
|
|
|
![](./modules/PNphpBB2/templates/PNTheme/images/spacer.gif) |
|