Make the two USB sticks
By the end of this page you have an installer stick and a settings stick. Together they install Ubuntu on the box without asking you anything but one word.
Build a boxTwo sticks, two jobs #
Ubuntu's installer runs unattended if it finds a second drive named CIDATA holding its answers. So you make two sticks:
- The installer stick, 8 GB or more, holding the Ubuntu Server image.
- The settings stick, any size, holding two small files the playbook renders from your settings.
Both sticks are wiped.
The installer stick #
-
Download the latest Ubuntu Server 26.04 LTS image (Server, not Desktop) from
ubuntu.com/download/server, and theSHA256SUMSfile fromreleases.ubuntu.com/26.04, into~/Downloads. -
Check the download. It should print
OKbeside the image's name.On macOS:
Workstation cd ~/Downloads && shasum -a 256 --ignore-missing -c SHA256SUMSOn Linux:
Workstation cd ~/Downloads && sha256sum --ignore-missing -c SHA256SUMS -
Plug in the larger stick and find its disk name. Look for the external disk of the right size.
On macOS:
Workstation diskutil list externalOn Linux:
Workstation lsblk -o NAME,SIZE,MODEL,TRAN -
Write the image to it.
On macOS:
Workstation diskutil unmountDisk /dev/disk4 sudo dd if="$(ls ~/Downloads/ubuntu-26.04*-live-server-amd64.iso | tail -1)" of=/dev/rdisk4 bs=4m diskutil eject /dev/disk4ddprints nothing for a few minutes. PressCtrl+Tto see progress.On Linux:
Workstation sudo dd if="$(ls ~/Downloads/ubuntu-26.04*-live-server-amd64.iso | tail -1)" of=/dev/sdX bs=4M status=progress conv=fsync
The settings stick #
-
Render the installer's answers. This reads your login password and disk passphrase from 1Password and your public key from
~/.ssh/id_ed25519.pub, and writes two files toout/cidata/in the recipe folder.Workstation cd ~/nucarium-box && ansible-playbook autoinstall.yml -
Plug in the small stick and find its disk name, as you did above.
-
Format it with the name
CIDATAand copy the two files on.On macOS:
Workstation diskutil eraseDisk FAT32 CIDATA MBRFormat /dev/disk5 cp out/cidata/user-data out/cidata/meta-data /Volumes/CIDATA/ && diskutil eject /dev/disk5On Linux:
Workstation sudo mkfs.vfat -I -n CIDATA /dev/sdX sudo mount /dev/sdX /mnt && sudo cp out/cidata/user-data out/cidata/meta-data /mnt/ && sudo umount /mnt
What the answers say #
The file the installer reads is short. It sets the hostname and your user from your settings, installs the SSH server with your public key and no password login, and takes the largest disk whole:
| Answer | Value |
|---|---|
| Hostname and user | box_name and operator_user from your settings |
| SSH | Server installed, your key authorised, passwords refused |
| Disk | The largest disk, encrypted with your passphrase, with the main volume at full size |
| Updates during install | Security updates only |
| When it finishes | Reboot |