[lfs-support] Help with Installing to UEFI Motherboard

Dan McGhee beesnees at grm.net
Sat Nov 16 16:36:29 PST 2013


On 11/16/2013 05:44 PM, Geoff Swan wrote:
>
> On 17/11/2013 10:10 AM, Dan McGhee wrote:
>> On 11/16/2013 03:40 PM, Ken Moffat wrote:
>>> On Sat, Nov 16, 2013 at 02:04:31PM -0500, Alan Feuerbacher wrote:
>>>> Hi,
>>>>
>>>> After getting the stock LFS system installed, with an MBR type boot
>>>> installation, I'm experimenting with installing to a UEFI type boot
>>>> location on a brand new hard drive. I've been reading a lot of online
>>>> documentation, and have tried a first-cut installation, but am not
>>>> having success in installing. While I can install the entire set of LFS
>>>> programs, and a lot of BLFS programs, when I try to boot up, Linux fires
>>>> up but quickly generates a fatal error.
>>>>
>>>> Is there any possibility of advice from the LFS staff?
>>> http://www.mail-archive.com/lfs-support@linuxfromscratch.org/
>>>
>>>    See the posts from Dan McGhee - most recently on 13th November, but
>>> starting on 28th October.  Four threads, titles mentioning GRUB
>>> or EFI.  At the moment they are all on the first page at that link,
>>> at least in firefox.
>>>
>>>    Our best advice / guesses is in those threads.  Dan hasn't cracked
>>> it yet, but your hardware might be different.
>>>
>>> ?en
>> I thought I was going to be able to report success this afternoon, but
>> as yet "no joy."  My efforts so far have resulted in the following
>> conclusions:
>>
>> 1.  There is something wrong in my grub set-up.
>> 2.  My kernel is not bootable.
>> 3.  I have missed something in the EFI info.
>>
>> At this point, all I want is some indication that my kernel is booting.
>> As long as I get only one message from the kernel and the system freezes
>> I can conclude that all else is fine except my kernel.
>>
>> I'm writing this e-mail "on the fly" and don't have my EFI sources at
>> hand.  I read last night that from the EFI partition the bootloader--in
>> this case GRUB--doesn't know where the file system is even though it can
>> read the partition table.  Therefore, and initramfs is called for.  I
>> know nothing about these.  I've read what the BLFS book has and have
>> tried it with no success.  At this point, I don't know enough to solve
>> any "gotcha's" that the initramfs hint gives.  Gonna try dracut.
>>
>> If I can't make any head-way in the next few days, I'm going to install
>> a minimal ArchLinux system and try the various GRUB options.  I don't
>> think they sign their kernels--see last paragraph--and that will test
>> the GRUB stuff.
>>
>> I cannot verify this in any documentation.  It's just a hunch I have.
>> When it comes to booting using an EFI partition, we must ignore
>> everything we've learned about booting and using GRUB.  It may be that
>> using GRUB in a multiboot environment we cannot use the "linux
>> /boot/vmliz* root=/dev/xxx ro" to get to another distro.  We may have to
>> use grub's chainloader to do that.  I say this because, I have not been
>> able to get Ubuntu to boot from my LFS-7.4 system in the "old" way.  I
>> was successful using the chainloader.  If all this is true, then the
>> "easiest" way to accomplish this is to use 'efibootmgr' or 'gummiboot'
>> and boot everything thing we have from the EFI partition.
>>
>> My goal is to be able to be able to answer these questions when my
>> testing is over.
>>
>> @Alan
>> Did you remove GRUB from your MBR Protected Layer or are you still using
>> it?  Do you use an initrd or initramfs?  Did you boot your kernel
>> successfully before you started these EFI experiments?  Does your
>> failure message come from the kernel or from the LFS bootscripts?  What
>> does it say?  Must you do a "hard" reset to start over or can you use
>> ALT-CTRL-DEL?
>>
>> There is only one other option that's keeping me from booting in this
>> environment.  It's so distasteful that I don't even want to write it.
>> But, at least in my firmware, it may be necessary for me to "sign" my
>> kernel.  That's not even for "secure" boot.  I hope that's not true.
>>
>> Dan
>>
>
> Dan,
>
> I could not get EFI and Grub2 to co-operate so I went for the Linux 
> EFI image route instead and eliminated the boot manager. It is not 
> really necessary unless you want to select from different kernels on 
> the system.
>
> The kernel must be compiled with the EFI settings:
>
> 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
>
>
> and also the kernel parameters built-in:
>
> CONFIG_CMDLINE="root=/dev/sda3 ro --verbose"
>
>
> then use efibootmgr to register the new kernel image with the BIOS, so 
> it can be selected at boot time.
>
> Geoff
>
>
>
>
I think efivarfs is new in 3.10.10  "CONFIG_EFIVAR_FS=(y or m)" is what 
I recommend if you're using 3.10.10

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20131116/e531b913/attachment.html>


More information about the lfs-support mailing list