Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions archinstall/lib/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1321,11 +1321,15 @@ def _add_grub_bootloader(

try:
SysCommand(command, peek_output=True)
except SysCallError:
try:
SysCommand(command, peek_output=True)
except SysCallError as err:
raise DiskError(f'Could not install GRUB to {self.target}{efi_partition.mountpoint}: {err}')
except SysCallError as err:
if not bootloader_removable:
command.append('--removable')
try:
SysCommand(command, peek_output=True)
except SysCallError:
pass

raise DiskError(f'Could not install GRUB to {self.target}{efi_partition.mountpoint}: {err}') from err
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the fallback branch with --removable will always fall through and raise an exception here. Am I overlooking something?

else:
info(f'GRUB boot partition: {boot_partition.dev_path}')

Expand Down