fix: deploy-disk.sh --boot argument parsing + installer combo ids

The installer failed with:

    deploy-disk.sh /dev/vda ... workstation --boot
    error: --boot must be bios|efi (got --boot)

Two bugs:

1. deploy-disk.sh treated $4 as the bare boot value, but every caller
   (installer, build-image.sh, install.sh) passes "--boot <val>", so $4
   was the literal "--boot". It now parses "--boot <bios|efi>", accepts a
   bare positional too, and falls back to the BOOT build variable. This
   also fixes build-image.sh / install.sh, which had the same mismatch.

2. installer/arcline-installer built the boot ComboBox with append(id,text)
   arguments swapped, so get_active_id() returned "UEFI (grub-efi-amd64)"
   instead of "efi". Fixed the id/text order.
This commit is contained in:
Blake Ridgway
2026-08-21 20:44:56 -05:00
parent 7a3a245d36
commit 1618897bc2
2 changed files with 13 additions and 3 deletions

View File

@@ -125,8 +125,9 @@ class Installer(Gtk.Window):
# boot mode
self.boot_combo = Gtk.ComboBoxText()
for label, val in (("BIOS (grub-pc)", "bios"), ("UEFI (grub-efi-amd64)", "efi")):
self.boot_combo.append(label, val)
# ComboBoxText.append(id, text) — id is the value we pass to deploy
for val, label in (("bios", "BIOS (grub-pc)"), ("efi", "UEFI (grub-efi-amd64)")):
self.boot_combo.append(val, label)
self.boot_combo.set_active(0)
row_boot = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=8)
row_boot.pack_start(Gtk.Label(label="Boot mode:"), False, False, 0)

View File

@@ -25,7 +25,16 @@ source "$(dirname "${BASH_SOURCE[0]}")/common.sh"
DEV="${1:?usage: deploy-disk.sh <device> <rootfs> <edition> [--boot bios|efi]}"
ROOTFS="${2:?usage: deploy-disk.sh <device> <rootfs> <edition> [--boot bios|efi]}"
EDITION="${3:?usage: deploy-disk.sh <device> <rootfs> <edition> [--boot bios|efi]}"
BOOT="${4:-$BOOT}" # default from the BOOT build variable (see versions.mk)
shift 3
# Optional --boot <bios|efi> (a bare 4th positional is accepted too). Defaults
# to the BOOT build variable (versions.mk / common.sh).
BOOT="${BOOT:-bios}"
if [[ $# -ge 2 && "$1" == "--boot" ]]; then
BOOT="$2"
elif [[ $# -ge 1 ]]; then
BOOT="$1"
fi
require_root "$0" "$@"
validate_edition "$EDITION"