4

I'm wondering if anyone has successfully been able to pass the proper kernel configs to Ubuntu 24.04 LTS to have it automagically boot and install from a working autoinstall.yaml file.

Here are the two configs I've tried, but in both cases the live install flutter installer launches and begins the manual install process:

  • APPEND root=/dev/ram0 ramdisk_size=8388608 url=http://192.168.10.25/images/iso/noble-desktop-amd64iso cloud-init=disabled autoinstall ds=nocloud=net;s=http://192.168.10.25/cloud-init/noble/ cloud-config-url=/dev/null ip=dhcp fschk.mode=skip ---

  • APPEND root=/dev/ram0 ramdisk_size=8388608 url=http://192.168.10.25/images/iso/noble-desktop-amd64iso cloud-init=disabled autoinstall cloud-config-url=http://192.168.10.25/cloud-init/noble/autoinstall.yaml ip=dhcp fschk.mode=skip ---

If I manually pass my autoinstall.yaml file into the installer when it asks, it passes the validation and installs the OS without issue. What I'm trying to figure out is what kernel parameters I need to pass so that the Installer doesn't ask the user any questions and just installs the OS with the configuration defined in the autoinstall.yaml file.

Also for note, I've had to pass the cloud-init=disabled because of this bug: https://bugs.launchpad.net/subiquity/+bug/2062988. And because of the size of the ISO, I've had to increase the size of the ramdisk.

Any help, thoughts or direction would be greatly appreciated.

Zero0ne
  • 125

3 Answers3

3

These kernel parameters worked for me:

url={url-with-ubuntu-iso} autoinstall cloud-config-url=/dev/null "ds=nocloud-net;s={url-where-user-data-is-located}" ip=dhcp

Things to note:

  1. cloud-init is needed for autoinstall to work, so don't add cloud-init=disabled
  2. in some cases (grub?) the ;s=... part is silently ignored, in which case you need to add quotes: "ds=nocloud-net;s=..."
  3. cloud-config-url=/dev/null might be needed if the installer hangs on "starting cloud-service.init"
  4. As pointed out by zero0ne, root=/dev/ram0 ramdisk_size=8388608 might be necessary as well
tgm
  • 31
1

I was able to install Ubuntu 24.04 over PXE. Below are my default file options:

title Ubuntu 22.04
       kernel  /images/ubuntu24.04-server/vmlinuz root=/dev/ram0 ramdisk_size=1500000 autoinstall ip=dhcp cloud-config-url=http://192.168.X.Y/ks/user-data  url=http://192.168.X.Y/ubuntu22.04-server/ubuntu-24.04.1-live-server-amd64.iso ds=nocloud;s=http=//192.168.X.Y/
       initrd  /images/ubuntu22.04-server/initrd

ds=nocloud-net will be deprecated in the next version of Ubuntu. I saw this warning in logs, hence using ds=nocloud.

0

I was curious on how you got the desktop installer to launch properly through PXE, mine wasn't doing it despite picking up the iso. I did get it to install using the server ISO instead, and pointed it to a file off a webserver that basically does your autoinstall.yaml.

This is the item off ipxe menu, someone else made it so I don't know the details (it's php), but the entry for 24.04 is this:

:install_ubuntu_24.04
set os_arch amd64
set codename noble
set version_number 24.04
set config http://yourwebserver/noble
set ubuntu_iso_url https://releases.ubuntu.com/24.04/ubuntu-24.04-live-server-amd64.iso

kernel http://yourwebserver/noble/vmlinuz initrd http://yourwebserver/noble/initrd imgargs vmlinuz initrd=initrd ip=dhcp cloud-config-url=/dev/null url=${ubuntu_iso_url} autoinstall ds=nocloud-net;s=${config} boot

In the http://yourwebserver/noble/ is a file called "user-data", which has the contents of the autoinstall.yaml, something like what this user has:

https://blog.local-optimum.net/getting-started-with-autoinstall-on-ubuntu-desktop-24-04-lts-147a1defb2de

If you load the server ISO, it has a smaller footprint, and one of your late-commands in the autoinstall.yaml can push out "ubuntu-desktop" to install.

The vmlinuz and initrd I pulled from the server ISO and placed in my webserver.
I'd include the openssh-server package, and remove the needsrestart, but aside from that you're set.

zx485
  • 2,865