Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved]Struggling with EFI can't efibootmgr the Gentoo entr
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
o'bogamol
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2009
Posts: 91
Location: Detroit, Michigan - The Home of Rock and Roll

PostPosted: Wed Jun 08, 2016 9:08 pm    Post subject: [solved]Struggling with EFI can't efibootmgr the Gentoo entr Reply with quote

Thanks in advance for your help. :)

Lenovo ThinkPad Yoga 11e (the windows version, not the chromebook) The BIOS, does have EFI options in it, so this should be compatible.

the new kernel is compiled with EFI stub support

Code:
# efibootmgr --create --disk /dev/sda --part 2 --label "Gentoo" --loader "\efi\boot\bootx64.efi"

yields error "efibootmgr: EFI variables are not supported on this system.

sda2 is /boot
sda1 is /boot/efi (it is vfat)

Code:
# mount | grep efivars

Yields nothing.

Code:
# mount -t efivars efivars /sys/firmware/efi/efivars

Yields error mount: mount point /sys/firmware/efi/efivars does not exist

Next, I tried to create it myself. :)

Code:
# mkdir /sys/firmware/efi

Yields error mkdir cannot create directory _/sys/firmware/efi_: Operation not permitted

exited Chroot

ran
Code:
modprobe efivars


yields error: modprobe: ERROR: could not insert 'efivars': No such device
_________________
"History began on July 4,1776. Everything before that was a mistake." -Ron Swanson


Last edited by o'bogamol on Fri Jun 10, 2016 7:49 pm; edited 3 times in total
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Wed Jun 08, 2016 9:29 pm    Post subject: Reply with quote

o'bogamol ...

you didn't mention which boot disk, I'll asume gentoo minimal as this doesn't support efibooting ... and so efivars. I suggest you use sysresccd or some other efi capable boot disk.

best ... khay
Back to top
View user's profile Send private message
o'bogamol
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2009
Posts: 91
Location: Detroit, Michigan - The Home of Rock and Roll

PostPosted: Wed Jun 08, 2016 9:39 pm    Post subject: Reply with quote

yep. Minimal disk. Would gentoo admin work? I'd be a lot more comfortable with something gentoo-centric, at the moment.
_________________
"History began on July 4,1776. Everything before that was a mistake." -Ron Swanson
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Wed Jun 08, 2016 10:09 pm    Post subject: Reply with quote

You need to boot in EFI mode, otherwise efivars won't work. It has nothing to do with Gentoo, any Linux media with EFI boot will do.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Thu Jun 09, 2016 1:00 pm    Post subject: Reply with quote

o'bogamol wrote:
yep. Minimal disk. Would gentoo admin work? I'd be a lot more comfortable with something gentoo-centric, at the moment.

o'bogamol ... never used 'admin', so I can't comment. As for sysresccd, it is gentoo based, it even has a /mnt/gentoo ... so you wouldn't notice the difference.

best ... khay
Back to top
View user's profile Send private message
o'bogamol
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2009
Posts: 91
Location: Detroit, Michigan - The Home of Rock and Roll

PostPosted: Thu Jun 09, 2016 2:17 pm    Post subject: Reply with quote

Thanks, guys. I'll try that today and let you know how it went.
_________________
"History began on July 4,1776. Everything before that was a mistake." -Ron Swanson
Back to top
View user's profile Send private message
jonathan183
Guru
Guru


Joined: 13 Dec 2011
Posts: 309

PostPosted: Thu Jun 09, 2016 10:24 pm    Post subject: Reply with quote

systemrescuecd has worked for machines I have tried to boot except one laptop ... and I managed to boot that using the latest Gentoo live DVD - so in my experience it's worth having both ;)
Back to top
View user's profile Send private message
o'bogamol
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2009
Posts: 91
Location: Detroit, Michigan - The Home of Rock and Roll

PostPosted: Fri Jun 10, 2016 7:20 am    Post subject: Reply with quote

I was able to successfully get an entry into the EFI. However it won't boot up, yet. I really like that systemrescuecd. That works nicely.

/dev/sda1 is /boot/efi (fat32) (this should not be in fstab, should it?)
/dev/sda2 is /boot (ext2)
/dev/sda3 is swap
/dev/sda4 is empty space that might end up as Win 10 or something else. Not sure yet, but that's down the road. (currently formated ntfs and zeroed out, but should not be visible, since it's not in fstab)
/dev/sda5 is / (ext4)

here is wgetpaste /etc/fstab

I used a manual kernel (not genkernel) wgetpaste /usr/src/linux/.config. As far as I can tell, all the file systems I use are compiled into the kernel, not as modules. The efi stub stuff is selected as well.
_________________
"History began on July 4,1776. Everything before that was a mistake." -Ron Swanson
Back to top
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 523
Location: Germany

PostPosted: Fri Jun 10, 2016 8:35 am    Post subject: Reply with quote

Really, so far I've tried to use efivars on 3 or 4 PCs with EFI boot and none of them worked. The entries are added to EFI (I can see them in efibootmgr), but any attempt to change the boot order is ignored. I mean, efiboomgr reports that the order was changed, but when I boot, the system still uses the old order, so old entry is booted and efibootmgr shows that the boot order was restored to original one.

So far I've worked around this issue by replacing old loader with mine. In case of Windows this leaves possibility that Windows would replace it back during some update, so I keep the backup at hand :)

I suspect, that the issue with boot order is somehow connected with the BIOS setting of boot order (DVD => Hard Disk etc) but so far I couldn't find any way to overcome it. So, maybe you have the same issue.
Back to top
View user's profile Send private message
o'bogamol
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2009
Posts: 91
Location: Detroit, Michigan - The Home of Rock and Roll

PostPosted: Fri Jun 10, 2016 8:43 am    Post subject: Reply with quote

I actually just figured out that part. The problem was that I misunderstood the handbook and had my boot partition formatted incorrectly. Now dev/sda2 is formatted Fat 32 and contains /boot and /boot/efi

Now I am able to boot up but it hangs at a kernel panic. Better than before. Now at least it's telling me it's broken. :)

Kernel panic says it can't load root block(0,0)
_________________
"History began on July 4,1776. Everything before that was a mistake." -Ron Swanson
Back to top
View user's profile Send private message
chithanh
Developer
Developer


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

PostPosted: Fri Jun 10, 2016 9:26 am    Post subject: Reply with quote

This message usually means that your kernel doesn't have the correct driver for your storage controller or root filesystem.

If you have an NVMe SSD, you need to enable CONFIG_BLK_DEV_NVME. Running "lspci -k" from a LiveCD should tell you which drivers are needed.
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