I have been attempting to get Ubuntu 20.04 to PXE boot and have run into a similar issue as other folks on here. I have found a few solutions, which include adding
ip=dhcp to the append line in the
pxelinux.cfg/default file, but it still refuses to boot. I have included both the error and my menu for reference. Any and all help is greatly appreciated.
(initramfs) DHCPOFFER of 10.0.0.25 from 10.0.0.1 DHCPREQUEST for 10.0.0.25 on enp0s3 to 255.255.255.255 port 67 (xid=0x6cb408a3) DHCPACK of 10.0.0.25 from 10.0.0.1 (xid=0xa308b46c) bound to 10.0.0.25 -- renewal in 2557 seconds. Begin: Running /scripts/casper-premount ... done done. Begin: Trying to netboot from 10.0.0.9:/netboot/ubuntu/20.04/server ... Begin: Trying nfsmount -o nolock -o ro 10.0.0.9:/netboot/ubuntu/20.04/server /cdrom ... done. Unable to find a live file system on the network.
And the menu:
default vesamenu.c32 prompt 0 timeout 300 ONTIMEOUT 1 menu title ########## OS Deploy ########## label 1 menu label ^1) Ubuntu 20.04 Server kernel ubuntu/20.04/server/casper/vmlinuz initrd ubuntu/20.04/server/casper/initrd append ip=dhcp boot=nfs nfsroot=10.0.0.9:/netboot/ubuntu/20.04/server ro nosplash ---
Everything appears to be working properly until it comes time for initramfs to mount the nfs share (which is exported and available across the network), at which point, it attempts to mount and fails to do so.
Additionally, I can type the nfsmount command that it prints to stdout and it mounts the nfs share just fine, allowing me to browse the share just like I would expect.
Edit: I have made some progress. Having nfsboot=nfs and boot=casper set are incorrect.
nfsboot should not exist and
boot=casper should be
boot=nfs. I have edited both of those in my
pxelinux.cfg/default both here and on my pxe boot server.
I am now running into a separate issue, where in the squashfs is failing to mount as below:
[ 6.596619] /root/cdrom/casper/extras/modules.squashfs-generic: Can't open blockdev mount: mounting /root/cdrom/casper/extras/modules.squashfs-generic on /root/usr/lib/modules failed: Invalid argument mount: mounting /dev on /root/dev failed: no such file or directory mount: mounting /dev on /root/dev failed: No such file or directory done. mount: mounting /run on /root/run failed: No such file or directory run-init: can't execute '/sbin/init': No such file or directory Target filesystem doesn't have requested /sbin/init. run-init: can't execute '/sbin/init': No such file or directory run-init: can't execute '/etc/init': No such file or directory run-init: can't execute '/bin/init': No such file or directory run-init: can't execute '/bin/sh': No such file or directory run-init: can't execute '': No such file or directory No init found. Try passing init= bootarg
From this log output, I would assume that the line that is the root cause is the one that reads
[ 6.596619] /root/cdrom/casper/extras/modules.squashfs-generic: Can't open blockdev
This line tells me that the squashfs is not being mounted properly and that is causing all of the other issues. So my question now, is how do I get the squashfs to mount properly?