ar_source=nfs broken in 2.0.1 when booting w/PXE/nfsboot

Questions related to network booting via PXE
rh4009
Posts: 4
Joined: 06 Apr 2011, 20:30

ar_source=nfs broken in 2.0.1 when booting w/PXE/nfsboot

Postby rh4009 » 07 Apr 2011, 19:08

Greetings,

I'm booting systemrescuecd from the network using PXE, with root FS on NFS, and would like to have an autorun directory, also mounted with NFS. However, the autorun directory fails to mount automatically. I can mount it manually only after adding "-o nolock" to the mount command line:

* Starting SystemRescueCd autorun scripts ...
Initializing autorun...

fatal error: cannot mount (mount -t nfs 192.168.220.2:/tftpboot/fs/systemrescuecd/autorun /var/autorun/mnt)
* ERROR: autorun failed to start

Looking through the bootscripts, I see there is no way to add mount options to the kernel commandline.

Would it be possible to fix this?

I can see a few solutions, but the developers may have even better ones:
1. "-o nolock" is added automatically to autorun mount command when using NFSROOT
2. start rpc.statd automatically when running with NFSROOT, before mounting autorun?

For the time being I will use HTTP to deliver the autorun scripts, but it would be fantastic if NFS autorun "just worked" in a future version.

Thank you
Radu

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: ar_source=nfs broken in 2.0.1 when booting w/PXE/nfsboot

Postby gernot » 07 Apr 2011, 19:27

works manual mount like this?

Code: Select all

mkdir /mnt/autorun
mount -t nfs 192.168.220.2:/tftpboot/fs/systemrescuecd/autorun /mnt/autorun

Is the exported path of your autorun file ok? /tftpboot/fs/systemrescuecd/autorun/autorun

Gernot

rh4009
Posts: 4
Joined: 06 Apr 2011, 20:30

Re: ar_source=nfs broken in 2.0.1 when booting w/PXE/nfsboot

Postby rh4009 » 07 Apr 2011, 19:34

gernot wrote:works manual mount like this?

Code: Select all

mkdir /mnt/autorun
mount -t nfs 192.168.220.2:/tftpboot/fs/systemrescuecd/autorun /mnt/autorun

Is the exported path of your autorun file ok? /tftpboot/fs/systemrescuecd/autorun/autorun

Gernot


Yes, I can mount it from the command prompt with (no need to mkdir first, the /mnt/autorun directory exists):

mount -t nfs -o nolock 192.168.220.2:/tftpboot/fs/systemrescuecd/autorun /var/autorun/mnt

The ISO itself is mounted at /tftpboot/fs/systemrescuecd/mnt, which is the NFSROOT


If I run the command you show, I get the following response:

[email protected] /root % mount -t nfs 192.168.220.2:/tftpboot/fs/systemrescuecd/autorun /var/autorun/mnt
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: ar_source=nfs broken in 2.0.1 when booting w/PXE/nfsboot

Postby gernot » 07 Apr 2011, 20:26

i read about a problem when the nfs server is old.
If so "-o nolock,proto=udp" shold mount without errors.

Are there additional messages in the client and serverlog?

Gernot

rh4009
Posts: 4
Joined: 06 Apr 2011, 20:30

Re: ar_source=nfs broken in 2.0.1 when booting w/PXE/nfsboot

Postby rh4009 » 07 Apr 2011, 21:01

gernot wrote:i read about a problem when the nfs server is old.
If so "-o nolock,proto=udp" shold mount without errors.

Are there additional messages in the client and serverlog?

Gernot


In /var/log/messages on the client, there are some rpc.statd messages:

Code: Select all

Apr  6 20:34:54 sysresccd sshd[1685]: Server listening on 0.0.0.0 port 22.
Apr  6 20:34:54 sysresccd sshd[1685]: Server listening on :: port 22.
Apr  6 20:34:56 sysresccd kernel: [  252.254799] md: Autodetecting RAID arrays.
Apr  6 20:34:56 sysresccd kernel: [  252.254802] md: Scanned 0 and added 0 devices.
Apr  6 20:34:56 sysresccd kernel: [  252.254804] md: autorun ...
Apr  6 20:34:56 sysresccd kernel: [  252.254805] md: ... autorun DONE.
Apr  6 20:34:56 sysresccd init: Re-reading inittab
Apr  6 20:34:56 sysresccd rpc.statd[2154]: Version 1.2.2 starting
Apr  6 20:34:56 sysresccd rpc.statd[2154]: Flags: TI-RPC
Apr  6 20:34:56 sysresccd rpc.statd[2154]: Failed to read /var/lib/nfs/state: Success
Apr  6 20:34:56 sysresccd rpc.statd[2154]: Initializing NSM state
Apr  6 20:34:56 sysresccd rpc.statd[2154]: Running as root.  chown /var/lib/nfs to choose different user
Apr  6 20:34:56 sysresccd rpc.statd[2154]: failed to create RPC listeners, exiting
Apr  6 20:34:56 sysresccd /etc/init.d/autorun[2125]: ERROR: autorun failed to start
Apr  6 20:35:04 sysresccd kernel: [  261.026004] eth1: no IPv6 routers present
Apr  6 20:55:05 sysresccd -- MARK --
Apr  6 21:15:05 sysresccd -- MARK --
Apr  6 21:35:05 sysresccd -- MARK --
Apr  6 21:55:05 sysresccd -- MARK --


On the server (Ubuntu 8.04), I can tell from the wireshark capture that protocol is NFS V3 over UDP, then switches to NFS V4 over TCP. There are a lot of retransmissions after "Succesfully mounted the NFS filesystem", but nothing in the server logs. The tail end of the wireshark capture looks like this:

Code: Select all

397.174809 192.168.220.2 -> 192.168.220.130 NFS V3 READ Reply (Call In 203105) Len:16384
397.175179 192.168.220.2 -> 192.168.220.130 IP Fragmented IP protocol (proto=UDP 0x11, off=0)
397.175185 192.168.220.2 -> 192.168.220.130 IP Fragmented IP protocol (proto=UDP 0x11, off=1480)
397.175190 192.168.220.2 -> 192.168.220.130 IP Fragmented IP protocol (proto=UDP 0x11, off=2960)
397.175194 192.168.220.2 -> 192.168.220.130 IP Fragmented IP protocol (proto=UDP 0x11, off=4440)
397.175199 192.168.220.2 -> 192.168.220.130 IP Fragmented IP protocol (proto=UDP 0x11, off=5920)
397.175203 192.168.220.2 -> 192.168.220.130 IP Fragmented IP protocol (proto=UDP 0x11, off=7400)
397.175208 192.168.220.2 -> 192.168.220.130 IP Fragmented IP protocol (proto=UDP 0x11, off=8880)
397.175212 192.168.220.2 -> 192.168.220.130 IP Fragmented IP protocol (proto=UDP 0x11, off=10360)
397.175217 192.168.220.2 -> 192.168.220.130 IP Fragmented IP protocol (proto=UDP 0x11, off=11840)
397.175222 192.168.220.2 -> 192.168.220.130 IP Fragmented IP protocol (proto=UDP 0x11, off=13320)
397.175226 192.168.220.2 -> 192.168.220.130 IP Fragmented IP protocol (proto=UDP 0x11, off=14800)
397.175230 192.168.220.2 -> 192.168.220.130 NFS V3 READ Reply (Call In 203130) Len:16384
397.176696 192.168.220.130 -> 192.168.220.2 NFS V3 ACCESS Call, FH:0x010e010d
397.176738 192.168.220.2 -> 192.168.220.130 NFS V3 ACCESS Reply (Call In 203191)
397.177061 192.168.220.130 -> 192.168.220.2 NFS V3 LOOKUP Call, DH:0x010e010d/sysrcd.md5
397.243757 192.168.220.2 -> 192.168.220.130 NFS V3 LOOKUP Reply (Call In 203193), FH:0x670f670d
397.243995 192.168.220.130 -> 192.168.220.2 NFS V3 ACCESS Call, FH:0x670f670d
397.244039 192.168.220.2 -> 192.168.220.130 NFS V3 ACCESS Reply (Call In 203195)
397.244281 192.168.220.130 -> 192.168.220.2 NFS V3 READ Call, FH:0x670f670d Offset:0 Len:45
397.244341 192.168.220.2 -> 192.168.220.130 NFS V3 READ Reply (Call In 203197) Len:45
397.245185 192.168.220.130 -> 192.168.220.2 NFS V3 GETATTR Call, FH:0x290f290d
397.245222 192.168.220.2 -> 192.168.220.130 NFS V3 GETATTR Reply (Call In 203199)  Regular File mode:0555 uid:0 gid:0
397.245425 192.168.220.130 -> 192.168.220.2 NFS V3 ACCESS Call, FH:0x290f290d
397.245460 192.168.220.2 -> 192.168.220.130 NFS V3 ACCESS Reply (Call In 203201)
397.245667 192.168.220.130 -> 192.168.220.2 NFS V3 GETATTR Call, FH:0x290f290d
397.245702 192.168.220.2 -> 192.168.220.130 NFS V3 GETATTR Reply (Call In 203203)  Regular File mode:0555 uid:0 gid:0
397.261639 192.168.220.130 -> 192.168.220.2 NFS V3 LOOKUP Call, DH:0x010e010d/isolinux
397.264032 192.168.220.2 -> 192.168.220.130 NFS V3 LOOKUP Reply (Call In 203205), FH:0x260e260c
397.264647 192.168.220.130 -> 192.168.220.2 NFS V3 ACCESS Call, FH:0x260e260c
397.264753 192.168.220.2 -> 192.168.220.130 NFS V3 ACCESS Reply (Call In 203207)
397.267097 192.168.220.130 -> 192.168.220.2 NFS V3 LOOKUP Call, DH:0x260e260c/isolinux.cfg
397.267308 192.168.220.2 -> 192.168.220.130 NFS V3 LOOKUP Reply (Call In 203209), FH:0x1c0d1c0f
397.267832 192.168.220.130 -> 192.168.220.2 NFS V3 LOOKUP Call, DH:0x010e010d/initram.igz
397.267895 192.168.220.2 -> 192.168.220.130 NFS V3 LOOKUP Reply (Call In 203211) Error:NFS3ERR_NOENT
397.270349 192.168.220.130 -> 192.168.220.2 NFS V3 LOOKUP Call, DH:0x010e010d/rescuecd
397.270432 192.168.220.2 -> 192.168.220.130 NFS V3 LOOKUP Reply (Call In 203213) Error:NFS3ERR_NOENT
397.270855 192.168.220.130 -> 192.168.220.2 NFS V3 LOOKUP Call, DH:0x010e010d/rescue64
397.270898 192.168.220.2 -> 192.168.220.130 NFS V3 LOOKUP Reply (Call In 203215) Error:NFS3ERR_NOENT
397.271334 192.168.220.130 -> 192.168.220.2 NFS V3 LOOKUP Call, DH:0x010e010d/altker32
397.271375 192.168.220.2 -> 192.168.220.130 NFS V3 LOOKUP Reply (Call In 203217) Error:NFS3ERR_NOENT
397.271791 192.168.220.130 -> 192.168.220.2 NFS V3 LOOKUP Call, DH:0x010e010d/altker64
397.271831 192.168.220.2 -> 192.168.220.130 NFS V3 LOOKUP Reply (Call In 203219) Error:NFS3ERR_NOENT
407.295465 192.168.220.130 -> 192.168.220.2 TCP ha-cluster > shilp [SYN] Seq=0 Win=5840 Len=0 MSS=1460 TSV=45885 TSER=0 WS=6
407.295507 192.168.220.2 -> 192.168.220.130 TCP shilp > ha-cluster [SYN, ACK] Seq=0 Ack=1 Win=5792 Len=0 MSS=1460 TSV=1081659841 TSER=45885 WS=2
407.295743 192.168.220.130 -> 192.168.220.2 TCP ha-cluster > shilp [ACK] Seq=1 Ack=1 Win=5888 Len=0 TSV=45885 TSER=1081659841
407.295765 192.168.220.130 -> 192.168.220.2 NFS V4 NULL Call[Malformed Packet]
407.295776 192.168.220.2 -> 192.168.220.130 TCP shilp > ha-cluster [ACK] Seq=1 Ack=45 Win=5792 Len=0 TSV=1081659841 TSER=45885
407.295906 192.168.220.2 -> 192.168.220.130 NFS V4 NULL Reply (Call In 203226)[Unreassembled Packet [incorrect TCP checksum]]
407.296113 192.168.220.130 -> 192.168.220.2 TCP ha-cluster > shilp [ACK] Seq=45 Ack=29 Win=5888 Len=0 TSV=45885 TSER=1081659841
407.296366 192.168.220.130 -> 192.168.220.2 NFS V4 COMPOUND Call <EMPTY> PUTROOTFH;GETFH;GETATTR
407.296442 192.168.220.2 -> 192.168.220.130 NFS V4 COMPOUND Reply (Call In 203230) <EMPTY> PUTROOTFH
407.296787 192.168.220.130 -> 192.168.220.2 TCP ha-cluster > shilp [FIN, ACK] Seq=157 Ack=77 Win=5888 Len=0 TSV=45886 TSER=1081659841
407.296851 192.168.220.2 -> 192.168.220.130 TCP shilp > ha-cluster [FIN, ACK] Seq=77 Ack=158 Win=5792 Len=0 TSV=1081659841 TSER=45886
407.297039 192.168.220.130 -> 192.168.220.2 TCP ha-cluster > shilp [ACK] Seq=158 Ack=78 Win=5888 Len=0 TSV=45886 TSER=1081659841

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: ar_source=nfs broken in 2.0.1 when booting w/PXE/nfsboot

Postby gernot » 09 Apr 2011, 11:26

i made some tests with other systems.
The problem exist not only in sysrcd.
Using a old suse as server i got the same messages from ubuntu 10.4 while 9.4 mount without problem. Options dont help.

If i find time it goes on...

Gernot

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: ar_source=nfs broken in 2.0.1 when booting w/PXE/nfsboot

Postby gernot » 09 Apr 2011, 16:09

so what. I made some tests with alternate kernel and now both kernel work.
hmmmmm... 8-P

Gernot


Return to “Network Boot via PXE”

Who is online

Users browsing this forum: No registered users and 27 guests