From 1618897bc2ba3307e855b483858928a7d7727137 Mon Sep 17 00:00:00 2001 From: Blake Ridgway Date: Fri, 21 Aug 2026 20:44:56 -0500 Subject: [PATCH] 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 ", so $4 was the literal "--boot". It now parses "--boot ", 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. --- installer/arcline-installer | 5 +++-- scripts/deploy-disk.sh | 11 ++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/installer/arcline-installer b/installer/arcline-installer index cde8629..416984c 100755 --- a/installer/arcline-installer +++ b/installer/arcline-installer @@ -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) diff --git a/scripts/deploy-disk.sh b/scripts/deploy-disk.sh index f134f64..f97a50a 100755 --- a/scripts/deploy-disk.sh +++ b/scripts/deploy-disk.sh @@ -25,7 +25,16 @@ source "$(dirname "${BASH_SOURCE[0]}")/common.sh" DEV="${1:?usage: deploy-disk.sh [--boot bios|efi]}" ROOTFS="${2:?usage: deploy-disk.sh [--boot bios|efi]}" EDITION="${3:?usage: deploy-disk.sh [--boot bios|efi]}" -BOOT="${4:-$BOOT}" # default from the BOOT build variable (see versions.mk) +shift 3 + +# Optional --boot (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"