1

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?

1

I faced a similar problem which resulted from incomplete copying of source files, notably a hidden .disk directory was missing - see https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1877618 and also noted here https://ubuntuforums.org/showthread.php?t=2444371&p=13963012#post13963012 - and was solved by using a dot instead of a * wildcard when copying: sudo cp -a /mnt/. /srv/nfs/ubu-20.04-mint-20-cinnamon. My pxelinux.cfg/default file looks like this:

default vesamenu.c32

label 2004
    menu label ^Ubuntu 20.04 Linux Mint 20 Cinnamon
    menu default
    kernel ubu-20.04-mint-20-cinnamon/vmlinuz
    append initrd=ubu-20.04-mint-20-cinnamon/initrd.lz nfsroot=192.168.178.100:/srv/nfs/ubu-20.04-mint-20-cinnamon ro netboot=nfs file=/cdrom/preseed/linuxmint.seed boot=casper ip=dhcp ---
1
  • That has done it, thank you so much. It was all in the .disk directory that was missing from my ubuntu folder. – vagamens Aug 4 '20 at 23:48
1

I think it should it be vmlinuz instead of vlinuz in the KERNEL directive, referencing the bundled virtual memory kernel, assuming you are using ubuntu-20.04-live-server-amd64.iso.

5
  • you are correct. I mistyped that as I was working from outside of my vm where this I am working on getting this working. – vagamens Jul 1 '20 at 5:56
  • Thanks, is it worth marking the answer as accepted so it doesn't show as open on the platform? – danialk Jul 1 '20 at 14:01
  • it did not solve the issue, it was just a typo on my part when copying my file into the input box – vagamens Jul 8 '20 at 17:58
  • @vagamens I have the same problem, did you find a solution? – Aaron Jul 16 '20 at 7:14
  • @Aaron i have not found a solution yet. if you find one, please post here – vagamens Jul 27 '20 at 6:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.