Skip to main content
Part of CALC@HEI, the HEI research computing infrastructure — governance in transition, currently operated by the ISC staff.

Unattended Ubuntu install over the BMC

How cpu01 and filer01 were installed on 2026-11-16: Ubuntu 26.04.1 minimal, from the AMI BMC's virtual CD, without the KVM console (a network glitch on the KVM restarts the install). Works for any AMI MegaRAC BMC with Redfish.

Files​

FileRole
skel.yamlAutoinstall put at the root of the ISO. Its early-commands add the admin SSH key to the installer's root, then wait until /run/calc-go exists.
mkconf.shRun in the waiting installer: writes the final /autoinstall.yaml with software RAID 1 over two disks (EFI partition on each, md0 ext4 on /).
mkconf-single.shSame, one disk (a hardware RAID logical volume, as on filer01).

Both final configs: ubuntu-server-minimal, user calcadmin (key only, sudo without password, no password), root key copied, DHCP on every en* interface, no swap, keyboard ch/fr, Europe/Zurich.

Procedure​

  1. Build the ISO (any Linux box with xorriso):

    sed "s#__SSH_PUBKEY__#$(cat id_ed25519_tours.pub)#" skel.yaml > autoinstall.yaml
    xorriso -osirrox on -indev ubuntu-26.04.1-live-server-amd64.iso -extract /boot/grub/grub.cfg grub.cfg
    sed -i -e 's/^set timeout=.*/set timeout=3/' \
    -e '0,/linux[[:space:]]*\/casper\/vmlinuz/s//& autoinstall subiquity.autoinstallpath=\/cdrom\/autoinstall.yaml/' grub.cfg
    xorriso -indev ubuntu-26.04.1-live-server-amd64.iso -outdev calc.iso \
    -map grub.cfg /boot/grub/grub.cfg -map autoinstall.yaml /autoinstall.yaml -boot_image any replay
  2. Export it over NFS, read-only, to the BMC addresses only.

  3. On each BMC (Redfish, admin):

    • POST /redfish/v1/Managers/Self/Actions/Oem/AMIVirtualMedia.EnableRMedia {"RMediaState":"Enable"}
    • POST .../VirtualMedia/CD1/Actions/VirtualMedia.InsertMedia {"Image":"nfs://<host>/<path>/calc.iso","TransferProtocolType":"NFS","Inserted":true,"WriteProtected":true}
    • check GET .../VirtualMedia/CD1 shows "Inserted":true before going on
    • PATCH /redfish/v1/Systems/Self with the If-Match ETag: {"Boot":{"BootSourceOverrideEnabled":"Once","BootSourceOverrideTarget":"Cd","BootSourceOverrideMode":"UEFI"}}
    • POST /redfish/v1/Systems/Self/Actions/ComputerSystem.Reset {"ResetType":"ForceRestart"}
  4. The installer takes a DHCP address (hostname ubuntu-server in the leases). SSH in as root, check the disks with lsblk -dno NAME,SIZE,MODEL,SERIAL, then:

    sh mkconf.sh <hostname> /dev/disk/by-id/<disk0> /dev/disk/by-id/<disk1> # or mkconf-single.sh
    touch /run/calc-go

    Progress: grep -o '"state": "[A-Z_]*"' /var/log/installer/subiquity-server-info.log | uniq (RUNNING, then DONE; the node reboots on its own).

  5. Eject the CD (VirtualMedia.EjectMedia), stop the NFS export.

Traps​

  • HTTP virtual media fails on these BMCs (the port in the URL is not honoured); use nfs://.
  • After an eject, InsertMedia can answer 202 and leave "Inserted":false; the node then boots its disk. Eject, insert again, check.
  • The path: of a disk in the storage config must be the kernel name (/dev/nvme0n1): a /dev/disk/by-id/… path, or the serial as the BMC prints it, gives "matched no disk". mkconf*.sh resolve the links for that reason.