Uploaded image for project: 'Funtoo Linux'
  1. Funtoo Linux
  2. FL-251

Add support of UEFI for Funtoo Linux

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Critical (Application) Critical (Application)
    • None
    • None
    • Latest motherboard that supports only UEFI mode, since the UEFI firmware is BSD license so, any motherboard builder can do what he wants.

      NOTE: We will use this bug as the main tracker for UEFI support in Funtoo/boot-update. Related bugs are UEFI support for GRUB.

      Right now, Funtoo doesn't support UEFI at all.

      On october 16 2012, I had a brand new box(intel motherboard) and I installed Gentoo only because of that.

      I didn't notice that my Intel motherboard is able to boot in UEFI and bios legacy mode too.

      Gentoo use the latest Grub2 and it supports UEFI because of the efibootmgr dependancy and the new GRUB_PLATFORMS="pc efi-64"
      variable too.

      Basically, here's what need to be done to get in UEFI mode before installing boot-update in UEFI mode :

      Since september 3 2012, SystemRescueCD is the only LiveCD that support the UEFI mode.

      http://www.sysresccd.org/Changes-x86

      So, to have a working UEFI environment, you need to do this :

      1. make sure that your UEFI motherboard is set to UEFI mode then everything will be fine.

      2. SystemRescueCD will boot in UEFI mode and your /sys/firmware/efi will be populated and valid too.

      Because of that, you will be able to use the latest Grub2 that support the UEFI stuff and also make sure that boot-update install efibootmgr too.

      The only way that boot-update knows that he is running in a UEFI environment, it's the directory /sys/firmware/efi that is present and appear to be valid.

      Right now, the main problem is that there's is not standard on how to install the grub2.efi image file inside the /boot/efi partition.

      Some are using /boot/efi/EFI/GRUB2, some are using /boot/efi/EFI/BOOT and others are using the /boot/efi/EFI/GENTOO. The latest dirty hack is to overright the /boot/efi/EFI/BOOT/BOOTX64.EFI with /boot/efi/EFI/BOOT/BOOTX64.EFI

      Basically, they run this :

      cp /boot/efi/EFI/BOOT/GRUB2.EFI /boot/efi/EFI/BOOT/BOOTX64.EFI

      If you read the UEFI documentation, you will notice that the last validation in UEFI mode if there's nothing inside the NVRAM is to try to run the /boot/efi/EFI/BOOT/BOOTX64.EFI file. So, it will automagically run Grub2 if you rename the file the right way.

      Also, make sure that boot-update read/update the /boot/efi/EFI/GRUB2/grub.cfg instead of /boot/grub/grub.cfg if you push the grub2.efi image inside /boot/efi/EFI/GRUB2/,they need to be in the same directory.

      In conclusion, it can really become a mess if not handle properly.

      Read these docs :

      https://gentooquebec.org/gwiki/index.php/Grub2_English
      https://blog.flameeyes.eu/

      Make sure that Jean-Francis read this one too :
      https://gentooquebec.org/gwiki/index.php/UEFI

            rh1 Ryan Harris
            d2_racing Sylvain Alain
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: