Ubuntu Autoinstall -- No touch installation
Daniel Nashed – 24 November 2025 00:13:07
It took me half a day to get started. But once I got a round tip it is really pretty cool.
Ubuntu has a true autoinstall which incorporates Could Init configuration options as part of it.
https://canonical-subiquity.readthedocs-hosted.com/en/latest/reference/autoinstall-reference.html
I first started with a standard Ubuntu ISO + another small ISO with the configuration on a Proxmox VM.
Resetting the snapshot on Proxmox was very helpful.
Once I got the ISO setup working, I switched over to a physical small Lenovo box booting from a USB stick.
The USB stick setup is even more simple. You can just write a /autoinstall.yaml into the root of the stick.
With this setup I know have the base for building a Domino environment from scratch on Ubuntu.
Below is an example autoinstall.yaml I wrote up over the weekend.
One of the highlights in this configuration is the root ZFS configuration.
The following setup installs a minimal server with essential configuration and SSH.
On purpose I am specifying a static IP configuration. DHCP would even more simple but not what I want for a server.
The devil is in the detail. But if you want to try it out on your own, my sample configuration should give you are starting point.
My new GitHub repository will have more examples including ISO command lines to build the ISO.
-- Daniel
autoinstall:
version: 1
locale: en_US.UTF-8
timezone: Europe/Berlin
keyboard:
layout: de
variant: nodeadkeys
identity:
hostname: nsh-dls01
username: notes
password: "$6$j9BDc..."
ssh:
install-server: true
allow-pw: false
authorized-keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AA...
network:
version: 2
ethernets:
default:
match:
name: "en*"
dhcp4: no
addresses:
- 192.168.1.42/24
routes:
- to: default
via: 192.168.1.1
nameservers:
addresses:
- 1.1.1.1
- 1.0.0.1
storage:
layout:
name: zfs
sizing-policy: all
match:
size: largest
# could be also be only but we want all: security
updates: security
apt:
preserve_sources_list: false
source:
id: ubuntu-server-minimal
packages:
- openssh-server
- vim
user-data:
disable_root: true
package_update: false
package_upgrade: false
write_files:
- path: /etc/ssh/sshd_config.d/99-hardening.conf
content: |
PasswordAuthentication no
ChallengeResponseAuthentication no
UsePAM yes
runcmd:
- systemctl restart ssh
- zfs set atime=off rpool
- zfs set recordsize=32K rpool
- Comments [0]