Ubuntu Server autoinstall with a physical machine
There is a great set of articles in the Ubuntu Server guide about how to achieve an unattended installation of Ubuntu Server:
- Automated Server installation
- Automated Server install quickstart
- Automated Server installer config file reference
And I followed those to test my minimal autoinstall file as follows.
#cloud-config
autoinstall:
version: 1
identity:
hostname: ubuntu-server
username: ubuntu
# password=ubuntu
password: "$6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0"
ssh:
install-server: yes # https://launchpad.net/bugs/1974483
allow-pw: no
apt:
geoip: false
kernel:
flavor: generic # or hwe
It works flawlessly with the kvm
command with:
-append 'autoinstall ds=nocloud-net;s=http://_gateway:3003/'
as per the document. However, when it comes to a physical machine installation with the vanilla 22.04 LTS ISO, the installer just stopped at the initial language selection step.
In the end, it was a subtle difference. Without escaping the semicolon, the URL to the autoinstall file is ignored. One missing backslash cost me more than an hour. I provided feedback to the document and I hope it’s a time saver for somebody.