Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
UEFI bootloader
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
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7195
Location: almost Mile High in the USA

PostPosted: Tue Dec 09, 2014 6:37 pm    Post subject: UEFI bootloader Reply with quote

I'm trying to prepare a 32-bit "stage 4" install for a uefi32-only machine. Yes it's one of these 'borked' Bay Trail tablets... Currently I'm trying to build in an emulator (which I also need to figure out how to get Tianocore to work with QEMU so I can emulate full UEFI... I suspect this will be faster to build on a Q9550S or i7-2700K than the Atom. However, I'm still pondering about how to deal with the bootloader.

I was trying to install elilo which I use on my ia64 EFI box, but does not appear to compile for x86... Drat.

Are most people just compiling in the EFI stub into the kernel? Grub2 EFI? There appears to be no ebuild for rEFInd or is it somewhere else?
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7553
Location: Goose Creek SC

PostPosted: Thu Dec 11, 2014 4:53 am    Post subject: Reply with quote

There is no ebuild for rEFInd. See http://www.rodsbooks.com/refind/getting.html .
If single booting, an efi_stub kernel is optimal and the only bootloader you will need.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2598

PostPosted: Thu Dec 11, 2014 5:43 am    Post subject: Reply with quote

I didn't want to take this of the unanswered as I have no experience with the hardware.

However, I would bet you don't need any boot loader at all. Chances are great that you can get the built in boot loader to load your kernel without the hassle of maintaining a separate one.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7195
Location: almost Mile High in the USA

PostPosted: Thu Dec 11, 2014 9:09 am    Post subject: Reply with quote

Will need a boot loader or at least something that I can change boot options while trying to debug startup.
Problem being, I highly doubt EFI shell is in firmware.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 8044
Location: ~Brussels - Belgique

PostPosted: Thu Dec 11, 2014 9:43 am    Post subject: Reply with quote

It depends on how frequently you need to debug.

In my case, I have only Gentoo on my UEFI-based machines, so I boot directly the EFI-based kernel. And in case of emergency, I boot a USB key with a rescue system.
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7195
Location: almost Mile High in the USA

PostPosted: Thu Dec 11, 2014 4:04 pm    Post subject: Reply with quote

Or how long I will need to debug...
This is a fairly new platform and I don't expect the hardware to be fully supported by Linux yet...
I expect to have to change kernels quite often.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
olek
Apprentice
Apprentice


Joined: 22 Oct 2011
Posts: 173

PostPosted: Fri Dec 12, 2014 12:30 pm    Post subject: Reply with quote

You don't need an ebuild for rEFInd. You just put it in your /boot/.
_________________
https://plaintext.blog
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 8044
Location: ~Brussels - Belgique

PostPosted: Fri Dec 12, 2014 12:46 pm    Post subject: Reply with quote

+1 for olek.

if this is only for the installation phase, you still have a live linux, don't you ? ;)

For my last machine, I needed to use it 4-5 times, to adjust all parameters (kernel, boot, services). Then it runs and I don't need to liveUsb it.
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7195
Location: almost Mile High in the USA

PostPosted: Mon Dec 15, 2014 6:41 am    Post subject: Reply with quote

Ahhh getting closer. Somehow I built a Grub2 UEFI32 image and got it to actually get to the grub> prompt, but it did not detect any of the disks on the system ('ls' returns nothiing) so I couldn't locate a kernel on my disks (using a USB disk for now.)

rEFInd actually got closer. I think my EFI stub kernel was built wrong. What should these EFI stub show up on 'file' ?

Code:
# file bzImage
bzImage: Linux kernel x86 boot executable bzImage, version 3.16.5-gentoo (root@subaru) #3 SMP Sun Dec 14 07:11:14 Local ti, RO-rootFS, swap_dev 0x3, Normal VGA


When I peeked at the contents of this file it looks like it had the "MZ" magic of a DOS/Windows EXE file but does not match the working grub2 binary I ended up building... This should definitely be the right fingerprint because UEFI32 actually was able to load it:

Code:
# file booti386.efi
booti386.efi: PE32 executable (EFI application) Intel 80386 (stripped to external PDB), for MS Windows


Hmm...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
chithanh
Developer
Developer


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

PostPosted: Mon Dec 15, 2014 11:32 am    Post subject: Reply with quote

One note, EFI stub cannot boot 64 bit kernels on 32 bit UEFI. Having it enabled won't hurt though.

It should however be possible to use 32 bit syslinux to load a 64 bit kernel, as long as the latter has CONFIG_EFI_MIXED enabled.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7195
Location: almost Mile High in the USA

PostPosted: Mon Dec 15, 2014 7:10 pm    Post subject: Reply with quote

Here's one stupid question...

What file is the EFI stubbed binary after building the kernel? :o

/usr/src/linux/arch/x86/boot/vmlinux.bin

/usr/src/linux/arch/x86/boot/bzImage

IIRC I was using /usr/src/linux/vmlinux with elilo on my ia64 box, but in this case I am not using the EFI stub.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 8044
Location: ~Brussels - Belgique

PostPosted: Mon Dec 15, 2014 8:01 pm    Post subject: Reply with quote

it's bzimage
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7195
Location: almost Mile High in the USA

PostPosted: Mon Dec 15, 2014 8:24 pm    Post subject: Reply with quote

Thanks, I ended up also finding this documentation: https://www.kernel.org/doc/Documentation/efi-stub.txt

Unfortunately I probably did not compile the image properly, rEFInd looked kind of dead when I selected the image. I found a few more options, like EFI screen buffer for early printk's ... must have that enabled...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
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