Discussion:
dracut "mount.nfs: Connection timed out"
Russ Allbery
2013-06-06 20:40:37 UTC
Permalink
Hello folks,

I'm updating our FAI build environment to wheezy and trying to get the
first systems to build, and I'm running into trouble with mounting the NFS
root from the build server. I'm using dracut (rather than live-boot)
since that seems to be the new, preferred option, but it's failing to
mount the NFS root from the FAI build server.

The error I get is:

mount.nfs: Connection timed out
dracut Warning: Could not boot.

Dropping to debug shell.

After the mount fails, mounting the file system from the rescue shell
works fine, so it's not a network problem (at least so far as I can tell):

dracut:/# mount -t nfs leviticus:/srv/fai/wheezy-amd64 /tmp
dracut:/# ls /tmp
bin dev home lib media opt root sbin srv tmp var
boot etc initrc.img lib64 mnt proc run selinux sys usr vmlinuz

I've tried a wide variety of PXE options. The ones I'm currently using,
after conferring with the dracut documentation are:

default fai-generated

label fai-generated
kernel vmlinuz-3.2.0-4-amd64
append initrd=initrd.img-3.2.0-4-amd64 ip=dhcp root=nfs:/srv/fai/wheezy-amd64 aufs FAI_FLAGS=verbose,createvt FAI_CONFIG_SRC=nfs://leviticus/srv/fai/config FAI_ACTION=install FAI_SERIAL=0 HOSTNAME=kerberos-mit

(FAI_SERIAL and HOSTNAME are used internally by our hooks.) It doesn't
seem to get as far as using FAI_CONFIG_SRC; it's failing to mount the root
file system.

I've also tried root=/dev/nfs nfsroot=/srv/fai/wheezy-amd64 (in fact,
that's what I was using initially).

The DHCP options are:

filename=pxelinux.0
next-server=leviticus
tftp-server-name=leviticus

and the kernel loading and whatnot is working fine, so DNS resolution is
working in the boot loader. /proc/cmdline on the system shows the
contents of append from above, so that part is also working.

Does anyone have any ideas what might be going wrong?
--
Russ Allbery (rra at debian.org) <http://www.eyrie.org/~eagle/>
Thomas Lange
2013-06-06 21:31:12 UTC
Permalink
Post by Russ Allbery
mount.nfs: Connection timed out
dracut Warning: Could not boot.
append initrd=initrd.img-3.2.0-4-amd64 ip=dhcp root=nfs:/srv/fai/wheezy-amd64 aufs FAI_FLAGS=verbose,createvt FAI_CONFIG_SRC=nfs://leviticus/srv/fai/config FAI_ACTION=install FAI_SERIAL=0 HOSTNAME=kerberos-mit
This is my line:
append initrd=initrd.img-3.2.0-4-amd64 rw aufs ip=dhcp root=/dev/nfs nfsroot=/srv/fai/nfsroot rd.shell FAI_FLAGS=verbose,sshd,createvt FAI_CONFIG_SRC=nfs://installserver/srv/fai/cskoeln FAI_ACTION=install rd.md=0 rd.dm=0 rd.lvm=0 rd.luks=0

Please check if NFS v3 is used and not NFSv4.
You can also add: rd.debug=1
for debugging.
--
regards Thomas
Clément LAGRANGE
2013-06-07 07:51:02 UTC
Permalink
Hello,
I had to specify the NFS server by IP for the root to mount...
No idea why though.
Regards

On Thu, Jun 6, 2013 at 11:31 PM, Thomas Lange
Post by Thomas Lange
Post by Russ Allbery
mount.nfs: Connection timed out
dracut Warning: Could not boot.
append initrd=initrd.img-3.2.0-4-amd64 ip=dhcp root=nfs:/srv/fai/wheezy-amd64 aufs FAI_FLAGS=verbose,createvt FAI_CONFIG_SRC=nfs://leviticus/srv/fai/config FAI_ACTION=install FAI_SERIAL=0 HOSTNAME=kerberos-mit
append initrd=initrd.img-3.2.0-4-amd64 rw aufs ip=dhcp root=/dev/nfs nfsroot=/srv/fai/nfsroot rd.shell FAI_FLAGS=verbose,sshd,createvt FAI_CONFIG_SRC=nfs://installserver/srv/fai/cskoeln FAI_ACTION=install rd.md=0 rd.dm=0 rd.lvm=0 rd.luks=0
Please check if NFS v3 is used and not NFSv4.
You can also add: rd.debug=1
for debugging.
--
regards Thomas
--
LAGRANGE Cl?ment
06 61 55 35 78
clement.lagrange at gmail.com
Toomas Tamm
2013-06-07 08:46:20 UTC
Permalink
Post by Clément LAGRANGE
Hello,
I had to specify the NFS server by IP for the root to mount...
No idea why though.
I can second that. With wheezy, I had to explicitly specify
nfsroot=XXX.XXX.XXX.XXX:/wrk/fai/nfsroot64 while earlier, just
nfsroot=/wrk/fai/nfsroot64 was enough.

Perhaps this needs to be documented somewhere if it already is not.

Toomas Tamm
Toomas Tamm
2013-06-07 08:56:33 UTC
Permalink
Post by Toomas Tamm
Post by Clément LAGRANGE
Hello,
I had to specify the NFS server by IP for the root to mount...
No idea why though.
I can second that. With wheezy, I had to explicitly specify
nfsroot=XXX.XXX.XXX.XXX:/wrk/fai/nfsroot64 while earlier, just
nfsroot=/wrk/fai/nfsroot64 was enough.
Perhaps this needs to be documented somewhere if it already is not.
I checked my notes and can add some detail. Until squeeze, the system
(live-boot) tried to mount the NFS root from the same IP address as the
TFTP server. In squeeze, however, it (dracut) defaults to the DHCP
server's IP address. In my setup, the DHCP server is separate from the
TFTP+FAI server, so specifying an explicit IP address became necessary.

Toomas
Toomas Tamm
2013-06-07 09:01:02 UTC
Permalink
Post by Toomas Tamm
TFTP server. In squeeze, however, it (dracut) defaults to the DHCP
server's IP address. In my setup, the DHCP server is separate from the
TFTP+FAI server, so specifying an explicit IP address became necessary.
Correction: the latter applies to wheezy, not squeeze.

Toomas
Russ Allbery
2013-06-07 09:33:55 UTC
Permalink
Post by Toomas Tamm
Post by Toomas Tamm
TFTP server. In squeeze, however, it (dracut) defaults to the DHCP
server's IP address. In my setup, the DHCP server is separate from the
TFTP+FAI server, so specifying an explicit IP address became necessary.
Correction: the latter applies to wheezy, not squeeze.
Oh! I'll try that tomorrow. But it's supposed to default to next-server
from the DHCP reply; I assume that's no longer happening?

Thanks for the help!
--
Russ Allbery (rra at debian.org) <http://www.eyrie.org/~eagle/>
Toomas Tamm
2013-06-07 10:01:11 UTC
Permalink
Post by Russ Allbery
Oh! I'll try that tomorrow. But it's supposed to default to next-server
from the DHCP reply; I assume that's no longer happening?
Well, I did not do any extensive debugging. I just wanted to get FAI to
boot. Thus when it refused to mount NFS root, I did some packet
sniffing, discovered it was trying to access the DHCP server for
nfsroot, wrote the correct IP address into TFTP config, and made a small
note into my diary. Things have worked since that time.

next-server does point at the FAI server, which is the same IP ddress as
the TFTP server, and the correct kernel does get loaded. However, the
kernel is loaded by the BIOS, while nfsroot is mounted by the kernel
after another DHCP request. It is entirely possible that the dracut init
scripts are buggy in this respect.

Thus I do not know exactly under which circumstances the situation
arises or how the default address for NFS root is actually determined.
All I can tell is that the host whose IP address it actually used is
running DHCP, LDAP and DNS servers in my setup, and nothing else. There
is a slight chance it goes for the DNS server, but it would make little
sense.

Toomas
Russ Allbery
2013-06-07 18:57:58 UTC
Permalink
Post by Russ Allbery
Post by Toomas Tamm
Post by Toomas Tamm
TFTP server. In squeeze, however, it (dracut) defaults to the DHCP
server's IP address. In my setup, the DHCP server is separate from the
TFTP+FAI server, so specifying an explicit IP address became
necessary.
Correction: the latter applies to wheezy, not squeeze.
Oh! I'll try that tomorrow.
That was it -- that worked like a charm. Thank you so much!
--
Russ Allbery (rra at debian.org) <http://www.eyrie.org/~eagle/>
Loading...