View previous topic :: View next topic |
Author |
Message |
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9645 Location: almost Mile High in the USA
|
Posted: Tue Dec 09, 2014 6:37 pm Post subject: UEFI bootloader |
|
|
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/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Thu Dec 11, 2014 4:53 am Post subject: |
|
|
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 |
|
|
The Doctor Moderator
Joined: 27 Jul 2010 Posts: 2678
|
Posted: Thu Dec 11, 2014 5:43 am Post subject: |
|
|
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 |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9645 Location: almost Mile High in the USA
|
Posted: Thu Dec 11, 2014 9:09 am Post subject: |
|
|
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/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8706 Location: ~Brussels - Belgique
|
Posted: Thu Dec 11, 2014 9:43 am Post subject: |
|
|
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 |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9645 Location: almost Mile High in the USA
|
Posted: Thu Dec 11, 2014 4:04 pm Post subject: |
|
|
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/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
olek Apprentice
Joined: 22 Oct 2011 Posts: 173
|
Posted: Fri Dec 12, 2014 12:30 pm Post subject: |
|
|
You don't need an ebuild for rEFInd. You just put it in your /boot/. _________________ https://plaintext.blog |
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8706 Location: ~Brussels - Belgique
|
Posted: Fri Dec 12, 2014 12:46 pm Post subject: |
|
|
+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 |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9645 Location: almost Mile High in the USA
|
Posted: Mon Dec 15, 2014 6:41 am Post subject: |
|
|
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/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
chithanh Developer
Joined: 05 Aug 2006 Posts: 2158 Location: Berlin, Germany
|
Posted: Mon Dec 15, 2014 11:32 am Post subject: |
|
|
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 |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9645 Location: almost Mile High in the USA
|
Posted: Mon Dec 15, 2014 7:10 pm Post subject: |
|
|
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/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8706 Location: ~Brussels - Belgique
|
Posted: Mon Dec 15, 2014 8:01 pm Post subject: |
|
|
it's bzimage _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9645 Location: almost Mile High in the USA
|
Posted: Mon Dec 15, 2014 8:24 pm Post subject: |
|
|
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/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
|