This script makes an auto-installer for Ubuntu 22.04 Desktop.
This is very similar to Molnár Péter's network-based autoinstall but (a) that needs a network connection, and (b) that installs the server version, then installs more packages to convert it into a desktop version - resulting in an install that's different to an install from the desktop ISO (e.g. network interfaces that aren't managed by NetworkManager)
I also drew inspiration from covertsh's ubuntu autoinstall generator which is far higher effort than my script here!
squashfs
from the desktop ISO, because that's got the desktop packages in it.You might have to tweak things if you want it to line up closely with what you'd get from installing with the Desktop ISO - I'm targeting business laptops, so I've only tested with EFI/secure boot.
I've experimented with two ways to customise the packages in the installation, while still allowing offline installation.
If you want to generate your install ISO without being root, check out the without-root-or-modifying-squashfs
branch. Instead of modifying the squashfs
filesystem images, that branch creates an extra store of packages on the ISO and installs them at install-time.
On the other hand, in this main
branch we modify two squashfs
filesystems, installing the packages once upfront. This makes for a faster install, but you have to run parts of the build process as root.
desktop-squashfs-modifications.sh
for most modifications to the installed Ubuntu image.user-data
for disk layout, disk encryption password, and miscellaneous commands run during install.make-autoinstall-image.sh
scripts the actual creation of the ISO, copying files into the ISO etc.attempt-wifi-connection.sh
for wifi during install (to allow the installation of updates)setup-secureboot-mok.sh
fiddles around with secure boot, setting up a machine owner key