Forgot the --removable flag for grub. Hopefully this finally fixes everything.
This commit is contained in:
@@ -286,12 +286,19 @@ install_grub() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Install GRUB for UEFI (must succeed)
|
# Install GRUB for UEFI (must succeed)
|
||||||
|
# Use --removable flag to install to default EFI fallback location
|
||||||
log " Installing GRUB for UEFI boot..."
|
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"
|
error_exit "UEFI GRUB installation failed"
|
||||||
fi
|
fi
|
||||||
log " UEFI boot installation succeeded"
|
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
|
# Generate GRUB configuration
|
||||||
log " Generating 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
|
if ! sudo arch-chroot "$mount_point" grub-mkconfig -o /boot/grub/grub.cfg 2>&1 | tee -a "$LOGFILE"; then
|
||||||
|
|||||||
Reference in New Issue
Block a user