I am trying to set up an automated installation environment for ubuntu 22.04. We have this already working in production for 20.04 and previous LTS releases for many years. We use pxe/isolinux and a tftp and dhcp server to perform the network and cd boot. And some trickery to get uefi working.
I am unable to find working vmlinuz and initrd images which allow me to start an automated ubuntu 22.04 installation using preseeding and the debian installer (d-i).
I use the following to install 20.04, this does not work on 22.04:
linuxefi /path/to/2004/amd64/linux auto=true priority=critical url=http://example.com/ubuntu/2004/amd64/seed_ub_uefi.cfg console-setup/layoutcode=us interface=auto
initrdefi /path/to/2004/amd64/initrd.gz
I have tried extracting the vmlinuz and initrd.gz images from 22.04 ubuntu CD iso images. However no matter what I try it even fails to find a root filesystem. I am guessing the images do not have d-i and preseed functionality built in anymore?
If such images don't exist how would I go about creating my own? I don't feel too happy migrating to whatever automated installation method canonical wants to enforce. Our whole infrastructure is based on the previously mentioned method and we install multiple OSes in a similar way.
Preceeding has been deprecated since 20.04 and was removed in 22.04. Ubuntu is now using autoinstall (also called cloud-init): https://ubuntu.com/server/docs/install/autoinstall
If you need an elaborate working example, take a look at this GitHub repo: https://github.com/lavabit/robox
It uses Packer to generate Vagrant boxes for multiple providers. It has been using autoinstall since Ubuntu 20.10.
Ubuntu already switched to cloud-init in 20.04, they only kept the preseed method for compatibility. Now it's gone for good.
You need to create a .yml file with the filename
user-data
, as specified here.Then you can provide the path to the directory containing the file in grub.cfg.
I provide the file directly on the .iso (in the directory
/nocloud/
), but you can just as easily provide a http location.