linux - How does the EFI partition work and can I boot an x86 OS with a bootx64.efi file?

  • Ian

    I have a Thinkpad X230 laptop and I want to install Linux Mint Debian Edition along side Windows 7 on my GPT formatted SSD with the BIOS in UEFI mode. The problem is that I don't understand how EFI booting works. There seems to be an EFI partition involved with some folders and binary files in it. GRUB 2 seems to be able to make more folders in it (I followed this guide, but it appears that the only file that does anything is the bootx64.efi file in the /efi/boot folder of the EFI partition (I am not sure if this is always the case, but it appears to be the case for my laptop

    Here is what I have been able to do: I can install Linux Mint Debian Edition x86 with the BIOS in BIOS mode on my SSD. I can then install grub-efi and follow the guide linked above. The problem is that I don't get a GRUB prompt when I switch the BIOS to UEFI mode. It just boots Windows. It appears that I can either boot from the SSD or something called "Windows Boot Manager". If I replace the bootx64.efi with the file created by GRUB, I can no longer boot directly from the SSD. Booting from "Windows Boot Manager" still works fine. I realize that the guide says to use x64 Linux, but Linux Mint Debian Edition x64 hangs during the install process.

    I am really confused. What should I do? Can anyone explain how the EFI boot partition works? Can a bootx64.efi boot an x86 OS? Should I just give up with using UEFI? I haven't been able to find very much useful information about using Debian based operating systems with UEFI.


  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    bootloader - EFI booting and EFI Boot Partition
  • rubixibuc

    I read that there needs to be an EFI system partition.

    Wikipedia -

    The EFI System partition is a partition on a data storage device that is used by machines that adhere to the Extensible Firmware Interface. It contains the boot loader programs for all operating systems installed (in other partitions) on the device, device driver files (used by the firmware at boot time) for other devices, and system utility programs that are intended to be run before an operating system is booted.[1]

    EDIT: Is this partition created automatically and is it the first partition on the disk? If not, how do you go about creating it?

    I also read that there needs to be a particular file on a certain partition called *.efi.

    Wikipedia -

    UEFI does not rely on a working boot sector only, but needs a special partition table referring to a special partition containing a specially located file with a standardized name depending on the actual architecture to boot (\EFI\BOOT\boot[architecture name].efi).

    Are these one and the same partition, or are these both separate and necessary structures for booting (the EFI system partition, and the special partition)? How do they work together (are they two different stages of the boot process, like one for all OSs and one for a particular OS)? Also, do both these structures apply to UEFI?

  • Related Answers
  • JdeBP

    No, a partition is not one and the same as a file; and Wikipedia is misleading you.

    That second paragraph is wrong on pretty much all points. EFI does not require any such things, and never relies upon a boot sector. If you want the gen on this, I suggest reading the actual EFI specification. It's fairly clear on what the \EFI\BOOT\BOOTxxx.EFI files are all about. They are the fallback default if nothing is configured in the Boot Manager. Normally, however, something will be configured in the Boot Manager.

    EFI does not require a special partition table, it being capable of using both the old PC/AT (a.k.a. MBR or MS-DOS) partitioning scheme and the new EFI partitioning scheme. Nor are EFI boot applications specially located. Their locations are stored as paths in individual boot options. In theory, they don't even have to be on the EFI System Partition. They could in theory be on any volume whose filesystem format the firmware understands. In practice, the ESP is both the expected place that users will look at first and is guaranteed to exist by the platform and be locatable by EFI programs.

    Further reading