Jump to: navigation, search

UEFI Install Guide

1,166 bytes added, 6 years ago
no edit summary
== Boot Loader ==
=== EFI Stub method ===
Instead of bothering with the installation of GRUB, you can consider using the UEFI firmware of your computer to boot your kernel.
==== Kernel Configuration ====To prepare your kernel to boot with EFI stub, make sure that the following options are built in to your kernel:{{kernelop|title=Processor type and features|desc=[*] EFI runtime service support[*] EFI stub support[ ] EFI mixed-mode support [*] Built-in kernel command line(kernel options that you want to pass go here)}}{{note|Commands that you would normally pass, such as, for example <code>video=uvesafb:1920x1080-32,mtrr:3,ywrap</code>, should be put here. In other words, anything that you would normally add to <code>/etc/boot.conf</code> after <code>params +=</code> should be added here as well.}} If your system requires an initramfs to boot, do not worry, you can build that in to the kernel:{{kernelop|title=General setup|desc=[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support(/path/to/initramfs/file.cpio)}} === Grub method ======= Emerging GRUB ====
You will still use GRUB as a boot loader, but before emerging grub, you will need to enable EFI booting. To do this,
Then, <tt>emerge grub</tt>. You will notice <tt>efibootmgr</tt> getting pulled in as a dependency. This is expected and good.
==== Installing GRUB ====
Now, for the magic of getting everything in place for booting. You should copy your kernel and initramfs (if you have one -- you will if you are following the default install) to <tt>/boot</tt>. GRUB will boot those. But how do we get UEFI to boot GRUB? Well, we need to run the following command:
* <code>/dev/sda</code>:The device that we are installing GRUB on.
==== Configuring GRUB ====
OK, now UEFI has the GRUB image it needs to boot. But we still need to configure GRUB itself so it finds and boots your kernel and initramfs. This is done by performing the following steps. Since boot-update doesn't yet support UEFI, we will use boot-update, but then edit our <code>/boot/grub/grub.cfg</code> to support UEFI booting.
*Choose UEFI first, next legacy driver. It depends on motherboard vendor and efi bios version.
**In UEFI bios choose grub option, if your succeeded with above guide, additional menu should appear in Boot Menu, otherwise it boots into EFI shell: <code>grub:NAME of you hard drive</code>
* On some systems, installing the packages that are required for UEFI booting with any gcc later than a 4.x.x release may lead to a black screen after the GRUB screen. To fix this, before you begin installing any packages on your system, emerge =gcc-4.6.4-r2 and proceed with the installation as usual. Remember to switch your compiler back to the version of gcc that came with your system after you have finished installing. To do this, use <code>gcc-config 2</code>. This problem can also be fixed by following the [[Efi Stub guide]] instead of the GRUB one.
=== Done! ===

Navigation menu