Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

GRUB2 --bootloader-id not working

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
20 posts • Page 1 of 1
Author
Message
Ja.KooLit
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 118
Joined: Mon Feb 14, 2022 11:08 am
Location: Somewhere Over There!
Contact:
Contact Ja.KooLit
Website

GRUB2 --bootloader-id not working

  • Quote

Post by Ja.KooLit » Sat Sep 17, 2022 2:15 am

Hey Guys,

So I have 2 Gentoo on my System. One systemd and one openrc installed on separation drive

I have UEFI and when I install grub using grub-install command, I place --bootloader-id so that I can distiguish which system I wanted to.

However, I noticed that both system have UEFI-OS by default.... is this a bug or the command is different?

Thanks
Oh Yeah!!!
Top
alamahant
Advocate
Advocate
Posts: 4034
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Sat Sep 17, 2022 8:33 am

No this is not normal.
The full ivocation should be

Code: Select all

grub-install --target=x86_64-efi --efi-directory=/boot</efi?> --bootloader-id=<Gentoo?> --recheck
Try it with that.
Before rebooting check it out with

Code: Select all

efibootmgr 
Make sure you have

Code: Select all

GRUB_PLATFORMS="efi-64"
in make.conf
If not add it and re-emerge grub.
:)
Top
sMueggli
l33t
l33t
Posts: 627
Joined: Sat Sep 03, 2022 9:22 am

  • Quote

Post by sMueggli » Sat Sep 17, 2022 9:33 am

Please share also the output of

Code: Select all

efibootmgr -v
Where is the ESP mounted? To /boot/efi or /boot?

I would also check the timestamp of the created grubx64.efi in both locations.
Top
Ja.KooLit
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 118
Joined: Mon Feb 14, 2022 11:08 am
Location: Somewhere Over There!
Contact:
Contact Ja.KooLit
Website

  • Quote

Post by Ja.KooLit » Sat Sep 17, 2022 9:45 am

alamahant wrote:No this is not normal.
The full ivocation should be

Code: Select all

grub-install --target=x86_64-efi --efi-directory=/boot</efi?> --bootloader-id=<Gentoo?> --recheck
Try it with that.
Before rebooting check it out with

Code: Select all

efibootmgr 
Make sure you have

Code: Select all

GRUB_PLATFORMS="efi-64"
in make.conf
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
Welll it looks like same...

The two UEFI OS at bottom are my Gentoo..

I chroot at the moment since I was doing something anyway, and not because i have to install grub.

I thought because of the --removable but even then its same

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
Oh Yeah!!!
Top
Ja.KooLit
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 118
Joined: Mon Feb 14, 2022 11:08 am
Location: Somewhere Over There!
Contact:
Contact Ja.KooLit
Website

  • Quote

Post by Ja.KooLit » Sat Sep 17, 2022 9:52 am

hmmmm didnt notice...

it looks like need to install without --removable first

anyway, thanks guys.
Oh Yeah!!!
Top
alamahant
Advocate
Advocate
Posts: 4034
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Sat Sep 17, 2022 9:52 am

grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=UEFI-Gentoo --recheck
This is wrong.
It should be either
/boot or /boot/efi
depending on whether you have just /boot partition or /boot and /boot/efi partitions.
Last edited by alamahant on Sat Sep 17, 2022 9:54 am, edited 1 time in total.
:)
Top
Ja.KooLit
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 118
Joined: Mon Feb 14, 2022 11:08 am
Location: Somewhere Over There!
Contact:
Contact Ja.KooLit
Website

  • Quote

Post by Ja.KooLit » Sat Sep 17, 2022 9:53 am

alamahant wrote:
(chroot) Ja / # grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=UEFI-Gentoo --recheck
This is wrong.
It should be either
/boot or /boot/efi
my esp is /efi which is separate partition
Oh Yeah!!!
Top
alamahant
Advocate
Advocate
Posts: 4034
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Sat Sep 17, 2022 9:56 am

my esp is /efi which is separate partition
Then

Code: Select all

--efi-directory=/boot/efi
is the correct one.
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 like

Code: Select all

/boot/efi/EFI/Gentoo/grubx64.efi
:)
Top
Ja.KooLit
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 118
Joined: Mon Feb 14, 2022 11:08 am
Location: Somewhere Over There!
Contact:
Contact Ja.KooLit
Website

  • Quote

Post by Ja.KooLit » Sat Sep 17, 2022 10:53 am

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.

In any case, atleast I can distiguish now what I can 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
Oh Yeah!!!
Top
Ja.KooLit
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 118
Joined: Mon Feb 14, 2022 11:08 am
Location: Somewhere Over There!
Contact:
Contact Ja.KooLit
Website

  • Quote

Post by Ja.KooLit » Sat Sep 17, 2022 10:59 am

alamahant wrote:
my esp is /efi which is separate partition
Then

Code: Select all

--efi-directory=/boot/efi
is the correct one.
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 like

Code: Select all

/boot/efi/EFI/Gentoo/grubx64.efi
Ok. Well I am not gonna argue with you as I am have been using Gentoo for like a month only.

However, can you point me into Gentoo documentation that says it SHOULD be mounted on /boot directory or /boot partition?

I have been using that method on Arch for more than a few years already and I never had issues.

And also, Arch wiki

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.

Typical 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.
As a long time Arch user, naturally, I refer to what Arch Wiki and my practice, if I cant find any documentations on Gentoo Wiki
Oh Yeah!!!
Top
alamahant
Advocate
Advocate
Posts: 4034
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Sat Sep 17, 2022 11:12 am

So basically you mount esp on /efi and boot on /boot
Correct?
Do 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?
Ah by the way
This

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
seems wrong.
grub-install does not create efi binaries named
GRUBX64.EFI
It uses non-capital letters.
Does the --removable flag cause this?
Last edited by alamahant on Sat Sep 17, 2022 11:26 am, edited 1 time in total.
:)
Top
Ja.KooLit
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 118
Joined: Mon Feb 14, 2022 11:08 am
Location: Somewhere Over There!
Contact:
Contact Ja.KooLit
Website

  • Quote

Post by Ja.KooLit » Sat Sep 17, 2022 11:26 am

alamahant wrote:So basically you mount esp on /efi and boot on /boot
Correct?
Do 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?
I am little bit offended by this :P
Do you have 2 separate partitions?
Are you sure?

and to answer you, yes

Code: 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
                                      /
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 OpenRc
├─nvme1n1p2 259:8 0 1.9G 0 part
├─nvme1n1p3 259:9 0 500G 0 part
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)
Oh Yeah!!!
Top
alamahant
Advocate
Advocate
Posts: 4034
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Sat Sep 17, 2022 11:32 am

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.
:)
Top
Ja.KooLit
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 118
Joined: Mon Feb 14, 2022 11:08 am
Location: Somewhere Over There!
Contact:
Contact Ja.KooLit
Website

  • Quote

Post by Ja.KooLit » Sat Sep 17, 2022 11:50 am

seems wrong.
grub-install does not create efi binaries named
GRUBX64.EFI
It uses non-capital letters.
Does the --removable flag cause this?
hmm the GRUBX64.EFI is Create by Arch GRUB. Didnt touch that today. However, checking the /EFI contents, its all small letters.

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 # 
However, I did noticed the BOOTX64.EFI and this one is with --removable , Which not sure if it is because of --removable...

Both the UEFI-Arch and Gen2-Sys GRUB's were not installed with --removable since they are nvme's and not so easy to remove anyway
Oh Yeah!!!
Top
Ja.KooLit
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 118
Joined: Mon Feb 14, 2022 11:08 am
Location: Somewhere Over There!
Contact:
Contact Ja.KooLit
Website

  • Quote

Post by Ja.KooLit » Sat Sep 17, 2022 11:52 am

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.
No I didnt manually rename any of it....

Unfortunately, I need the --removable on my Gentoo-OpenRc because I plan to use this on my laptop as well. if I dont add --removable, it wont boot to other computers
Oh Yeah!!!
Top
alamahant
Advocate
Advocate
Posts: 4034
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Sat Sep 17, 2022 12:17 pm

I see
Tip: 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.
from
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.
:)
Top
Ja.KooLit
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 118
Joined: Mon Feb 14, 2022 11:08 am
Location: Somewhere Over There!
Contact:
Contact Ja.KooLit
Website

  • Quote

Post by Ja.KooLit » Sat Sep 17, 2022 12:36 pm

alamahant wrote:I see
Tip: 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.
from
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.
Thanks...

Yeah thats what I just did now... thank you very much for your effort

And btw, I stand corrected, I test on my VM an arch base. Apparently, when invoking --removable, the --bootloader-id will be disregarded.
Oh Yeah!!!
Top
sMueggli
l33t
l33t
Posts: 627
Joined: Sat Sep 03, 2022 9:22 am

  • Quote

Post by sMueggli » Sun Sep 18, 2022 10:05 am

You are using 3 different ESPs? Are they on 3 different hard drives?

It does not really matter, where you mount the ESP partition. The Grub default is /boot/efi. It is also possible to abuse the ESP as /boot, which can work fine.

The output of

Code: Select all

grub-install --help
could be better as it is not clear, what the behaviour of --removable means.

In my opinion the behaviour is correct. The option --removable installs Grub into the hardcoded location \EFI\BOOT\BOOTX64.EFI (FAT is kind of case insensitive) and therefore is ignoring the --bootloader-id.

\EFI\BOOT\BOOTX64.EFI is meant for removable devices, but it means, that any other bootloader can overwrite this file as well.
Top
grknight
Retired Dev
Retired Dev
Posts: 2565
Joined: Fri Feb 20, 2015 9:36 pm

  • Quote

Post by grknight » Mon Sep 19, 2022 12:30 pm

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.
No 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
Top
Ja.KooLit
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 118
Joined: Mon Feb 14, 2022 11:08 am
Location: Somewhere Over There!
Contact:
Contact Ja.KooLit
Website

  • Quote

Post by Ja.KooLit » Sun Sep 25, 2022 11:59 am

No 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
Thanks alot for your clarification
Oh Yeah!!!
Top
Post Reply

20 posts • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic