[root tip] Troubleshoot Calamares installer errors

Difficulty: ★★☆☆☆

Lately several topics has been created where user is installing in EFI mode and the system is booted in BIOS mode thus making Calamares boot loader installation fail.

A Calamares grub install error is - in 99% of the topics - due to having Legacy boot (CSM) enabled in the systems firmware.

Messages can be like these examples

Command ‘grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Manjaro --force’ returned non-zero exit status 1.
Installing for x86_64-efi platform. grub-install: error: /boot/efi doesn’t look like an EFI partition.

Command ‘grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Manjaro --force’ returned non-zero exit status 1.
Installing for x86_64-efi platform. Could not prepare Boot variable: Input/output error grub-install: error: efibootmgr failed to register the boot entry: Input/output error.

A manual rebuild of grub may yield this message

EFI variables are not suppoted on this system

Solution

Always install Manjaro the same mode as the system is booted.

Manjaro recommends to always disable Legacy boot (Compatibility mode aka CSM) in your systems firmware.

Another reason

Command ‘grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Manjaro --force’ returned non-zero exit status 1. Installing for x86_64-efi platform. Could not prepare Boot variable: No space left on device grub-install: error: efibootmgr failed to register the boot entry: Input/output error.

The firmware storage is probably limited so it could be necessary to remove entries from the firmware. If the result of below command returns an unreasonable long list - a cleanup is needed.

$ efibootmgr           
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0009,0003,0004
Boot0000* manjaro
Boot0003* Generic Usb Device
Boot0004* CD/DVD Device
Boot0009* UEFI OS

efibootmgr

Be careful with the tool - it has a lot of options and has potential to wreck your system.

Example of such entry removal. Remember - the following command must be run as root or using sudo. To remove a bootentry Boot0020 use the hexadecimal value following Boot.

# efibootmgr -B -b 0020

To remove duplicate entries

# efibootmgr -D

Run Calamares in debug mode

To get more detalied information during the installation you can launch Calamares in debug mode from the terminal.

sudo calamares -d
7 Likes