Grub Install (UPdate 2023-12-23)

I’ve seen this recommendation for grub update but need support to find the parameters for grub-install …
The MANJARO-Wiki says

root # grub-install --force --target=i386-pc --recheck --boot-directory=/boot /dev/sdy

So far I’ve found for my system

$ sudo fdisk -l /dev/nvme0n1
Gerät              Anfang       Ende   Sektoren Größe Typ
/dev/nvme0n1p1       2048    1050623    1048576  512M EFI-System
/dev/nvme0n1p2    1050624  135268351  134217728   64G Linux Swap
/dev/nvme0n1p3  135268352  202377215   67108864   32G Linux-Dateisystem
/dev/nvme0n1p4  202377216  269486079   67108864   32G Linux-Dateisystem
/dev/nvme0n1p5  269486080  898631679  629145600  300G Linux-Dateisystem
/dev/nvme0n1p6  898631680 1318062079  419430400  200G Linux-Dateisystem
/dev/nvme0n1p7 1318062080 3907028991 2588966912  1,2T Linux-Dateisystem

I guess, the last entry for myself should be
--boot-directory=/boot /dev/nvme0n1p1
Correct? And how to find my “target”?

AFAIK target is just whether it’s 64 or legacy 32 bits. i386-pc is, I think 32 bits, while 64bits is x86_64. You can find yours with"

uname -a

For example:

$ uname -a
Linux Mirdarthos-PC 6.1.69-1-MANJARO #1 SMP PREEMPT_DYNAMIC Thu Dec 21 12:29:38 UTC 2023 x86_64 GNU/Linux

Here you can see mine is x86_64.

Also, official Manjaro is only x86_64 IIRC.

1 Like

When you are using an efi system - as your partition layout suggests - you should use something like this for a Manjaro default system

grub-install --target=x86_64-efi --efi-directory=/boot/efi --recheck --bootloader-id=Manjaro

And subsequently

grub-mkconfig -o /boot/grub/grub.cfg

Due to several topics raising the question I have created a short guide aimed at correctly identifying which method is applicable for a given system.


Thank you, I did

$ uname -a
Linux MYPC 5.15.143-1-MANJARO #1 SMP PREEMPT Wed Dec 13 23:31:52 UTC 2023 x86_64 GNU/Linux

Could I check anything else for my --bootloader-id ?

See @linux-aarhus’ comment :point_up_2:

You can actually drop a couple of things there. Default target in Manjaro is x64 UEFI (per manual page. Interestingly Arch seems to have a different default), so no need to specify the target. And default EFI directory is /boot/efi, so no need also to specify that.

So, for UEFI, you can simply go with:

grub-install --bootloader-id=Manjaro --recheck

The bootloader ID is the identifier that is going to appear in your UEFI’s boot menu. If you want to put anything else, it should’nt be a problem

Thanks again @linux-aarhus, I did:

$ pamac update -a
Wird entfernt (1):
  **grub-update                         2.12rc1.r49.ge58b870ff-2  (Konflikt mit: update-grub)**

# grub-install --target=x86_64-efi --efi-directory=/boot/efi --recheck --bootloader-id=Manjaro
x86_64-efi wird für Ihre Plattform installiert.
**Installation beendet. Keine Fehler aufgetreten.**

# grub-mkconfig -o /boot/grub/grub.cfg
GRUB-Konfigurationsdatei wird erstellt …
Thema gefunden: /usr/share/grub/themes/manjaro/theme.txt
Linux-Abbild gefunden: /boot/vmlinuz-5.15-x86_64
Initrd-Abbild gefunden: /boot/amd-ucode.img /boot/initramfs-5.15-x86_64.img
Found initrd fallback image: /boot/initramfs-5.15-x86_64-fallback.img
Linux-Abbild gefunden: /boot/vmlinuz-5.10-x86_64
Initrd-Abbild gefunden: /boot/amd-ucode.img /boot/initramfs-5.10-x86_64.img
Found initrd fallback image: /boot/initramfs-5.10-x86_64-fallback.img
Linux-Abbild gefunden: /boot/vmlinuz-5.4-x86_64
Initrd-Abbild gefunden: /boot/amd-ucode.img /boot/initramfs-5.4-x86_64.img
Found initrd fallback image: /boot/initramfs-5.4-x86_64-fallback.img
Warnung: Zur Erkennung anderer bootfähiger Partitionen wird os-prober ausgeführt.
Dessen Ausgabe wird zur Erkennung bootfähiger Programmdateien und Erzeugen neuer Boot-Einträge verwendet.
Bootmenü-Eintrag für UEFI-Firmware-Einstellungen wird hinzugefügt …
Found memtest86+ image: /boot/memtest86+/memtest.bin
**/usr/bin/grub-probe: Warnung: Unbekannter Gerätetyp nvme0n1.**

Is there a concern about the warning? Up to now I did not reboot …

One can only speculate when the grub devs includes nvme devices in the list - it is safe to ignore.

Nothing to worry about … it is a warning if unexpected otherwise informational

1 Like

Thanks for quick response, reboot done without any issue.
Thank you so much!

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