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

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
ShanaXXII
Apprentice
Apprentice


Joined: 29 Jun 2014
Posts: 281
Location: Canada

PostPosted: Sun Jun 14, 2015 10:55 pm    Post subject: help with efibootmgr Reply with quote

So I just finished installing gentoo on my new laptop.
I had to use a Ubuntu installcd to install it because the Gentoo cd was not booting.
I have the kernel with EFI support and efi stub support with the built-in command line "root=/dev/sda7"

[/dev/sda1 -- EFI partition][/dev/sda2 -- Windows][/dev/sda3 -- Windows][/dev/sda7 -- Gentoo][/dev/sda4 -- Ubuntu][/dev/sda5 -- data][/dev/sda6 -- data]

I'm not sure if I'm doing this right.

I made my kernel.
Copied it over to /boot/efi/bootx64.efi.
Then I copied that to the EFI partition under \EFI\gentoo\bootx64.efi

Then I did the command: ~ # efibootmgr -c -d /dev/sda -p 7 -L "Gentoo Linux" -l "\efi\gentoo\bootx64.efi"
It added an entry of gentoo into the bootloader and made it first in the bootorder.

I rebooted the computer and had a black screen for about 15 seconds, then it booted into Windows.

What am I doing wrong? ):

Note: I have Ubuntu installed, but I'm planning on deleting it. So I removed the Ubuntu/Grub boot entry and removed the \EFI\ubuntu\ directory in the EFI partition.
Code:
~ # efibootmgr -v
BootCurrent: 000D
Timeout: 0 seconds
BootOrder: 0015,0014,000A,000D,0009,0007,0008,000B,000C,000E,0013
Boot0000  Setup   
Boot0001  Boot Menu   
Boot0002  Diagnostic Splash Screen   
Boot0003  Lenovo Diagnostics   
Boot0004  Startup Interrupt Menu   
Boot0005  Rescue and Recovery   
Boot0006  MEBx Hot Key   
Boot0007* USB CD   030a2400d23878bc820f604d8316c068ee79d25b86701296aa5a7848b66cd49dd3ba6a55
Boot0008* USB FDD   030a2400d23878bc820f604d8316c068ee79d25b6ff015a28830b543a8b8641009461e49
Boot0009* ATAPI CD0   030a2500d23878bc820f604d8316c068ee79d25baea2090adfde214e8b3a5e471856a35401
Boot000A* ATA HDD0   030a2500d23878bc820f604d8316c068ee79d25b91af625956449f41a7b91f4f892ab0f600
Boot000B* ATA HDD1   030a2500d23878bc820f604d8316c068ee79d25b91af625956449f41a7b91f4f892ab0f601
Boot000C* ATA HDD2   030a2500d23878bc820f604d8316c068ee79d25b91af625956449f41a7b91f4f892ab0f602
Boot000D* USB HDD   030a2400d23878bc820f604d8316c068ee79d25b33e821aaaf33bc4789bd419f88c50803
Boot000E* PCI LAN   030a2400d23878bc820f604d8316c068ee79d25b78a84aaf2b2afc4ea79cf5cc8f3d3803
Boot000F* IDER BOOT CDROM   ACPI(a0341d0,0)PCI(16,2)ATAPI(0,1,0)
Boot0010* IDER BOOT Floppy   ACPI(a0341d0,0)PCI(16,2)ATAPI(0,0,0)
Boot0011* ATA HDD   030a2400d23878bc820f604d8316c068ee79d25b91af625956449f41a7b91f4f892ab0f6
Boot0012* ATAPI CD   030a2400d23878bc820f604d8316c068ee79d25baea2090adfde214e8b3a5e471856a354
Boot0013* PCI LAN   030a2400d23878bc820f604d8316c068ee79d25b78a84aaf2b2afc4ea79cf5cc8f3d3803
Boot0014* Windows Boot Manager   HD(1,800,64000,08f5561a-bb51-4446-a952-e9a822694f6b)File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...a................
Boot0015* Gentoo Linux   HD(7,19000000,c800000,57c4c09a-22f7-4d40-87a3-44e5d54825f7)File(\efi\gentoo\bootx64.efi)
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2152
Location: Berlin, Germany

PostPosted: Mon Jun 15, 2015 12:19 am    Post subject: Reply with quote

ShanaXXII wrote:
-p 7
That part is wrong, the partition number must refer to a valid EFI system partition.
Back to top
View user's profile Send private message
ShanaXXII
Apprentice
Apprentice


Joined: 29 Jun 2014
Posts: 281
Location: Canada

PostPosted: Mon Jun 15, 2015 12:24 am    Post subject: Reply with quote

chithanh wrote:
ShanaXXII wrote:
-p 7
That part is wrong, the partition number must refer to a valid EFI system partition.

So you're saying it should be 1 in my case?
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2152
Location: Berlin, Germany

PostPosted: Mon Jun 15, 2015 12:35 am    Post subject: Reply with quote

It must be a FAT32 partition which contains the \efi\gentoo\bootx64.efi file.
If this applies to your partition 1, then yes.
Back to top
View user's profile Send private message
ShanaXXII
Apprentice
Apprentice


Joined: 29 Jun 2014
Posts: 281
Location: Canada

PostPosted: Mon Jun 15, 2015 1:18 am    Post subject: Reply with quote

It still does not seem to be working :/
I tried changing kernel command line to root=PARTUUID=
and nothing.

What else am I missing?
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2152
Location: Berlin, Germany

PostPosted: Mon Jun 15, 2015 11:33 am    Post subject: Reply with quote

First step is to get UEFI to load and execute your kernel. This is being done with efibootmgr (and CONFIG_EFI_STUB). The kernel command line is totally irrelevant to this.
Once you have verified that this step works (ie. the kernel boots but possibly stops with a panic), you can look into issues which can be resolved by root=...

Also please be more specific than "does not seem to be working" when reporting problems.
Back to top
View user's profile Send private message
ShanaXXII
Apprentice
Apprentice


Joined: 29 Jun 2014
Posts: 281
Location: Canada

PostPosted: Mon Jun 15, 2015 11:35 am    Post subject: Reply with quote

chithanh wrote:
First step is to get UEFI to load and execute your kernel. This is being done with efibootmgr (and CONFIG_EFI_STUB). The kernel command line is totally irrelevant to this.

Once you have verified that this step works (ie. the kernel boots but possibly stops with a panic), you can look into issues which can be resolved by root=...

It doesn't even show a panic.
Its just a blank, black screen. ):
And then it boots into Windows.
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2152
Location: Berlin, Germany

PostPosted: Mon Jun 15, 2015 11:38 am    Post subject: Reply with quote

If it boots into Windows that means UEFI has failed to load your kernel.

Try putting another known working UEFI executable in place of the Gentoo kernel, and see whether it is launched on boot. This helps in determining whether your efibootmgr entry or your kernel image is broken.
Back to top
View user's profile Send private message
ShanaXXII
Apprentice
Apprentice


Joined: 29 Jun 2014
Posts: 281
Location: Canada

PostPosted: Mon Jun 15, 2015 8:45 pm    Post subject: Reply with quote

I created a kernel using Genkernel. The only kernel configs I changed were EFI stub support, Built-in command line, filesystem support (removed ext2 and 3) and UEFI via sysfs.
Code:
~ # genkernel --integrated-initramfs --menuconfig all

And it is still booting into windows 7.

Do I need to change the path to '\EFI\gentoo\bootx64.efi' instead of '\efi\gentoo\bootx64.efi'
And does having CSM mode on in the BIOS have anything to do with this?

EDIT: The above didn't fix it
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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