Questions about the install-grub script

I get the same warning.

example
❯ sudo install-grub
[sudo] password for trusktr: 
Grub will be installed on: EFI
Installing for x86_64-efi platform.
Installation finished. No error reported.
Update UEFI Fallback file: /boot/efi/EFI/Manjaro/grubx64.efi
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.12-x86_64
Found initrd image: /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-6.12-x86_64.img
Found initrd fallback image: /boot/initramfs-6.12-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.4-x86_64
Found initrd image: /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-5.4-x86_64.img
Found initrd fallback image: /boot/initramfs-5.4-x86_64-fallback.img
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
Root filesystem isn't btrfs
If you think an error has occurred, please file a bug report at "https://github.com/Antynea/grub-btrfs"
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type nvme1n1.
Found memtest86+ EFI image: /boot/memtest86+/memtest.efi
/usr/bin/grub-probe: warning: unknown device type nvme1n1.
done
Warning: GRUB bootloader at /boot/efi/EFI/Manjaro was updated,
but it seems like you are not using it by default.
Please check your EFI boot priorities!

Does this mean that install-grub is not actually doing anything (not updating the bootloader I’m using)?

(I get the impression some people above think the warning means the “installed” grub is working fine, but actually it means that the “installed” grub is not actually being used.)

I’m assuming that this warning does not happen with a default Manjaro install following the default steps with the default partition layout.

I have a bootloader from 3 years ago (I just updated Manjaro after 3 years), and I’m guessing I see the warnings because something was renamed in the past 3 years? Is that it?

For example I see /boot/efi/EFI/boot/bootx64.efi, and the new /boot/efi/EFI/Manjaro/grubx64.efi.

How do I replace the old one with the new one generated by install-grub? Is it simply the following?

sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Manjaro --recheck
sudo grub-mkconfig -o /boot/grub/grub.cfg

The docs mention --bootloader-id=manjaro (lowercase m). But I see /boot/efi/EFI/Manjaro/grubx64.efi with uppercase M. Is it case insensitive?

It installed without issue.

Next lines are the same as you get from running
update-grub
or
grub-mkconfig -o /boot/grub/grub.cfg
It is the feedback you get when updating the grub configuration file - not grub itself.

Also only the usual warnings - no errors.

1 Like

Yes, I see no errors and successful exit.

But does that mean I am using the new grub setup?

Yes.
There is no new setup if you haven’t changed /etc/default/grub - it’s just an updated boot loader.

What’s the point of the warning then? It sounds as if I’m not using the new grub. But actually I am? How do I verify it?

As per documentation on the same page, --removable will update the default fallback which it seems you are currently using (/boot/efi/EFI/boot/bootx64.efi). As the name says, it is thought to be used on removable drives or in case of corruption. Of course, some OSes abuse it (the name start with Win- and ends with -dows). But it is generally a bad practice.
It is a lot better if every OS has its bootloader in a separate folder (/boot/efi/EFI/Manjaro/grubx64.efi). Me personally, i have installed an EFI shell as fallback. Another nice option is to put a copy of rEFInd there, because it scans everything plug and play.

So, as the hint text says, go into your “BIOS”(UEFI) settings and check the boot order. Most firmwares show the fallback entry as a disk name or “efi os” or something similar generic. The manjaro entry in the manjaro folder will be called Manjaro (as per --bootloader-id above)

Which warning?
There was none - not at the step where grub was reinstalled.
Only after - when the configuration was re-created.
… two separate steps

efibootmgr will tell you.

Considering that the EFI system partition is formatted as a FAT-derivative — usually vfat — it is indeed a case-insensitive filesystem, albeit case-retentive. :wink:

1 Like

This is not true for (some, not all) end users of Manjaro. To them, there is a single command being executed here:

install-grub

and with this there is a single output seen in the terminal. This UX is meant to hide away any details of grub-* commands, and as such, functions as a whole unit.

If the warning cannot be explained easily to someone using the single command, then the UX is not great.

With efibootmgr I see that the following is at the top of my boot order:

Boot0000* Manjaro	HD(1,GPT,0c0df337-7cfd-bc41-b8c3-f5d365e1b466,0x1000,0x96000)/\EFI\Manjaro\grubx64.efi

and install-grub still shows the same warning.

Is there a bug?

True.

But now you know that that is a script and multiple commands are ran, one after the other.
To automate the task and to help and assist people who struggle with the explanations of the process and stringing the individual commands together …

Read the script, understand it - and improve the UI?
Can you do it?

What is good or better or more or less useful (information) is almost always in the eye of the beholder.

Improvement is always welcome.

You omitted the first 3 lines where the currently booted item and boot order is, so we cannot tell you.

Ah, now I understand what you were hinting at.

❯ efibootmgr
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0000,0001,0002,0004,0005,0003
Boot0000* Manjaro	HD(1,GPT,0c0df337-7cfd-bc41-b8c3-f5d365e1b466,0x1000,0x96000)/\EFI\Manjaro\grubx64.efi
Boot0001* Samsung SSD 980 PRO 1TB-S5P2NG0R234486B	PciRoot(0x0)/Pci(0x1b,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-25-38-B2-11-50-D9-12)4eac0881119f594d850ee21a522c59b21000000049535048
Boot0002* SAMSUNG MZVLB256HAHQ-000H7-S426NX0MC21625	PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-25-38-8C-91-D9-A2-D6)4eac0881119f594d850ee21a522c59b21000000049535048
Boot0003* SAMSUNG MZVLB256HAHQ-000H7-S426NX0MC21625	BBS(HD,SAMSUNG MZVLB256HAHQ-000H7-S426NX0MC21625,0x400)/PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-25-38-8C-91-D9-A2-D6)01001000000049535048
Boot0004* SanDisk USB Flash Drive 4C532000010603103314	PciRoot(0x0)/Pci(0x14,0x0)/USB(4,0)4eac0881119f594d850ee21a522c59b20980000049535048
Boot0005  USB:  	BBS(65535,,0x0)/PciRoot(0x0)/Pci(0x14,0x0)ffff0b80000049535048

I see 0002 is chosen.

Here is what I see in my boot options screen (when I press F9, normally I do not see this screen), with “Manjaro” as the default first option:


These are the options I see in the HP Boot Menu:

  • UEFI-Manjaro
  • UEFI - Samsung SSD 980 PRO
  • Boot from file

Mod edit:- Please avoid posting images when a brief text description will suffice. Be kind to the servers. Image deleted and replaced by text as a practical example.


In Bios options (or whatever it is called, HP calls it “computer setup”) these are the boot options I can configure the order of, with “Manjaro” also being the first option:

There are only two boot options, but one of them is not bootable, it is only a data partition. Only the “Manjaro” option is bootable.

When I run install-grub I see the warning, but from the looks of the above it seems to me like I’m using “Manjaro” (the only bootable option).

Do I need to replace the “Manjaro” option I see in boot options, with the one install-grub created?

Your posts have been moved to a dedicated Support topic.


The same warning as what?

Please become accustomed to using the “Reply” (available under each post) when responding to a particular comment; this helps to avoid confusion.

Note that if you were responding to my post immediately preceding yours, then that warning is likely not the same at all, given that it was a suggestion to change the language (which may or may not have been adopted).


Note that warnings are typically non-critical conditions. To address a few of the warnings from your posted command output;

As this may suggest, os-prober is either not enabled or not installed. To allow os-prober to detect other bootloaders (other operating systems) in a multi-boot scenario the following line should be uncommented in /etc/default/grub:

GRUB_DISABLE_OS_PROBER=false

Although this may seem counter-intuitive at first glance, uncommenting this line will enable os-prober; it is disabled by default.


This isn’t a warning, it’s purely informational.


Some tooling doesn’t (yet) seem to account for relatively new NVMe devices, and faithfully report them as an unknown device type even though they function as expected.


This also seems rather easy to understand (to me) and the message to check your UEFI boot priorities (boot order) is equally obvious; and indeed is what you have done.

I’ll note (purely from observation) that the need to reset the boot order after using the install-grub script does arise occasionally with some hardware combinations. Provided there are no other contributing factors to apparent boot failure, booting directly to BIOS and choosing the preferred default loader will rectify that.


Seems to me there is indeed one entry missing (cause you have 2 Samsung drives, 980 and the non980 which you currently boot). That is strange. Maybe there is something more to tinker in the HP bios…in some other submenu…i do not currently have HP to check.

You have several options:

  • Look again at the bios maybe you oversaw smth and the manjaro entry is not selected or active?
  • Enable os prober as per previous comment (and update grub after that), probably won’t help but cannot hurt
  • Play with efibootmgr - it does have the option to set boot order, but depending on firmware it might not stick
  • Reinstall grub with the long command from the wiki for good measure (note that grub-install and install-grub are not the same inspite of confusingly similar names, maybe the automated manjaro script fails to detect something)
  • Reinstall grub with the long command with --removable instead of the --id option. Which will replace your current failback loader withouth the need to adjust the order (cause we now know you are booting from there)

What exactly is meant by “zfs is not currently supported” on the original announcement for install-grub?

Don’t install if you’re using zfs?
And has that changed since 2023?

efibootmgr shows BootCurrent: 0000 and 0000 is where you’d expect it Boot0000* manjaro HD(3,GPT,8f56517c-146c-5e42-9a84-114368846df6,0x3a28357e,0x102a91)/\EFI\MANJARO\GRUBX64.EFI.

And /boot/efi/EFI/Manjaro/grubx64.efi exists, but with an updated date of Apr 10th 2024…

Running sudo install-grub reports:
WARNING: EFI directory not found! Grub couldn't be installed.

So does it error because I use zfs?

UPDATE: Ran sudo grub-install and grub-mkconfig. grubx64.efi update date is now today.

There were some reports with dual boot and grub newer than 2.12-3. However that release is vulnerable.

Running grub-install directly has updated the binary, so that is dealt with.

I’m still puzzled why install-grub can’t find my efi partition, it looks standard to me.

EDIT to add:
grub-install --version now reports:
grub-install (GRUB) 2:2.12.r260.gaae2ea619-3 the latest available in manjaro repos.

Wish I’d checked that before. EDIT2: Scratch that, grub-install --version just reports the version of grub installed, not the version of the binary in your efi partition.

Should also have pointed out that whilst I use zfs I’m not booting off it. I assume it’s the latter that might cause issues.