Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Efi Stub and gummiboot
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
k_klunz
n00b
n00b


Joined: 03 Dec 2004
Posts: 36
Location: Kaiserslautern, Rheinland-Pfalz, Germany, Europe

PostPosted: Sun Dec 23, 2012 11:04 pm    Post subject: Efi Stub and gummiboot Reply with quote

Hello everyone,

I have a brand new lenovo e330 and decided that for this gentoo-installation its time for me to go the uefi way.
After reading around a bit, especially on http://www.rodsbooks.com/efi-bootloaders/index.html, I am currently trying to get the combination of efi stub and gummiboot to work.

After some tinkering, I am now at a point were gummiboot starts correctly when I turn on my machine. But when I select the menu entry for my gentoo-kernel, nothing whatsoever happens, no Cursor, no text, nothing. I then have to turn off the machine and turn it back on.
Because of the lack of output I have absolutely no idea whats wrong right now.

gummiboot resides in /boot/efi/boot/bootx64.efi
the kernel is located at /boot/gentoo/bzImage.efi
the loader entry in /boot/loader/entries/gentoo.conf looks like this:
Code:
title gentoo
efi /gentoo/bzImage.efi
options root=/dev/sda3


Furthermore I am fairly sure that I have all the necessary things compiled into my kernel, namely:
CONFIG_EFI=y
CONFIG_RELOCATABLE=y
CONFIG_FB_EFI=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_EFI_PARTITION=y
CONFIG_EFI_VARS=y
CONFIG_EFI_STUB=y
CONFIG_CMDLINE="root=/dev/sda3"

For the rest of the installation I basically followed the gentoo handbook.

After reading and playing around a bit I thought the whole process was fairly simple and thought I had understood it. Now I feel like I have forgotten something very basic or done something very stupid.

Either way, any help is greatly appreciated, thanks a lot in advance ;)

Greetings an merry christmas everyone
tobe
Back to top
View user's profile Send private message
srs5694
Guru
Guru


Joined: 08 Mar 2004
Posts: 434
Location: Woonsocket, RI

PostPosted: Sun Dec 23, 2012 11:13 pm    Post subject: Reply with quote

I notice you don't have an initrd. It's possible that you need one -- although if that were the problem, I'd expect your boot to begin and the kernel would then throw an error message, so perhaps this isn't it.....

If you've got a working disk activity LED on your computer, you could watch that when you select the entry. It should light up for a second or two as the firmware loads the kernel. If it doesn't do that (if there's no activity or if it just blinks for a fraction of a second), then that points to a problem with your gummiboot entry. If you see a second or two of disk activity, then that suggests that the kernel is loading but that the EFI stub or early kernel activation is failing. If you see the LED continuing to activate and de-activate, then perhaps the kernel is loading correctly, but you've got video problems.

You could also try launching the kernel in some other way, at least as a test. An EFI shell is one possibility that gives you a lot of flexibility. Another is rEFInd. You can install both of these to launch from gummiboot. Either might conceivably return error messages where gummiboot doesn't -- although if the kernel is launching and then hanging, neither is likely to help. Nonetheless, it's worth trying....
Back to top
View user's profile Send private message
fhaddad78
n00b
n00b


Joined: 21 May 2012
Posts: 68

PostPosted: Mon Dec 24, 2012 2:31 am    Post subject: Reply with quote

I have my system booting properly using only EFI Stub in the kernel, not with gummiboot. However, I did have a similar issue to what you are describing and the only way I could resolve it was by putting the kernel image in the root of the EFI partition. When I had the kernel image, in my case gentoo.img, in a folder named efi, I could not get it to boot no matter what I tried.

For the sake of testing, you can download a file from the net

- https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/ShellBinPkg/UefiShell/X64/Shell.efi

to give you a UEFI shell where you can manually try to boot the kernel. If that works, then your issue is most likely the location of the kernel image or something with your gummiboot configuration. From what I understand of EFI firmware, you should have an option to boot the shell.efi file simply by placing it in the root of your EFI partition. You may need to rename it to shellx64.efi or some other variant. Look in your EFI firmware for details. Also, depending on the version of the EFI firmware, you may need to use version 1 of the UEFI shell.

At first glance, your kernel config looks fine.

Here's what I have enabled in my kernel config:

Enable the block layer --->
- Parition Types --->
-- [*] Advanced parition selection
-- [*] EFI GUID Partition support

Processor type and features --->
- [*] EFI runtime service support
- [*] EFI stub support
- [*] Built-in kernel command line
- (root=/dev/sda3 rw quiet) Built-in kernel command string

I'm using the Intel frame buffer and do NOT have the EFI-based framebuffer support found under [Device Drivers / Graphics support / Support for frame buffer devices] enabled.

UPDATE: I believe since you are using EFI Stub in the kernel, you should probably emerge efibootmgr. This will require you to modify/create /etc/portage/package.accept_keywords and add:
sys-boot/efibootmgr ~amd64
unless you have ~amd64 enabled globally. EFI boot manager will allow you to add a boot entry to your EFI firmware to boot Gentoo without using gummiboot. If you are only using Gentoo and do not need a boot loader/manager, I would recommend this method.
Back to top
View user's profile Send private message
gabrielg
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2012
Posts: 134

PostPosted: Mon Dec 24, 2012 10:49 am    Post subject: Reply with quote

fhaddad78 wrote:
I did have a similar issue to what you are describing and the only way I could resolve it was by putting the kernel image in the root of the EFI partition. When I had the kernel image, in my case gentoo.img, in a folder named efi, I could not get it to boot no matter what I tried.


Same here, using grub or grub2. I suspect I needed to try properly a "set root", but never bothered. kernel is now happy in the root partition.

I tried efibootmgr in a Thinkpad X230 and it didn't quite work well. I could create an entry but not delete it. Luckily, the BIOS let me delete it. I chose to use the standard efi/boot/bootx64.efi and the rest is grub2.
Back to top
View user's profile Send private message
k_klunz
n00b
n00b


Joined: 03 Dec 2004
Posts: 36
Location: Kaiserslautern, Rheinland-Pfalz, Germany, Europe

PostPosted: Tue Dec 25, 2012 3:47 pm    Post subject: Reply with quote

Thank you all for the suggestions.

Off course I'am away for the holidays right now, but I will try again in the coming days.

Thanks again
Tobi
Back to top
View user's profile Send private message
k_klunz
n00b
n00b


Joined: 03 Dec 2004
Posts: 36
Location: Kaiserslautern, Rheinland-Pfalz, Germany, Europe

PostPosted: Mon Jan 07, 2013 10:17 am    Post subject: Reply with quote

Hello again,

I finally went with the easiest of all solutions:
copying the kernel bzImage to /boot/efi/boot/bootx64.efi
I did not have to use efibootmgr or edit any files.
Afaik the only thing thats needed for the bootup to work this way is the CONFIG_CMDLINE="root=/dev/sda3" in the kernel (besides the obvious efi-support-options of course).

Now I dont have the possibility to boot anything else because there is no bootmanager, but thats ok for me.
Everything works fine and the bootup is very fast.
Maybe I will try to get a bootmanager working at some point.

Thanks again for your help
Tobi
Back to top
View user's profile Send private message
fhaddad78
n00b
n00b


Joined: 21 May 2012
Posts: 68

PostPosted: Mon Jan 07, 2013 6:22 pm    Post subject: Reply with quote

Glad its working, but just so you know, you can use 'efibootmgr' to add the item to the UEFI firmware. This will allow you to boot multiple kernels or operating systems.

EDIT: I noticed you referred to your kernel image as bzImage before renaming it to bootx64.efi. Part of the original problem may have been the omission of .efi from the bzImage filename as some firmwares require 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