I am setting up a CentOS 7.2 server so clients can boot a diskless CentOS 7.2 image. I have done this with CentOS 6.6 and it works fine over multiple servers and clients over many years. Using the same configuration parameters.
/var/lib/tftpboot/pxelinux.cfg/default contains:
default menu.c32 prompt 0 timeout 100 TOTALTIMEOUT 300 ONTIMEOUT CentOS MENU TITLE Linux 7.2 PXE Boot Menu LABEL CentOS MENU LABEL CentOS 7.2 x86_64 em1 KERNEL images/centos/x86_64/7.2/vmlinuz-3.10.0-327.el7.x86_64 APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=dhcp nfs=10.0.0.1:/diskless/centos/7.2/root rw quietWhen PXE booting the client it gets quite far, but stops at:
Starting Switch Root... Failed to switch root: Specified switch root path /sysroot does not seem to be an OS tree. os-release file is missing. initrd-switch-root.service: main process exited, code=exited, status=1/FAILURE
This drops me into the emergency shell, and if I look at /sysroot it is an empty directory!
I saved the diskless_initrd.img using
dracut -f diskless_initrd.img `uname -r`
and copying it to the specified location. I also tried "dracut -d nfs -d network" which some suggested.
I don't understand why this works with my CentOS 6.6 server but not here in 7.2.