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.

On this page

Two 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 #

  1. Download the latest Ubuntu Server 26.04 LTS image (Server, not Desktop) from ubuntu.com/download/server, and the SHA256SUMS file from releases.ubuntu.com/26.04, into ~/Downloads.

  2. Check the download. It should print OK beside the image's name.

    On macOS:

    Workstation
    cd ~/Downloads && shasum -a 256 --ignore-missing -c SHA256SUMS
    

    On Linux:

    Workstation
    cd ~/Downloads && sha256sum --ignore-missing -c SHA256SUMS
    
  3. Plug in the larger stick and find its disk name. Look for the external disk of the right size.

    On macOS:

    Workstation
    diskutil list external
    

    On Linux:

    Workstation
    lsblk -o NAME,SIZE,MODEL,TRAN
    
  4. 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/disk4
    

    dd prints nothing for a few minutes. Press Ctrl+T to 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 #

  1. 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 to out/cidata/ in the recipe folder.

    Workstation
    cd ~/nucarium-box && ansible-playbook autoinstall.yml
    
  2. Plug in the small stick and find its disk name, as you did above.

  3. Format it with the name CIDATA and 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/disk5
    

    On 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

Next, assemble the box and set the firmware.