Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
A problem with efibootmgr
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Andrey Grozin
n00b
n00b


Joined: 12 Nov 2015
Posts: 4

PostPosted: Sun Oct 06, 2024 5:26 pm    Post subject: A problem with efibootmgr Reply with quote

For a long time, I use efistub kernels. The last one was gentoo-sources-5.6.14. Finally, I've compiled 6.11.1 and copied bzImage (as I always did) to /boot/EFI/Gentoo.

My /boot is mounted on /dev/sda2.

Code:
bilbo ~ # ls /boot/EFI/Gentoo/
bzImage-5.16.14.efi  bzImage-6.11.1.efi


Then I did, as instructed,

Code:
bilbo ~ # efibootmgr -c -L "Gentoo-6.11.1" -l '\EFI\Gentoo\bzImage-6.11.1.efi'
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0002,0001,0000
Boot0000* Windows Boot Manager  HD(2,GPT,d1c57d7e-f924-4f83-a1d7-3868b3e2cff4,0xe1800,0x32000)/\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600
320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000000000100000010000000040000007fff0400
Boot0001* Gentoo-5.16.14        HD(2,GPT,d1c57d7e-f924-4f83-a1d7-3868b3e2cff4,0xe1800,0x32000)/\EFI\GENTOO\BZIMAGE-5.16.14.EFI
Boot0002* Gentoo-6.11.1 HD(1,GPT,89656b86-936e-4711-9832-038a280be148,0x800,0xe1000)/\EFI\Gentoo\bzImage-6.11.1.efi


But why Boot0002 looks different? Why HD(1,GPT,89656b86-936e-4711-9832-038a280be148,0x800,0xe1000) instead of HD(2,GPT,d1c57d7e-f924-4f83-a1d7-3868b3e2cff4,0xe1800,0x32000)? The files bzImage-6.11.1.efi and bzImage-5.16.14.efi are in the same directory.

OK, rebooting, pressing F2, then F8 to get to the boot menu. In the boot menu I see only 2 items:


  • Windows boot manager
  • Gentoo-5.16.14


There is no Gentoo-6.11.1. And

Code:
bilbo ~ # efibootmgr
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001,0000,0002
Boot0000* Windows Boot Manager  HD(2,GPT,d1c57d7e-f924-4f83-a1d7-3868b3e2cff4,0xe1800,0x32000)/\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d00350063006400
64002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000000000100000010000000040000007fff0400
Boot0001* Gentoo-5.16.14        HD(2,GPT,d1c57d7e-f924-4f83-a1d7-3868b3e2cff4,0xe1800,0x32000)/\EFI\GENTOO\BZIMAGE-5.16.14.EFI
Boot0002* Gentoo-6.11.1 VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)


I.e., Boot0002 is some abracadabra instead of the efistub kernel /boot/EFI/Gentoo/bzImage-6.11.1.efi which I put there by the command efibootmgr before the reboot.

Any ideas how to fix this?

Moderator note: Fixed long lines. -- Banana
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4934
Location: Bavaria

PostPosted: Sun Oct 06, 2024 6:25 pm    Post subject: Reply with quote

I guess your ESP is the 2nd partition of your disk (*) ... and you forgot to use parameter "-p 2" when you created your UEFI entry.

*) because the 2 in:
Code:
Boot0001* Gentoo-5.16.14        HD(2,GPT, ...

TBH: I would suggest to NOT create a new entry every time; just have two (main and backup) entries and copy/move the kernels; I did this:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Boot_kernel_via_UEFI#Create_the_necessary_UEFI_entries
and now use:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Boot_kernel_via_UEFI#Cheat_Sheets_for_a_standard_stub_kernel
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Child_of_Sun_24
Guru
Guru


Joined: 28 Jul 2004
Posts: 593

PostPosted: Mon Oct 07, 2024 7:36 am    Post subject: Reply with quote

I have the problem that when two efi entries are in the same directory, my uefi firmware deletes one of it. So i have to use another directory for each entry, maybe it's the same for you.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum