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
  • 1
    Do you webserver logs show any requests? If I "append" cloud-init=disabled with the server installer then my webserver shows no requests for the autoinstall files. I would imagine the desktop installer behaves the same. This is not surprising since cloud-init is what gets the files. With an autoinstall.yaml file I believe you want to use your second config. – Andrew Lowther May 08 '24 at 21:50
  • This has been quite the journey. @AndrewLowther thank you for your suggestion. I can finally see in my apache2 logs where it's grabbing the extra files. What I'm back to now is trying to figure out the proper APPEND string to send. I don't supposed in your journeys you found some documentation regarding when to use autoinstall.yaml vs user-data & meta-data? While I wait for that bug to be resolved I figured I'd try to understand something that has been unclear in all of the current examples. – Zero0ne May 13 '24 at 17:36
  • With the server installer of subiquity the common suggestion has been to create a directory with user-data and meta-data and to use the ds argument. With the desktop installer of subiquity I have observed the common suggestion appears to be to create an autoinstall.yaml file and to use the cloud-config-url argument. Both methods are supported by cloud-init and can be used, so the common suggestions being different is mostly just creating extra confusion. There is some info about the command line arguments at https://askubuntu.com/q/1329734/376778 – Andrew Lowther May 16 '24 at 21:58

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
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center. – Community May 16 '24 at 15:06
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,894