Anxiety about `grub-install`

So I installed the recent 2024-01-02 stable update. Since Manjaro has upgraded from grub to grub2 I see multiple recommendations to run grub-install in the forum. But here’s the problem: I don’t how to run grub-install and I don’t want to risk breaking anything without getting some guidance first. I also have LUKS encryption and I don’t know if this will cause issues or not.

I’m not sure which logs or information to post so please tell me if needed. I installed Manjaro on December 18, 2021 with LUKS encryption (not sure if LUKS2, it’s whatever was default when I installed). I’m booting from UEFI and Secure Boot is disabled. I’m running the second latest LTS kernel (6.1.69-1). I also made some changes to /etc/default/grub at one point to improve security. Here is the output:

# GRUB boot loader configuration

GRUB_CMDLINE_LINUX_DEFAULT="cryptdevice=UUID=[redacted] root=/dev/mapper/luks-[redacted] splash apparmor=1 security=apparmor udev.log_priority=3 slab_nomerge init_on_alloc=1 init_on_free=1 page_alloc.shuffle=1 pti=on randomize_kstack_offset=on vsyscall=none debugfs=off module.sig_enforce=1 lockdown=confidentiality quiet loglevel=0 random.trust_cpu=off intel_iommu=on efi=disable_early_pci_dma"

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices

# Set to 'countdown' or 'menu' to change timeout behavior,
# press ESC key to display menu.

# Uncomment to use basic console

# Uncomment to disable graphical terminal

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command 'videoinfo'

# Uncomment to allow the kernel use the same resolution used by grub

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"

# Uncomment to disable generation of recovery mode menu entries

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.

# Uncomment one of them for the gfx desired, a image background or a gfxtheme

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.

# Uncomment to disable submenus in boot menu

# Uncomment this option to enable os-prober execution in the grub-mkconfig command

# Uncomment to ensure that the root filesystem is mounted read-only so that
# systemd-fsck can run the check automatically. We use 'fsck' by default, which
# needs 'rw' as boot parameter, to avoid delay in boot-time. 'fsck' needs to be
# removed from 'mkinitcpio.conf' to make 'systemd-fsck' work.
# See also Arch-Wiki:

I want to know two things. Firstly, can someone guide me through grub-install? I find the information quite confusing surrounding it and don’t want to mess up my system by any chance. Secondly, is it really necessary? I ask this because I want to know if future updates could break something due to an older grub.

Thank you so much to anyone who helps! :smiley:

manjaro has been on grub (version for a very long time.

Well the thing is that the original command (grub-install) is considered ‘tricky’ by some.
Something like the following command would be needed

grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=manjaro --recheck --force

depending on partitions and system type, etc.

But instead install-grub script was created and put in the repos to try and automate this.
So once you have it installed

sudo pacman -Syu install-grub

Then it will run whenever necessary to update the grub bootloader installed on disk.
You might run it once first

sudo install-grub

Thats it.

See above.
Also see the wiki sections

Yes. If you keep super old grub on the bootloader at some point it will break due to system library changes.


Consider “TimeShift” as a “WayBackMachine” - if something goes wrong

Good suggestions above. I strongly suggest you install TimeShift first & make a back-up. It’s super easy to use & takes the sweat out of updates. There is a small risk associated with encrypted disks but I suggest you take these two suggestions, starting with the TimeShift one. It has worked well for me.

All the best!

1 Like

At some point, if Grub changes to use a new option in grub.cfg, your Grub bootloader will no longer be able to interpret this file correctly. The Arch-wiki explicitly warns against this.

For example at some time, there were changes to Grub that allowed zstd compression to be used. At some point later the standard was switched to zstd compression. After that, individual systems were no longer bootable (because they were not maintained).

It is not beneficial to postpone necessary maintenance work out of fear. (Fear is not a good advisor)

My comment is OFFTOPIC!!!

Fear is the little brother of PANIC…

1 Like

If your system works you dont need to reinstall grub. There are a lot of info out there how grub is maintained on Manjaro. You can also try install-grub which covers most of the cases automatically.


Fear is not a good advisor

Very true :slightly_smiling_face:

Thank you. I’ve updated everything and ran install-grub. Everything is working normally :slightly_smiling_face:

1 Like

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.