
Code: Select all
grub-install --target=x86_64-efi --efi-directory=/boot</efi?> --bootloader-id=<Gentoo?> --recheck
Code: Select all
efibootmgr
Code: Select all
GRUB_PLATFORMS="efi-64"
Code: Select all
efibootmgr -v
alamahant wrote:No this is not normal.
The full ivocation should beTry it with that.Code: Select all
grub-install --target=x86_64-efi --efi-directory=/boot</efi?> --bootloader-id=<Gentoo?> --recheck
Before rebooting check it out withMake sure you haveCode: Select all
efibootmgrin make.confCode: Select all
GRUB_PLATFORMS="efi-64"
If not add it and re-emerge grub.
Code: Select all
(chroot) Ja / # grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=Gentoo --recheck --removable
Installing for x86_64-efi platform.
Installation finished. No error reported.
(chroot) Ja / # efibootmgr
BootCurrent: 0006
Timeout: 1 seconds
BootOrder: 0006,0000,0005,0009,0001,0002,0003
Boot0000* UEFI-Arch HD(1,GPT,411a187d-1885-3b4b-8217-0890de792d0d,0x800,0x32000)/File(\EFI\UEFI-ARCH\GRUBX64.EFI)
Boot0001* UEFI:CD/DVD Drive BBS(129,,0x0)
Boot0002* UEFI:Removable Device BBS(130,,0x0)
Boot0003* UEFI:Network Device BBS(131,,0x0)
Boot0005* Windows Boot Manager HD(1,GPT,f3bd9fc6-b105-4f57-9938-b75e660ada6f,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000061000100000010000000040000007fff0400
Boot0006* UEFI OS HD(1,GPT,411a187d-1885-3b4b-8217-0890de792d0d,0x800,0x32000)/File(\EFI\BOOT\BOOTX64.EFI)0000424f
Boot0009* UEFI OS HD(1,GPT,4f2c4fa7-8f55-4721-9de7-c2a1fdd0649e,0x19000,0x32000)/File(\EFI\BOOT\BOOTX64.EFI)0000424f
(chroot) Ja / # grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=UEFI-Gentoo --recheck --removable
Installing for x86_64-efi platform.
Installation finished. No error reported.
(chroot) Ja / # efibootmgr
BootCurrent: 0006
Timeout: 1 seconds
BootOrder: 0006,0000,0005,0009,0001,0002,0003
Boot0000* UEFI-Arch HD(1,GPT,411a187d-1885-3b4b-8217-0890de792d0d,0x800,0x32000)/File(\EFI\UEFI-ARCH\GRUBX64.EFI)
Boot0001* UEFI:CD/DVD Drive BBS(129,,0x0)
Boot0002* UEFI:Removable Device BBS(130,,0x0)
Boot0003* UEFI:Network Device BBS(131,,0x0)
Boot0005* Windows Boot Manager HD(1,GPT,f3bd9fc6-b105-4f57-9938-b75e660ada6f,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000061000100000010000000040000007fff0400
Boot0006* UEFI OS HD(1,GPT,411a187d-1885-3b4b-8217-0890de792d0d,0x800,0x32000)/File(\EFI\BOOT\BOOTX64.EFI)0000424f
Boot0009* UEFI OS HD(1,GPT,4f2c4fa7-8f55-4721-9de7-c2a1fdd0649e,0x19000,0x32000)/File(\EFI\BOOT\BOOTX64.EFI)0000424f
Code: Select all
(chroot) Ja / # grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=UEFI-Gentoo --recheck
Installing for x86_64-efi platform.
Installation finished. No error reported.
(chroot) Ja / # efibootmgr
BootCurrent: 0006
Timeout: 1 seconds
BootOrder: 0004,0006,0000,0005,0009,0001,0002,0003
Boot0000* UEFI-Arch HD(1,GPT,411a187d-1885-3b4b-8217-0890de792d0d,0x800,0x32000)/File(\EFI\UEFI-ARCH\GRUBX64.EFI)
Boot0001* UEFI:CD/DVD Drive BBS(129,,0x0)
Boot0002* UEFI:Removable Device BBS(130,,0x0)
Boot0003* UEFI:Network Device BBS(131,,0x0)
Boot0004* UEFI-Gentoo HD(1,GPT,4f2c4fa7-8f55-4721-9de7-c2a1fdd0649e,0x19000,0x32000)/File(\EFI\UEFI-Gentoo\grubx64.efi)
Boot0005* Windows Boot Manager HD(1,GPT,f3bd9fc6-b105-4f57-9938-b75e660ada6f,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000061000100000010000000040000007fff0400
Boot0006* UEFI OS HD(1,GPT,411a187d-1885-3b4b-8217-0890de792d0d,0x800,0x32000)/File(\EFI\BOOT\BOOTX64.EFI)0000424f
Boot0009* UEFI OS HD(1,GPT,4f2c4fa7-8f55-4721-9de7-c2a1fdd0649e,0x19000,0x32000)/File(\EFI\BOOT\BOOTX64.EFI)0000424f
This is wrong.grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=UEFI-Gentoo --recheck
Thenmy esp is /efi which is separate partition
Code: Select all
--efi-directory=/boot/efi
Code: Select all
/boot/efi/EFI/Gentoo/grubx64.efi

Code: Select all
╰─ efibootmgr ─╯
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0001,0000,0005,0009
Boot0000* UEFI-Arch HD(1,GPT,411a187d-1885-3b4b-8217-0890de792d0d,0x800,0x32000)/File(\EFI\UEFI-ARCH\GRUBX64.EFI)
Boot0001* Gen2-Sys HD(1,GPT,411a187d-1885-3b4b-8217-0890de792d0d,0x800,0x32000)/File(\EFI\Gen2-Sys\grubx64.efi)
Boot0005* Windows Boot Manager HD(1,GPT,f3bd9fc6-b105-4f57-9938-b75e660ada6f,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000061000100000010000000040000007fff0400
Boot0009* UEFI OS HD(1,GPT,4f2c4fa7-8f55-4721-9de7-c2a1fdd0649e,0x19000,0x32000)/File(\EFI\BOOT\BOOTX64.EFI)0000424f

Ok. Well I am not gonna argue with you as I am have been using Gentoo for like a month only.alamahant wrote:Thenmy esp is /efi which is separate partitionis the correct one.Code: Select all
--efi-directory=/boot/efi
the efi directory should be INSIDE the /boot directory preferably.
ie you should mount the efi partition on /boot/efi folder.
The hierarchy will be likeCode: Select all
/boot/efi/EFI/Gentoo/grubx64.efi
Code: Select all
Tip:
/efi is a replacement[5] for the historical and now discouraged ESP mountpoint /boot/efi.
The /efi directory is not available by default, you will need to first create it with mkdir(1) before mounting the ESP to it.
As a long time Arch user, naturally, I refer to what Arch Wiki and my practice, if I cant find any documentations on Gentoo WikiTypical mount points
The simplest scenarios for mounting the EFI system partition are:
mount ESP to /boot. This is the most straightforward method.
This facilitates system maintenance, as /boot is the default path where microcode packages place the CPU microcode initramfs files, and where mkinitcpio places kernels and initramfs images.
This ensures that the above files are accessible to most boot loaders, as not all of them can access files on other volumes.
mount ESP to /efi.
This can be useful for unified kernel images or boot loaders that have file system drivers capable of accessing the kernel(s) and files that are stored elsewhere (typically /boot).
Only the EFI binaries (the boot loader (and optionally drivers) and/or the unified kernel image) will be stored on the ESP, which saves storage space.
mount ESP to /efi and additionally mount an "Extended Boot Loader Partition" (XBOOTLDR) to /boot. This can be useful when a previously created ESP is too small to hold multiple boot loaders and/or kernels but the ESP cannot be easily resized (such as when installing Linux after Windows to dual boot). This method is supported by at least systemd-boot.
Code: Select all
╰─ efibootmgr ─╯
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0001,0000,0005,0009
Boot0000* UEFI-Arch HD(1,GPT,411a187d-1885-3b4b-8217-0890de792d0d,0x800,0x32000)/File(\EFI\UEFI-ARCH\GRUBX64.EFI)
Boot0001* Gen2-Sys HD(1,GPT,411a187d-1885-3b4b-8217-0890de792d0d,0x800,0x32000)/File(\EFI\Gen2-Sys\grubx64.efi)
Boot0005* Windows Boot Manager HD(1,GPT,f3bd9fc6-b105-4f57-9938-b75e660ada6f,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000061000100000010000000040000007fff0400
Boot0009* UEFI OS HD(1,GPT,4f2c4fa7-8f55-4721-9de7-c2a1fdd0649e,0x19000,0x32000)/File(\EFI\BOOT\BOOTX64.EFI)0000424f

alamahant wrote:So basically you mount esp on /efi and boot on /boot
Correct?I am little bit offended by thisDo you have 2 separate partitions?
Are you sure?
Or you have no /boot partition at all?
Breaking up with tradition is nice provided it works.
If it doesn/t plz stick with it.
Many people using Gentoo mount the esp on /boot and separate /boot and /boot/efi partitions are not actively encouraged but not discouraged either.Its up to the user.
BUT most distros booting efi use the /boot /boot/efi scheme.
Now if arch advises people to mount ESP on /efi its fine.
Does it work?
Do you have 2 separate partitions?
Are you sure?
and to answer you, yes
That is how I set up my gentoo. Its the same set up I have been using on Arch. And this is how I set up both on my Gentoo-SystemD and OpenRcCode: Select all
nvme1n1 259:6 0 953.9G 0 disk ├─nvme1n1p1 259:7 0 100M 0 part /efi ├─nvme1n1p2 259:8 0 1.9G 0 part ├─nvme1n1p3 259:9 0 500G 0 part ├─nvme1n1p4 259:10 0 1G 0 part /boot ├─nvme1n1p5 259:11 0 7G 0 part [SWAP] ├─nvme1n1p6 259:12 0 195.3G 0 part └─nvme1n1p7 259:13 0 248.6G 0 part /var /tmp /opt /home /.snapshots /
This is my Arch. Which I plan to shrink and reinstall so Gentoo and Arch have a shared partition for stuff like games, videos, music etc etc etc.. (not as /home)├─nvme1n1p2 259:8 0 1.9G 0 part
├─nvme1n1p3 259:9 0 500G 0 part

hmm the GRUBX64.EFI is Create by Arch GRUB. Didnt touch that today. However, checking the /EFI contents, its all small letters.seems wrong.
grub-install does not create efi binaries named
GRUBX64.EFI
It uses non-capital letters.
Does the --removable flag cause this?
Code: Select all
─ ∅ /efi/EFI ········································································································· ✔ 20:41:29 ─╮
╰─ ls ─╯
Gen2-Sys UEFI-ARCH
╭─ ∅ /efi/EFI ········································································································· ✔ 20:41:30 ─╮
╰─ cd UEFI-ARCH ─╯
╭─ ∅ /efi/EFI/UEFI-ARCH ······························································································· ✔ 20:41:35 ─╮
╰─ ls ─╯
grubx64.efi
╭─ ∅ /efi/EFI/UEFI-ARCH ······························································································· ✔ 20:41:37 ─╮
╰─ cd .. ─╯
╭─ ∅ /efi/EFI ········································································································· ✔ 20:41:52 ─╮
╰─ cd Gen2-Sys ─╯
╭─ ∅ /efi/EFI/Gen2-Sys ································································································ ✔ 20:42:06 ─╮
╰─ ls ─╯
grubx64.efi
╭─ ∅ /efi/EFI/Gen2-Sys ································································································ ✔ 20:42:07 ─╮
╰─ efibootmgr ─╯
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0001,0000,0005,0009
Boot0000* UEFI-Arch HD(1,GPT,411a187d-1885-3b4b-8217-0890de792d0d,0x800,0x32000)/File(\EFI\UEFI-ARCH\GRUBX64.EFI)
Boot0001* Gen2-Sys HD(1,GPT,411a187d-1885-3b4b-8217-0890de792d0d,0x800,0x32000)/File(\EFI\Gen2-Sys\grubx64.efi)
Boot0005* Windows Boot Manager HD(1,GPT,f3bd9fc6-b105-4f57-9938-b75e660ada6f,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000061000100000010000000040000007fff0400
Boot0009* UEFI OS HD(1,GPT,4f2c4fa7-8f55-4721-9de7-c2a1fdd0649e,0x19000,0x32000)/File(\EFI\BOOT\BOOTX64.EFI)0000424f
╭─ ∅ /efi/EFI/Gen2-Sys ································································································ ✔ 20:42:12 ─╮
╰─ cd ─╯
╭─ ~ ·················································································································· ✔ 20:43:04 ─╮
╰─ sudo -i ─╯
Password:
Ja ~ # mount /dev/sdc1
mount: /dev/sdc1: can't find in /etc/fstab.
Ja ~ # mount /dev/sdc1 /mnt
Ja ~ # cd /mnt
Ja /mnt # ls
EFI
Ja /mnt # cd EFI
Ja /mnt/EFI # ls
BOOT
Ja /mnt/EFI # cd BOOT
Ja /mnt/EFI/BOOT # ls
BOOTX64.EFI
Ja /mnt/EFI/BOOT #

No I didnt manually rename any of it....alamahant wrote:Ok then.
Please try with omitting --removable
Yet again I worry about the capital letters.Did you manually rename them?
Plz see above updated post.
fromTip: If you use the option --removable then GRUB will be installed to esp/EFI/BOOT/BOOTX64.EFI (or esp/EFI/BOOT/BOOTIA32.EFI for the i386-efi target) and you will have the additional ability of being able to boot from the drive in case EFI variables are reset or you move the drive to another computer. Usually you can do this by selecting the drive itself similar to how you would using BIOS. If dual booting with Windows, be aware Windows usually places an EFI executable there, but its only purpose is to recreate the UEFI boot entry for Windows. If you are installing GRUB on a Mac, you will have to use this option.

Thanks...alamahant wrote:I seefromTip: If you use the option --removable then GRUB will be installed to esp/EFI/BOOT/BOOTX64.EFI (or esp/EFI/BOOT/BOOTIA32.EFI for the i386-efi target) and you will have the additional ability of being able to boot from the drive in case EFI variables are reset or you move the drive to another computer. Usually you can do this by selecting the drive itself similar to how you would using BIOS. If dual booting with Windows, be aware Windows usually places an EFI executable there, but its only purpose is to recreate the UEFI boot entry for Windows. If you are installing GRUB on a Mac, you will have to use this option.
https://wiki.archlinux.org/title/GRUB
So maybe omit --removable to all linuxes except the openrc one.
Then you will have just 1 "UEFI-OS" entry in efibootmgr.
You will have to re run grub-install in the Gentoo systemd one.
Code: Select all
grub-install --helpNo this is not a bug. --removable does 2 things.Ja.KooLit wrote:Ok so I think I figure out... when adding --removable , means that --bootloader-id function will be disregarded..
Which is weird or a possible bug? Since adding --removable on Arch, set bootloader-id will be considered.

Thanks alot for your clarificationNo this is not a bug. --removable does 2 things.
Installs the grub boot image to the "fallback" location of \EFI\BOOT\BOOTX64.EFI
Bypasses the call to efibootmgr to add an entry to the system firmware which is what bootloader-id will be used for.
This is useful when:
Using a removable device, like a USB drive
Installing when booted into Legacy/CSM mode when the EFI variables from the firmware are not accessible