From da5a59a2e57eb98f269c49081381f0b975174396 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82?= Date: Mon, 17 Aug 2026 18:18:34 +0200 Subject: [PATCH] fix(offline): quoted brace expansion created literal dir, mounts failed The mkdir on line 118 had braces inside double quotes, so bash created a single directory named '{home,var/cache,var/log,.snapshots,boot}' instead of five separate ones. Every subsequent subvolume mount (/home, /var/cache, etc.) then failed. Also: detect EFI vs BIOS boot for grub-install instead of hard-coding x86_64-efi (which bricks under set -eu on BIOS-only machines), and surface mkinitcpio failures instead of swallowing them. --- .../usr/local/bin/antergos-offline-install | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/iso-profiles/antergos/live-overlay/usr/local/bin/antergos-offline-install b/iso-profiles/antergos/live-overlay/usr/local/bin/antergos-offline-install index db8c080..f3fcad3 100755 --- a/iso-profiles/antergos/live-overlay/usr/local/bin/antergos-offline-install +++ b/iso-profiles/antergos/live-overlay/usr/local/bin/antergos-offline-install @@ -115,7 +115,7 @@ estat "Mounting subvolumes..." TARGET=/mnt/target cmd mkdir -p "$TARGET" cmd mount -o subvol=@ "$PART_ROOT" "$TARGET" -cmd mkdir -p "$TARGET/{home,var/cache,var/log,.snapshots,boot}" +cmd mkdir -p "$TARGET"/{home,var/cache,var/log,.snapshots,boot} cmd mount -o subvol=@home "$PART_ROOT" "$TARGET/home" cmd mount -o subvol=@cache "$PART_ROOT" "$TARGET/var/cache" cmd mount -o subvol=@log "$PART_ROOT" "$TARGET/var/log" @@ -154,11 +154,17 @@ cmd mount --bind /run "$TARGET/run" # Generate initramfs estat "Generating initramfs..." -cmd chroot "$TARGET" /bin/bash -c "mkinitcpio -P" 2>/dev/null || true +if ! cmd chroot "$TARGET" /bin/bash -c "mkinitcpio -P"; then + ewarn "mkinitcpio failed — continuing anyway; the rootfs squashfs already ships an initramfs" +fi -# Install GRUB +# Install GRUB (detect EFI vs BIOS boot) estat "Installing GRUB..." -cmd chroot "$TARGET" /bin/bash -c "grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=Antergos" +if [[ -d /sys/firmware/efi/efivars ]]; then + cmd chroot "$TARGET" /bin/bash -c "grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=Antergos" +else + cmd chroot "$TARGET" /bin/bash -c "grub-install --target=i386-pc $DISK" +fi cmd chroot "$TARGET" /bin/bash -c "grub-mkconfig -o /boot/grub/grub.cfg" 2>/dev/null || true # Set hostname and hosts