By using autoinstall we could automate the subiquity installer like what preseed
is used for debian-installer
, a.k.a. d-i
.
- Upload your
user-data
to a www server. You may usebasic.yaml
as an example. Renamebasic.yaml
to beuser-data
and put it into a www server to serve it. By usingbasic.yaml
the default username and password will be bothubuntu
. You can change the default username and password by following the instruction in the comment block ofbasic.yaml
. touch <your www server>/meta-data
to create an empty but necessary file required bycloud-init
.- Include the necessary kernel parameters
autoinstall "ds=nocloud-net;s=http://<www-server-url>/"
. For UEFI, it is usually the line oflinux
in yourgrub.cfg
. If you are working onpxelinux.cfg
for legacy mode, please do something similar in yourAPPEND
line. For example,- as is
quiet splash root=/dev/ram0 ramdisk_size=1500000 ip=dhcp url=http://<server-provides-image>/focal-live-server-arm64.iso ---
- to be
quiet splash root=/dev/ram0 ramdisk_size=1500000 ip=dhcp url=http://<server-provides-image>/focal-live-server-arm64.iso autoinstall "ds=nocloud-net;s=http://<server-provides-user-data>/" ---
- as is
- The format of the first line "shebang", a.k.a.
#cloud-config
matters. Do not change it or input extra spaces unless you know what you are doing. - The double quotes matter when injecting
user-data
in the kernel parameters. - The file name
user-data
is a must. Its the file name thatcloud-init
will look for. - The file
meta-data
is also a must, even it is an empty file in our example. - The trailing slash of the url serving
user-data
matters in the current autoinstall version.