Discussion:
[Grml] network boot with nfs4 root
Joerg Dorchain
2013-01-19 00:38:54 UTC
Permalink
Hello,

I tried to setup a boot server with pxe. I followed loosely the
wiki http://wiki.grml.org/doku.php?id=terminalserver for that.
So far all went fine, except mounting the root over nfs4.

My nfs server is version4 only, and from packet logs I see that
grml tries nfs version3 only over and over.

Is this a bugs or is there some trick for get it to work with
nfs4?


Also, as I am using the grml96 iso image via a loopback mount, I
would greatly appreciate if I could use the bootmenu for isolinux
also for pxelinux. To me it seems it is mainly a matter of
pathnames (and maybe symlinks) to get it to work with a statement like

LABEL grml-from-iso
CONFIG <iso-root>/boot/isolinux/<common.cfg>
APPEND <<iso-root>

from pxelinux.cfg

Bye,

Joerg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: Digital signature
URL: <http://ml.grml.org/pipermail/grml/attachments/20130119/c8dbebd7/attachment.pgp>
Michael Prokop
2013-01-21 18:59:58 UTC
Permalink
Post by Joerg Dorchain
I tried to setup a boot server with pxe. I followed loosely the
wiki http://wiki.grml.org/doku.php?id=terminalserver for that.
So far all went fine, except mounting the root over nfs4.
My nfs server is version4 only, and from packet logs I see that
grml tries nfs version3 only over and over.
Is this a bugs or is there some trick for get it to work with
nfs4?
AFAIK klibc still doesn't support nfs v4:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=409271
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=409272

I'm not sure whether there are reasonable ways to work around klibc,
trying dracut instead of initramfs-tools might be a good start as
booting from nfsv4 works there (though I've no idea yet what needs
to get adjusted so it works for our live boot mode). I'm definitely
interested to see nfs4 working for netboot out-of-the-box on Grml
too, so if there's something where we could help please let us know.
Post by Joerg Dorchain
Also, as I am using the grml96 iso image via a loopback mount, I
would greatly appreciate if I could use the bootmenu for isolinux
also for pxelinux. To me it seems it is mainly a matter of
pathnames (and maybe symlinks) to get it to work with a statement like
LABEL grml-from-iso
CONFIG <iso-root>/boot/isolinux/<common.cfg>
APPEND <<iso-root>
from pxelinux.cfg
Hm, a symlink pxelinux.cfg pointing to {isolinux,syslinux}.cfg isn't
enough, right? Any chance you could provide a working pxelinux.cfg
so we could work on an according template for grml-live (see
https://github.com/grml/grml-live/tree/master/templates/boot/isolinux )

regards,
-mika-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://ml.grml.org/pipermail/grml/attachments/20130121/f4691b7a/attachment.pgp>
Joerg Dorchain
2013-02-06 10:55:05 UTC
Permalink
Post by Michael Prokop
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=409271
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=409272
I'm not sure whether there are reasonable ways to work around klibc,
trying dracut instead of initramfs-tools might be a good start as
booting from nfsv4 works there (though I've no idea yet what needs
to get adjusted so it works for our live boot mode). I'm definitely
interested to see nfs4 working for netboot out-of-the-box on Grml
too, so if there's something where we could help please let us know.
For this, main point is the used tools must understand nfs4.
Post by Michael Prokop
Post by Joerg Dorchain
Also, as I am using the grml96 iso image via a loopback mount, I
would greatly appreciate if I could use the bootmenu for isolinux
also for pxelinux. To me it seems it is mainly a matter of
pathnames (and maybe symlinks) to get it to work with a statement like
LABEL grml-from-iso
CONFIG <iso-root>/boot/isolinux/<common.cfg>
APPEND <<iso-root>
from pxelinux.cfg
Hm, a symlink pxelinux.cfg pointing to {isolinux,syslinux}.cfg isn't
enough, right?
Yes. The main point is how the different {sys|iso|pxe}linux
lookup paths.

isolinux looks in boot/isolinux/ and /. The various include config files
in boot/isolinux/ make use of that path, whereas theextras use an
absolute path.
pxelinux however has all paths relative it itself.
An option would be to use absolute paths everywhere, and an
additional pxelinux.cfg at the top level of the iso, contai a
default file including stuff from boot/isolinux.
Post by Michael Prokop
Any chance you could provide a working pxelinux.cfg
so we could work on an according template for grml-live (see
https://github.com/grml/grml-live/tree/master/templates/boot/isolinux )
It does not (yet) completely work, I have no direct idea how to
make autodetection of the live filesystem via network work other
than giving an explicit nfsroot option, but see attachment.
Maybe iPXE with recent nfs support might also help

So, the setup is:
- fstab:
/usr/lib/syslinux /nfsexports/tftp/syslinux none auto,rbind 0 0
/export/sw/iso/grml/grml96-full_2012.05.iso /nfsexports/tftp/grml auto auto,ro,loop 0 0
# ls -l /nfsexports/tftp
total 15
dr-xr-xr-x 1 root root 2048 May 28 2012 grml
lrwxrwxrwx 1 root root 24 Jan 18 23:43 memtest -> grml/boot/addons/memtest
lrwxrwxrwx 1 root root 17 Jan 18 21:36 menu.c32 -> syslinux/menu.c32
lrwxrwxrwx 1 root root 21 Jan 22 23:19 pxechain.com -> syslinux/pxechain.com
lrwxrwxrwx 1 root root 19 Jan 18 21:25 pxelinux.0 -> syslinux/pxelinux.0
drwxr-xr-x 3 root root 1024 Jan 22 23:36 pxelinux.cfg
drwxr-xr-x 5 root root 12288 Dec 20 17:30 syslinux
# ls -l /nfsexports/tftp/pxelinux.cfg/
total 4
-rw-r--r-- 1 root root 448 Jan 22 23:36 default
drwxr-xr-x 3 root root 3072 Jan 23 00:20 grmlboot
- default
LABEL grml
kernel pxechain.com
append grmlboot/pxelinux.0
# ls -l /nfsexports/tftp/pxelinux.cfg/grmlboot/
total 3
lrwxrwxrwx 1 root root 39 Jan 23 00:11 additional.cfg -> ../../grml/boot/isolinux/additional.cfg
lrwxrwxrwx 1 root root 43 Jan 23 00:11 addon_10_grub2.cfg -> ../../grml/boot/isolinux/addon_10_grub2.cfg
lrwxrwxrwx 1 root root 46 Jan 23 00:11 addon_20_allinone.cfg -> ../../grml/boot/isolinux/addon_20_allinone.cfg
lrwxrwxrwx 1 root root 42 Jan 23 00:11 addon_25_gxpe.cfg -> ../../grml/boot/isolinux/addon_25_gxpe.cfg
lrwxrwxrwx 1 root root 41 Jan 23 00:11 addon_30_dos.cfg -> ../../grml/boot/isolinux/addon_30_dos.cfg
lrwxrwxrwx 1 root root 41 Jan 23 00:11 addon_35_bsd.cfg -> ../../grml/boot/isolinux/addon_35_bsd.cfg
lrwxrwxrwx 1 root root 45 Jan 23 00:11 addon_40_memtest.cfg -> ../../grml/boot/isolinux/addon_40_memtest.cfg
lrwxrwxrwx 1 root root 41 Jan 23 00:11 addon_45_hdt.cfg -> ../../grml/boot/isolinux/addon_45_hdt.cfg
lrwxrwxrwx 1 root root 35 Jan 23 00:11 addons.cfg -> ../../grml/boot/isolinux/addons.cfg
lrwxrwxrwx 1 root root 40 Jan 23 00:11 addons_list.cfg -> ../../grml/boot/isolinux/addons_list.cfg
lrwxrwxrwx 1 root root 15 Jan 23 00:20 boot -> ../../grml/boot
lrwxrwxrwx 1 root root 33 Jan 23 00:11 boot.cat -> ../../grml/boot/isolinux/boot.cat
lrwxrwxrwx 1 root root 37 Jan 23 00:11 defaults.cfg -> ../../grml/boot/isolinux/defaults.cfg
lrwxrwxrwx 1 root root 35 Jan 23 00:11 distri.cfg -> ../../grml/boot/isolinux/distri.cfg
lrwxrwxrwx 1 root root 27 Jan 23 00:11 f1 -> ../../grml/boot/isolinux/f1
lrwxrwxrwx 1 root root 28 Jan 23 00:11 f10 -> ../../grml/boot/isolinux/f10
lrwxrwxrwx 1 root root 27 Jan 23 00:11 f2 -> ../../grml/boot/isolinux/f2
lrwxrwxrwx 1 root root 27 Jan 23 00:11 f3 -> ../../grml/boot/isolinux/f3
lrwxrwxrwx 1 root root 27 Jan 23 00:11 f4 -> ../../grml/boot/isolinux/f4
lrwxrwxrwx 1 root root 27 Jan 23 00:11 f5 -> ../../grml/boot/isolinux/f5
lrwxrwxrwx 1 root root 27 Jan 23 00:11 f6 -> ../../grml/boot/isolinux/f6
lrwxrwxrwx 1 root root 27 Jan 23 00:11 f7 -> ../../grml/boot/isolinux/f7
lrwxrwxrwx 1 root root 27 Jan 23 00:11 f8 -> ../../grml/boot/isolinux/f8
lrwxrwxrwx 1 root root 33 Jan 23 00:11 grml.png -> ../../grml/boot/isolinux/grml.png
lrwxrwxrwx 1 root root 48 Jan 23 00:11 grml32_full_default.cfg -> ../../grml/boot/isolinux/grml32_full_default.cfg
lrwxrwxrwx 1 root root 45 Jan 23 00:11 grml32_full_grml.cfg -> ../../grml/boot/isolinux/grml32_full_grml.cfg
lrwxrwxrwx 1 root root 47 Jan 23 00:11 grml32_full_hidden.cfg -> ../../grml/boot/isolinux/grml32_full_hidden.cfg
lrwxrwxrwx 1 root root 48 Jan 23 00:11 grml64_full_default.cfg -> ../../grml/boot/isolinux/grml64_full_default.cfg
lrwxrwxrwx 1 root root 45 Jan 23 00:11 grml64_full_grml.cfg -> ../../grml/boot/isolinux/grml64_full_grml.cfg
lrwxrwxrwx 1 root root 37 Jan 23 00:11 grmlmain.cfg -> ../../grml/boot/isolinux/grmlmain.cfg
lrwxrwxrwx 1 root root 31 Jan 23 00:11 hd.cfg -> ../../grml/boot/isolinux/hd.cfg
lrwxrwxrwx 1 root root 35 Jan 23 00:11 hidden.cfg -> ../../grml/boot/isolinux/hidden.cfg
lrwxrwxrwx 1 root root 36 Jan 23 00:11 hiddens.cfg -> ../../grml/boot/isolinux/hiddens.cfg
lrwxrwxrwx 1 root root 36 Jan 23 00:11 ifcpu64.c32 -> ../../grml/boot/isolinux/ifcpu64.c32
lrwxrwxrwx 1 root root 37 Jan 23 00:11 isolinux.bin -> ../../grml/boot/isolinux/isolinux.bin
lrwxrwxrwx 1 root root 37 Jan 23 00:11 isolinux.cfg -> ../../grml/boot/isolinux/isolinux.cfg
lrwxrwxrwx 1 root root 38 Jan 23 00:11 isoprompt.cfg -> ../../grml/boot/isolinux/isoprompt.cfg
lrwxrwxrwx 1 root root 32 Jan 23 00:11 logo.16 -> ../../grml/boot/isolinux/logo.16
lrwxrwxrwx 1 root root 47 Jan 23 00:11 option_grml32_full.cfg -> ../../grml/boot/isolinux/option_grml32_full.cfg
lrwxrwxrwx 1 root root 47 Jan 23 00:11 option_grml64_full.cfg -> ../../grml/boot/isolinux/option_grml64_full.cfg
lrwxrwxrwx 1 root root 36 Jan 23 00:11 options.cfg -> ../../grml/boot/isolinux/options.cfg
lrwxrwxrwx 1 root root 35 Jan 23 00:11 prompt.cfg -> ../../grml/boot/isolinux/prompt.cfg
lrwxrwxrwx 1 root root 39 Jan 23 00:11 promptname.cfg -> ../../grml/boot/isolinux/promptname.cfg
lrwxrwxrwx 1 root root 16 Jan 22 23:37 pxelinux.0 -> ../../pxelinux.0
drwxr-xr-x 2 root root 3072 Jan 23 13:16 pxelinux.cfg
lrwxrwxrwx 1 root root 37 Jan 23 00:11 syslinux.cfg -> ../../grml/boot/isolinux/syslinux.cfg
lrwxrwxrwx 1 root root 37 Jan 23 00:11 vesamenu.c32 -> ../../grml/boot/isolinux/vesamenu.c32
lrwxrwxrwx 1 root root 37 Jan 23 00:11 vesamenu.cfg -> ../../grml/boot/isolinux/vesamenu.cfg
# ls -l /nfsexports/tftp/pxelinux.cfg/grmlboot/pxelinux.cfg/
total 1
-rw-r--r-- 1 root root 117 Jan 23 13:16 default
# more /nfsexports/tftp/pxelinux.cfg/grmlboot/pxelinux.cfg/default
DEFAULT grml
APPEND root=/dev/nfs rw nfsroot=172.17.2.1:/nfsexports/tftp/grml noeject
LABEL grml
config vesamenu.cfg

Bye,

Joerg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: grmlboot.tar.gz
Type: application/octet-stream
Size: 1176 bytes
Desc: not available
URL: <http://ml.grml.org/pipermail/grml/attachments/20130206/9fab4f6c/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: Digital signature
URL: <http://ml.grml.org/pipermail/grml/attachments/20130206/9fab4f6c/attachment.pgp>
Loading...