~bento/cloud-init

CloudInit configuration with partitions for Ubuntu 22.04 LTS

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~bento/cloud-init
read/write
git@git.sr.ht:~bento/cloud-init

You can also use your local clone with git send-email.

#CloudInit autoinstall with partition configuration for Ubuntu 22.04 LTS

It is possible to find some examples of CloudInit configuration on the documentation, but it can get hairy when it comes to configuring the partitions and disk layout with autoinstall.

In my scenario, I have some machines with 500 GB SSD and I'd like to have 20% for the OS and 80% as a raw partition with no file system using the autoinstall for a full unattended installation.

After many tries, I've found a tip to do a manual installtion (with a bootable pendrive for example) and do the all the partitioning configuration with the installation wizard. It will create the user-data file needed to replicate the same installation with CloudInit on the other machines.

At the end of the manual installation, you will be asked to reboot/proceed, dont do that. At the top right corner, you can find a Help menu where you can access a shell console.

The file /var/log/installer/autoinstall-user-data contains all your choices from the install wizard in a CloudInit format (it is the user-data file). You can export it to a TMP file share such as file.io:

curl -F "file=@/var/log/installer/autoinstall-user-data" https://file.io
{"success":true,"key":"2ojE41","link":"https://file.io/2ojE41","expiry":"14 days"}

You can then use or customize it for other installations.