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

Reply via email to