PXE NFS diskless machine - NFS root filesystem not mounted by systemd

Hi,

I’m trying to get a diskless set up to work (PXE). It is mostly working but upon booting the installed system it drops me into an emergency shell because it couldn’t mount the root filesystem. I can manually continue and boot thereafter.

I use pxelinux to do the PXE stuff and this is how I installed openSUSE (using Factory-Snapshot20140909, since the official 13.1 release iso doesn’t work)

label install64sn

[INDENT=2]kernel pxelinux.cfg/openSUSE-Factory-DVD-x86_64-Snapshot20140909-Media/boot/x86_64/loader/linux
ipappend 2
append
[/INDENT]
[INDENT=3]initrd=pxelinux.cfg/openSUSE-Factory-DVD-x86_64-Snapshot20140909-Media/boot/x86_64/loader/initrd
ip=dhcp
install=nfs://192.168.0.95/volume1/srv/tftpboot/pxelinux.cfg/openSUSE-Factory-DVD-x86_64-Snapshot20140909-Media.iso

[/INDENT]

I then installed the system by mounting only one partition on / in the partition manager: /volume1/srv/tftpboot/pxelinux.cfg/persistent

Then I tried booting the system with various options. The only option (so far) that gets me to an emergency shell from which I’m able to continue is:label o5

[INDENT=2]kernel pxelinux.cfg/persistent/boot/vmlinuz
append
[/INDENT]
[INDENT=3]ip=192.168.0.11:192.168.0.1:255.255.255.0:laptop:em1:off vga=normal
initrd=pxelinux.cfg/persistent/boot/initrd
root=nfs:192.168.0.95:/volume1/srv/tftpboot/pxelinux.cfg/persistent:rw,nolock
[/INDENT]

This drops me into an emergency shell because it cannot mount the root filesystem. This I can manually achieve by typing:root# ifup em1
root# mount -t nfs 192.168.0.95:/volume1/srv/tftpboot/pxelinux.cfg/persistent /sysroot
root# exit

Funny enough, after the ifup em1 the machine has IP address 192.168.0.8 (which is in the PXE range): I have two DNS servers in my network:

  • one serving out addresses to non-pxe requests 192.168.0.100 - 254
  • one serving out addresses to pxe requests 192.168.0.3-8

It seems to go wrong shortly after:
15.711198] linux-pg59 systemd-udevd[300]: renamed network interface eth0 to em1

So either the em1 interface isn’t set up properly, or the renaming action destroys the set-up. Weird.

Anyone a clue as to how this can be fixed?

  • how can I make sure the network set-up is working properly? Is this a bug that makes booting with NFS root filesystem impossible?
  • how can I ensure myself the above steps get executed automatically at the right moment?

Thanks for your input

I meant DHCP servers in stead of DNS servers near the end of my post, of course.

The problem is not in systemd, but in dracut. Also, you are using factory, so it is better to move this post to beta forum.

It seems to go wrong shortly after:

   15.711198] linux-pg59 systemd-udevd[300]: renamed network interface eth0 to em1

Quick way to check it is to add net.ifnames=0 to kernel command line and use interface eth0 instead. This will disable interface renaming.

Sorry to say, but this didn’t prevent interface renaming from happening. I had to add biosdevname=0 to stop renaming. That however didn’t fix things because I still had to manually do ifup eth0 in an emergency shell.

But thanks for pointing me in the right direction (dracut), because this parameter, from the documentation, did do the job

rd.neednet=1

You should open bug report on bugzilla. If root is on NFS I expect dracut to figure this automatically.