From c73be5aae479eaa9fe9112f338a78a6eb78ba747 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sat, 11 Oct 2025 16:23:28 -0400 Subject: [PATCH] Forgot the --removable flag for grub. Hopefully this finally fixes everything. --- usr/local/bin/install_to_disk.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/usr/local/bin/install_to_disk.sh b/usr/local/bin/install_to_disk.sh index c2f986f..f21e51c 100755 --- a/usr/local/bin/install_to_disk.sh +++ b/usr/local/bin/install_to_disk.sh @@ -286,12 +286,19 @@ install_grub() { fi # Install GRUB for UEFI (must succeed) + # Use --removable flag to install to default EFI fallback location log " Installing GRUB for UEFI boot..." - if ! sudo arch-chroot "$mount_point" grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=STORMUX-HDD --recheck 2>&1 | tee -a "$LOGFILE"; then + if ! sudo arch-chroot "$mount_point" grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=STORMUX-HDD --recheck --removable 2>&1 | tee -a "$LOGFILE"; then error_exit "UEFI GRUB installation failed" fi log " UEFI boot installation succeeded" + # Verify /etc/default/grub exists before generating config + if [[ ! -f "$mount_point/etc/default/grub" ]]; then + log_error "/etc/default/grub not found on target system" + error_exit "Cannot generate GRUB config without /etc/default/grub" + fi + # Generate GRUB configuration log " Generating GRUB configuration..." if ! sudo arch-chroot "$mount_point" grub-mkconfig -o /boot/grub/grub.cfg 2>&1 | tee -a "$LOGFILE"; then