Forgot the --removable flag for grub. Hopefully this finally fixes everything.

This commit is contained in:
Storm Dragon
2025-10-11 16:23:28 -04:00
parent b75afdbb10
commit c73be5aae4

View File

@@ -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