Re: [lfs-support] Help with Installing to UEFI Motherboard
On 11/16/2013 8:56 PM, Geoff Swan wrote: On 17/11/2013 11:26 AM, Dan McGhee wrote: Just so I understand. You got your kernel--3.10.10 (?)--to boot from the EFI partition? And without initrd or initramfs? The answer to this question is important to me. Yes. 3.10.10. Selectable in the BIOS efi boot manager and boots directly, fast. No initrd or initramfs is needed, I built all the drivers required for the server hardware into the kernel. If you build modules required for boot then you have to make them available in the EFI partition too. I found it easier to build everything into the kernel. Can you tell us exactly what you did to get to this? I mean very precisely, like if I wanted to tell my grandmother how to do it. Alan -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Help with Installing to UEFI Motherboard
On 11/16/2013 6:10 PM, Dan McGhee wrote: 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. About 3 weeks ago, as part of my attempt to learn about UEFI stuff, I successfully installed ArchLinux on another hard drive. I did a lot of reading about UEFI on their website. The installation used their gummiboot boot manager. @Alan Did you remove GRUB from your MBR Protected Layer or are you still using it? I never installed it. Following ArchLinux and the rodsbooks.com website, I've been trying to use the EFI Stub Loader along with Rod Smith's rEFInd boot manager, since he claims it's the most reliable method he's come across. Do you use an initrd or initramfs? I created the latter using the BLFS webpage About initramfs: http://www.linuxfromscratch.org/blfs/view/svn/postlfs/initramfs.html Did you boot your kernel successfully before you started these EFI experiments? No. The LFS installation assumes you're using the standard MBR boot method, but I'm using what appears to be the latest methods: EFI, GPT and LVM. I'm trying to connect the dots. Does your failure message come from the kernel or from the LFS bootscripts? What does it say? The kernel. It dies with a message like ... kernel panic ... Must you do a hard reset to start over or can you use ALT-CTRL-DEL? I have to recycle the power. For background on my comments below: Motherboard: ASUS P8Z77-V LK with latest BIOS update #1104 Intel i7-3770K 16G Corsair DDR3 2 Western Digital 2TB hard drives One drive has Fedora 19 installed on it. The other drive has all the LFS stuff on it. I had a setback today. Up through this morning, I was able to execute Launch EFI Shell from filesystem device, and to do various things in the EFI shell. But after making some changes to my hard drive arrangement several times in an attempt to get the system to boot up, this simply quit working. No matter what I name the EFI shell -- shellx64.efi and variations of that -- and no matter which hard drive I power up -- one or the other or both -- and no matter which SATA slot I plug the drive(s) into, the BIOS will not launch the EFI shell. This, even after I updated the BIOS again. So I've filed a technical request with ASUS Support to try to get some explanation, and hopefully documentation, on what's going on. I'm really frustrated because it's like the ASUS BIOS changes itself without input from me. The really weird thing about the ASUS board is that no matter which SATA slot I put the hard drives in, it always finds the Fedora Linux image, but never the LFS image. This tells me that the BIOS is doing some undocumented things. 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. What are the implications of that? Why is it so distasteful? Alan -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Help with Installing to UEFI Motherboard
On 18/11/2013 1:28 AM, Alan Feuerbacher wrote: On 11/16/2013 8:56 PM, Geoff Swan wrote: On 17/11/2013 11:26 AM, Dan McGhee wrote: Just so I understand. You got your kernel--3.10.10 (?)--to boot from the EFI partition? And without initrd or initramfs? The answer to this question is important to me. Yes. 3.10.10. Selectable in the BIOS efi boot manager and boots directly, fast. No initrd or initramfs is needed, I built all the drivers required for the server hardware into the kernel. If you build modules required for boot then you have to make them available in the EFI partition too. I found it easier to build everything into the kernel. Can you tell us exactly what you did to get to this? I mean very precisely, like if I wanted to tell my grandmother how to do it. Alan Not sure how good your Granny is with Linux OS's, but the instructions are fairly simple when you get rid of Grub. i. When you are building the otehr LFS packages, also include gdisk (for GPT drive partitioning), pciutils and efibootmgr ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/pciutils-3.2.0.tar.gz https://github.com/vathpela/efibootmgr/archive/master.zip ii. Configure your kernel to have the EFI settings enabled. I used the following with 3.10.10: 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 iii. Include the comand line parameters in the kernel. This is done during configuration: CONFIG_CMDLINE=root=/dev/sda3 ro --verbose iv. Using the details of your hardware, build the appropriate drivers into the kernel, or at least the drivers required for booting and mounting. This will depend on what you plan to use the OS for. v. Compile the kernel and install to /boot as normal. vi. Copy the kernel image to an efi image in the /boot/efi/EFI/linux/ directory: # cp /boot/vmlinuz-3.10.10 /boot/efi/EFI/linux/linux031010_x64.efi vii. Use efibootmgr to register it with the efi bios: # modprobe efivars # efibootmgr --create --disk /dev/sda --part 1 --write-signature --loader \\EFI\\linux\linux031010_x64.efi file:///%5C%5CEFI%5Clinux%5Clinux031010_x64.efi --label Linux Shut down, pull out the host drive and boot from your new OS drive. The bios should show your new OS as an option in the EFI boot menu. -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Help with Installing to UEFI Motherboard
On 11/17/2013 04:10 PM, Alan Feuerbacher wrote: On 11/16/2013 6:10 PM, Dan McGhee wrote: snipped your answers to my questions. Thank you. They helped. For background on my comments below: Motherboard: ASUS P8Z77-V LK with latest BIOS update #1104 Intel i7-3770K 16G Corsair DDR3 2 Western Digital 2TB hard drives One drive has Fedora 19 installed on it. The other drive has all the LFS stuff on it. I had a setback today. Up through this morning, I was able to execute Launch EFI Shell from filesystem device, and to do various things in the EFI shell. But after making some changes to my hard drive arrangement several times in an attempt to get the system to boot up, this simply quit working. No matter what I name the EFI shell -- shellx64.efi and variations of that -- and no matter which hard drive I power up -- one or the other or both -- and no matter which SATA slot I plug the drive(s) into, the BIOS will not launch the EFI shell. This, even after I updated the BIOS again. So I've filed a technical request with ASUS Support to try to get some explanation, and hopefully documentation, on what's going on. I'm really frustrated because it's like the ASUS BIOS changes itself without input from me. The really weird thing about the ASUS board is that no matter which SATA slot I put the hard drives in, it always finds the Fedora Linux image, but never the LFS image. This tells me that the BIOS is doing some undocumented things. I had a similar experience but on only one hard drive. I would run an experiment and try to boot. The boot would fail and the System Boot Manager would remove my LFS entry and write one for Ubuntu. There was a time when, just trying to see what would happen, I had four entries for Ubuntu. I learned that there was at least one thing I needed to do: not use efivars but efivarfs. Once I did this, I could keep my LFS entries--although I still couldn't get LFS to boot. It's interesting that you're having a similar experience but with Fedora. That distro, along with Ubuntu and OpenSuse, have paid Microsoft and can use secure boot. Since the key and the signature reside in the firmware, I'm wondering if it isn't the firmware that's giving priority to Ubuntu in my case and Fedora in yours. Microsoft can black list any signature it wants at any time. These revisions are installed by means of Windows Update. Keys are OEM specific, and organizations like ASUS and HP incorporate them into their firmware. These OEM's can change their key configurations at any time. I'm guessing they do it through BIOS updates. Your story really interests me. 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. What are the implications of that? Why is it so distasteful? The introduction to the answer to your question is what I wrote above. At its worst, the situation could be, or become, that an individual must register a key with the OEM to install anything other than what came on the computer--or even use the firmware. What's worse is that an OEM could black list my key on my own computer. For what reason, I don't know, but it's an extension of the logic. I just don't like any person or organization telling me how to operate and what I can run on my own machines. I hope I don't sound like a conspiracy theorist. I'm not. But look at what has happened in the Windows World. We can't even get installation disks with our computers any more. That was a 3/4 rant. I apologize. One conclusion that emerges as a result of yours, mine and Geoff's experiences is that GRUB built from source may not be able to deal with the EFI environment in the way we're used to. I don't know how, or even if, the distros have modified GRUB in their packages. Everything I've read and all my experiements say that GRUB2 should work. Thus far, I haven't been successful--almost, but not quite. Dan -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Help with Installing to UEFI Motherboard
On Sun, Nov 17, 2013 at 05:02:09PM -0600, Dan McGhee wrote: I don't know how, or even if, the distros have modified GRUB in their packages. I remember reading something that said fedora's grub is very different from upstream. Try using cgit to see what fedora are doing [ use a graphical browser ]. ĸen -- das eine Mal als Tragödie, dieses Mal als Farce -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Help with Installing to UEFI Motherboard
On Sun, Nov 17, 2013 at 05:10:57PM -0500, Alan Feuerbacher wrote: On 11/16/2013 6:10 PM, Dan McGhee wrote: The kernel. It dies with a message like ... kernel panic ... Must you do a hard reset to start over or can you use ALT-CTRL-DEL? I have to recycle the power. With your later comment about today's setback, this suggestion is irrelevant unless/until you can get back to this state. But if you manage to recover to there, please see if any indications of what is wrong get to the screen. If anything useful is there (i.e. not scrolled off), google it just in case someone has found a fix. If not, my first suggestion is to try newer kernels. This sounds very like the sort of thing that was discussed in the various lkml threads about EFI/UEFI I alluded to when replying to Dan in the past month (a change which fixes some machines breaks others). I suggest that you start by trying 3.12.0. No idea if anything there will fix it, but it is current. I normally don't recommend people try early -rc kernels, and 3.13-rc1 wasn't even released when I last checked. If you haven't had any success when 3.13-rc1 is released then certainly try it : but expect unrelated breakage in all sorts of weird and wonderful corner cases. So, if 3.12.0 doesn't work I would then try 3.10.0 in case a later fix broke something, and after that perhaps 3.8.0, 3.6.0, 3.4.0 (assuming your glibc --enable-kernel= isn't as aggressive as mine and will let your init run old kernels). IFF you can find something old which boots, you then get to work out what broke it. ĸen, glad to be a luddite using the bios and an MBR - at least until you guys have sorted out what needs to be done. -- das eine Mal als Tragödie, dieses Mal als Farce -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Help with Installing to UEFI Motherboard
On 11/17/2013 06:03 PM, Ken Moffat wrote: On Sun, Nov 17, 2013 at 05:10:57PM -0500, Alan Feuerbacher wrote: On 11/16/2013 6:10 PM, Dan McGhee wrote: The kernel. It dies with a message like ... kernel panic ... Must you do a hard reset to start over or can you use ALT-CTRL-DEL? I have to recycle the power. With your later comment about today's setback, this suggestion is irrelevant unless/until you can get back to this state. But if you manage to recover to there, please see if any indications of what is wrong get to the screen. If anything useful is there (i.e. not scrolled off), google it just in case someone has found a fix. If not, my first suggestion is to try newer kernels. This sounds very like the sort of thing that was discussed in the various lkml threads about EFI/UEFI I alluded to when replying to Dan in the past month (a change which fixes some machines breaks others). I suggest that you start by trying 3.12.0. No idea if anything there will fix it, but it is current. I normally don't recommend people try early -rc kernels, and 3.13-rc1 wasn't even released when I last checked. If you haven't had any success when 3.13-rc1 is released then certainly try it : but expect unrelated breakage in all sorts of weird and wonderful corner cases. So, if 3.12.0 doesn't work I would then try 3.10.0 in case a later fix broke something, and after that perhaps 3.8.0, 3.6.0, 3.4.0 (assuming your glibc --enable-kernel= isn't as aggressive as mine and will let your init run old kernels). IFF you can find something old which boots, you then get to work out what broke it. ĸen, glad to be a luddite using the bios and an MBR - at least until you guys have sorted out what needs to be done. I don't know where in the boot sequence Alan was when he had a freeze. I know it happened to me early on and I had to do a hard reset. There were no messages from grub or kernel. Just a blank screen. When I figured out how to configure the grub build for efi and to use efivarfs, the system would still stop after I got the echo of Booting LFS-7.4.. But in those instances I could reboot with ALT-CTRL-DEL. That told me that I had successfully gotten in to the grub system, but that something was stopping me from going further. I googled, and googled and googled--in addition to offering the birth rights of my first-born-son--but I got no pertinent or useful results. Ken, you have something about using a newer kernel. I think it was in rodsbooks that I read something to the effect this fails on some kernels, then works on the next one. My efforts have led me back to grub or kernel 3.10.10 as the culprit. I used the configuration file for kernel 3.8.something from Ubuntu. I knew that config would produce a bootable kernel. But I got the same results. Geoff reports that he can boot without GRUB by using the efi-stub of 3.10.10. This tells me that 3.10.10 is one of those kernels in which it works. Soo, I'm back to looking at GRUB. I've got one more test to do before I copy my 3.10.10 to the EFI partition in an attempt to get the results Geoff got. With all the reading I've done at Arch-wiki, Gentoo-wiki, rodsbooks, Ubuntu I think I've discovered that this stuff is so new, no one really knows how it works or how to make it work reliably build to build or platform to platform. I find the lack of information at Linux Foundation, kernel.org and grub terribly interesting. It supports my newness conclusion. There even are no How do I fix this? posts at Linux Questions. Bottom line. I'm still trying. But it looks like, as far as efi is concerned, kernel efi-stubs and efibootmgr are the way to go. With this there is no need for grub. Dan -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Help with Installing to UEFI Motherboard
On Nov 17, 2013, at 5:46 PM, Ken Moffat wrote: I remember reading something that said fedora's grub is very different from upstream. Try using cgit to see what fedora are doing [ use a graphical browser ]. ĸen http://pkgs.fedoraproject.org/cgit/grub2.git/plain/ I found this a while back while helping someone with a jfs problem and grub while accessing relocator module and all. Sincerely, William Harrington -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Help with Installing to UEFI Motherboard
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 -- das eine Mal als Tragödie, dieses Mal als Farce -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Help with Installing to UEFI Motherboard
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 -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Help with Installing to UEFI Motherboard
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 Geoff, your comments are giving me a break from answering questions in make oldconfig :) Just so I understand. You got your kernel--3.10.10 (?)--to boot from the EFI partition? And without initrd or initramfs? The answer to this question is important to me. As I said before, I don't have my references close right now, but you may want to consider reconfiguring your kernel with CONFIG_EFI_VARS=n and enabling evifarfs. efivars is going away. I'll check my references and post later with the appropriate one. I have been using efivarfs mounted at /sys/firmware/efi/efivars with great success. Otherwise, I have been
Re: [lfs-support] Help with Installing to UEFI Motherboard
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 -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Help with Installing to UEFI Motherboard
On 11/16/2013 7:36 PM, Dan McGhee wrote: 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 The information I've gotten so far about setting these CONFIG variables, from Arch Linux, rodsbooks.com and other places, is summarized here, from my incomplete notes from the last several weeks: *** # For UEFI booting, according to ArchLinux you also need to ensure that the following # https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface # kernel configuration options are set: ## CONFIG_RELOCATABLE=y CONFIG_EFI=y CONFIG_EFI_STUB=y CONFIG_EFI=y CONFIG_EFI_STUB=y CONFIG_FB_EFI=y CONFIG_FRAMEBUFFER_CONSOLE=y # UEFI Runtime Variables Support (efivarfs filesystem - /sys/firmware/efi/efivars). This option is important as this is required to manipulate UEFI Runtime Variables using tools like /usr/bin/efibootmgr. The below config option has been added in kernel 3.10 and above. CONFIG_EFIVAR_FS=y # UEFI Runtime Variables Support (old efivars sysfs interface - /sys/firmware/efi/vars). This option should be disabled. CONFIG_EFI_VARS=n # GUID Partition Table GPT config option - mandatory for UEFI support CONFIG_EFI_PARTITION=y # Note: All of the above options are required to boot Linux via UEFI, and are enabled in Archlinux kernels in official repos. ## # # ALSO need to set this: ## CONFIG_CMDLINE_BOOL=y CONFIG_CMDLINE= ## # See # and in make menuconfig set these with Processor Type and Features - Built-in kernel command line # # Also, in installing Cups-1.6.3 the BLFS book states: # # Kernel Configuration # Note # # There is a conflict between the Cups libusb backend and the usblp kernel driver. If you want to use Cups with libusb, do not enable USB Printer support in your kernel. # # If you want to use the kernel usblp driver, enable the following options in your kernel configuration and recompile the kernel: # # If you want to use the kernel usblp driver, enable the following options in your kernel configuration and recompile the kernel: # # Device Drivers --- # [*] USB support --- # .. # In make menuconfig, get rid of the * in USB support *** Since I have not yet been successful in booting Linux 3.10.10 with UEFI, I can't comment on the above. For what it's worth. Alan -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Help with Installing to UEFI Motherboard
On 11/16/2013 06:51 PM, Alan Feuerbacher wrote: On 11/16/2013 7:36 PM, Dan McGhee wrote: 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 The information I've gotten so far about setting these CONFIG variables, from Arch Linux, rodsbooks.com and other places, is summarized here, from my incomplete notes from the last several weeks: *** # For UEFI booting, according to ArchLinux you also need to ensure that the following # https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface # kernel configuration options are set: ## CONFIG_RELOCATABLE=y CONFIG_EFI=y CONFIG_EFI_STUB=y CONFIG_EFI=y CONFIG_EFI_STUB=y CONFIG_FB_EFI=y CONFIG_FRAMEBUFFER_CONSOLE=y # UEFI Runtime Variables Support (efivarfs filesystem - /sys/firmware/efi/efivars). This option is important as this is required to manipulate UEFI Runtime Variables using tools like /usr/bin/efibootmgr. The below config option has been added in kernel 3.10 and above. CONFIG_EFIVAR_FS=y # UEFI Runtime Variables Support (old efivars sysfs interface - /sys/firmware/efi/vars). This option should be disabled. CONFIG_EFI_VARS=n # GUID Partition Table GPT config option - mandatory for UEFI support CONFIG_EFI_PARTITION=y # Note: All of the above options are required to boot Linux via UEFI, and are enabled in Archlinux kernels in official repos. ## # # ALSO need to set this: ## CONFIG_CMDLINE_BOOL=y CONFIG_CMDLINE= ## # See # and in make menuconfig set these with Processor Type and Features - Built-in kernel command line # # Also, in installing Cups-1.6.3 the BLFS book states: # # Kernel Configuration # Note # # There is a conflict between the Cups libusb backend and the usblp kernel driver. If you want to use Cups with libusb, do not enable USB Printer support in your kernel. # # If you want to use the kernel usblp driver, enable the following options in your kernel configuration and recompile the kernel: # # If you want to use the kernel usblp driver, enable the following options in your kernel configuration and recompile the kernel: # # Device Drivers --- # [*] USB support --- # .. # In make menuconfig, get rid of the * in USB support *** Since I have not yet been successful in booting Linux 3.10.10 with UEFI, I can't comment on the above. For what it's worth. Alan Alan, thank you for validating my research. Let me validate yours. Those recommendations work. Did you see the questions I asked you earlier? I hope you will answer them. They are important to my research. I'm so close to success, I can smell it. Hopefully it won't be long and I can post everything here. It will be quite long. Dan -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Help with Installing to UEFI Motherboard
On 11/16/2013 8:17 PM, Dan McGhee wrote: Alan, thank you for validating my research. Let me validate yours. Those recommendations work. Good! Did you see the questions I asked you earlier? I hope you will answer them. They are important to my research. Yeah, I saw them. I'm in the process of answering them, but I have to revisit a lot of stuff first, so it will take awhile. I'm so close to success, I can smell it. Hopefully it won't be long and I can post everything here. It will be quite long. We can compare notes. I've got a LOT of stuff as well. And a lot of holes left to fill. Alan -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Help with Installing to UEFI Motherboard
On 11/16/2013 07:26 PM, Alan Feuerbacher wrote: On 11/16/2013 8:17 PM, Dan McGhee wrote: Alan, thank you for validating my research. Let me validate yours. Those recommendations work. Good! Did you see the questions I asked you earlier? I hope you will answer them. They are important to my research. Yeah, I saw them. I'm in the process of answering them, but I have to revisit a lot of stuff first, so it will take awhile. No rush. I'm so close to success, I can smell it. Hopefully it won't be long and I can post everything here. It will be quite long. We can compare notes. I've got a LOT of stuff as well. And a lot of holes left to fill. I have holes too. I'm looking forward to the exchange of info. Earlier on this list Geoff Swan posted. I want to verify from him that he got kernel 3.10.10 to boot from using the system Boot Manager. I'm trying to verify the need for an initrd or initramfs. Dan -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Help with Installing to UEFI Motherboard
On 17/11/2013 11:26 AM, Dan McGhee wrote: 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 Geoff, your comments are giving me a break from answering questions in make oldconfig :) Just so I understand. You got your kernel--3.10.10 (?)--to boot from the EFI partition? And without initrd or initramfs? The answer to this question is important to me. Yes. 3.10.10. Selectable in the BIOS efi boot manager and boots directly, fast. No initrd or initramfs is needed, I built all the drivers required for the server hardware into the kernel. If you build modules required for
Re: [lfs-support] Help with Installing to UEFI Motherboard
On 11/16/2013 07:56 PM, Geoff Swan wrote: Just so I understand. You got your kernel--3.10.10 (?)--to boot from the EFI partition? And without initrd or initramfs? The answer to this question is important to me. Yes. 3.10.10. Selectable in the BIOS efi boot manager and boots directly, fast. No initrd or initramfs is needed, I built all the drivers required for the server hardware into the kernel. If you build modules required for boot then you have to make them available in the EFI partition too. I found it easier to build everything into the kernel. Available in a directory on the EFI partition? This might be why many, many people use initramfs. Thanks for the info, Geoff. Dan -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page