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
| File | Role |
|---|---|
skel.yaml | Autoinstall 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.sh | Run 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.sh | Same, 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
-
Build the ISO (any Linux box with
xorriso):sed "s#__SSH_PUBKEY__#$(cat id_ed25519_tours.pub)#" skel.yaml > autoinstall.yamlxorriso -osirrox on -indev ubuntu-26.04.1-live-server-amd64.iso -extract /boot/grub/grub.cfg grub.cfgsed -i -e 's/^set timeout=.*/set timeout=3/' \-e '0,/linux[[:space:]]*\/casper\/vmlinuz/s//& autoinstall subiquity.autoinstallpath=\/cdrom\/autoinstall.yaml/' grub.cfgxorriso -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 -
Export it over NFS, read-only, to the BMC addresses only.
-
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/CD1shows"Inserted":truebefore going on PATCH /redfish/v1/Systems/Selfwith theIf-MatchETag:{"Boot":{"BootSourceOverrideEnabled":"Once","BootSourceOverrideTarget":"Cd","BootSourceOverrideMode":"UEFI"}}POST /redfish/v1/Systems/Self/Actions/ComputerSystem.Reset{"ResetType":"ForceRestart"}
-
The installer takes a DHCP address (hostname
ubuntu-serverin the leases). SSH in asroot, check the disks withlsblk -dno NAME,SIZE,MODEL,SERIAL, then:sh mkconf.sh <hostname> /dev/disk/by-id/<disk0> /dev/disk/by-id/<disk1> # or mkconf-single.shtouch /run/calc-goProgress:
grep -o '"state": "[A-Z_]*"' /var/log/installer/subiquity-server-info.log | uniq(RUNNING, thenDONE; the node reboots on its own). -
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,
InsertMediacan 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*.shresolve the links for that reason.