How To update the system boot after updating grub itself
With the grub update 2023-12-22T23:00:00Z to v2.12, it was thus advised to ensure all parts of grub on the system are populated with the new binary and updated configuration.
This has revealed that a lot of users have doubts on how to correctly identify if their system needs special handling e.g. identifying whether to use EFI or BIOS commands.
This topic is aimed at being a primer to properly assess how to update grub on a system given the type of boot loader installation.
System type
To deduce whether you system is booted in EFI or BIOS mode
List the content of the efi firmware folder
ls /sys/firmware/efi/efivars
If you get an error or an empty list - your system is booted in BIOS mode and you should skip to the bios-section
EFI/GPT system
If your system is EFI you do not have to point the installation to a specific device but rather the $esp mount point.
Finding your efi mountpoint - commonly labelled $esp (Efi System Partition)
$ lsblk -o parttypename,mountpoint | grep -e 'EFI'
EFI System /boot/efi
Reinstall EFI grub
Reinstall grub a default Manjaro Linux EFI system.
This is an example - if your system is different use the mount point for your system.
Run as root (or prefix using sudo)
grub-install --target=x86_64-efi --efi-directory=/boot/efi --recheck --bootloader-id=Manjaro
grub-mkconfig -o /boot/grub/grub.cfg
Sync the fallback EFI loader
According to research one should ensure the EFI fallback image $esp/EFI/boot/bootx64.efi is updated as well. Otherwise your system may fail to boot if your system’s EFI firmware is pointing to the fallback entry.
To check if there is differences list the content (must be root or using sudo)
# ls -l /boot/efi/EFI/Manjaro/grubx64.efi /boot/efi/EFI/boot/bootx64.efi
-rwx------ 1 root root 143360 26 dec 10:11 /boot/efi/EFI/boot/bootx64.efi
-rwx------ 1 root root 143360 26 dec 10:11 /boot/efi/EFI/Manjaro/grubx64.efi
If they are identical no action is needed, however if they are not you need to replace the fallback loader (must be root or using sudo)
cp /boot/efi/EFI/Manjaro/grubx64.efi /boot/efi/EFI/boot/bootx64.efi
BIOS system
The most common BIOS type is using BIOS/MBR.
As a rule of thumb: the device containing your system root will likely be the primary boot device. This may not be true for all systems and if not then you know how to handle this anyway.
lsblk -o path,pttype,parttypename | grep -e 'dos' -e 'BIOS'
The output will show you devices and partitions which may be used to hold your grub bootloader.
NOTE: Keep in mind this is an example - your system will be different and you will have to adapt the following to your result.
BIOS/MBR system
With an output like this example grub is installed to the device Master Boot Record on the device never to the partition
/dev/sdy dos
/dev/sdy1 dos Linux
Reinstall grub on a Manjaro Linux BIOS/MBR system pointing to device MBR
Run as root (or prefix using sudo)
(Don’t forget to replace /dev/sdy with the correct block device name!)
grub-install --target=i386-pc --recheck /dev/sdy
grub-mkconfig -o /boot/grub/grub.cfg
BIOS/GPT system
If you are getting a response like this you are using a BIOS/GPT system and grub is installed to an empty partition
/dev/sdy1 gpt BIOS boot
As grub will locate the bios-grub partition auto-magically when you reinstall grub on a Manjaro Linux BIOS/GPT system pointing to device path.
(Don’t forget to replace /dev/sdy with the correct device name!)
Run as root (or prefix using sudo)
grub-install --target=i386-pc --recheck /dev/sdy
grub-mkconfig -o /boot/grub/grub.cfg
Also see
The following topic is covering a new helper script package providing an automated way of running the checks and update the system as needed.