Preseed default PXELinux provisioning template does not boot Ubuntu 20.04

When booting the Ubuntu 20.04 installer, the bellow error appears:

“Booting kernel failed: Invalid argument”

Expected outcome:
The system boots

I have tested using an extremely minimal PXELinux menu. Even with no arguments, the same error appears. I have verified that the initrd and kernel files exist.

What further testing should I do?

The issue appeared to be with the OS install media.

The kernel and initrd does not exist in the TFTP folder, below is what is present in their place.

<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
1 Like

Known bug, Ubuntu no longer ships kernel(initramdisk) in their repos. They confirmed to fix this in the future release, it will be the new installer tho so some changes in Foreman will be required.

1 Like

Do you know of a (possibly manual) workaround (preferably for Ubuntu 22.04 LTS) ?

Yes, one can extract the casper initrd and vmlinuz boot files and hardcode them into a PXELinux template. It’s a bit annoying but possible.

1 Like

I can confirm, we can probably make this easier and better documented, but that’s all we can do about this in the current Foreman design.

So as far as I can see this is “fixed” in the sense that Ubuntu is now publishing “linux” and “initrd.gz” in the netboot images. See: Index of /ubuntu/dists/focal/main/installer-amd64/current/legacy-images/netboot/ubuntu-installer/amd64

Is is now broken in Foreman 3.3.0 with this Fix: Fixes #34565 - fix installation media for Ubuntu versions with autoin… · theforeman/foreman@a1a5664 · GitHub

For myself, I manually reverted that fix and got the installer booting 20.04.

They no longer publish it for the latest versions tho. So what works for you is temporary I assume :frowning:

Does anyone have the steps for extracting initrd, kernel for this handy?

We caught up on our Foreman upgrades and just ran to this. We noticed that we had older initrd & vmlinuz files, and they were all the same size.

We copied the good files over the bad files and then changed the permissions of the files so that Foreman couldn’t overwrite them again, and now the installer seems to work.

root@foreman:/var/lib/tftpboot/boot# ls -latr
-rw-r--r--  1 foreman-proxy foreman-proxy  11657976 Apr 21  2020 ubuntu-mirror-c5UKFnM0aX6y-linux
-rw-r--r--  1 foreman-proxy foreman-proxy  51733440 Apr 21  2020 ubuntu-mirror-c5UKFnM0aX6y-initrd.gz
-rw-r--r--  1 foreman-proxy foreman-proxy  11657976 Apr 21  2020 ubuntu-mirror-LHD1xmkmftXG-linux
-rw-r--r--  1 foreman-proxy foreman-proxy  51733440 Apr 21  2020 ubuntu-mirror-LHD1xmkmftXG-initrd.gz
drwxr-xr-x 11 root          nogroup            4096 May  8 14:58 ..
-rw-r--r--  1 stefanl       sysadmin       51733440 Jul  7 14:07 ubuntu-mirror-rf32u3HGTMZf-initrd
-rw-r--r--  1 stefanl       sysadmin       11657976 Jul  7 14:07 ubuntu-mirror-rf32u3HGTMZf-vmlinuz

Foreman-proxy complains in the logfile, but I can live with that as a workaround.

This lengthy thread discusses how and why Canonical stopped publishing the netboot files for Ubuntu. Some folks are rather frustrated that Canonical stopped supporting a traditional netboot for server installs.