Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have just sat down to install debian 7, which contains something called 'EFI' which is entirely new to me.

I went through the install as I usually do;

  • 256MB /boot partition, bootable, unencrypted
  • Remaining disk size as / partition, encrypted

The installer warned me about 'no EFI partition found' but I ignored it, because I like to live dangerously.

But that installation isn't bootable, grub complains about 'ELF magic' and drops me into rescue mode.

So I'm now running through the installation again, and have found the option for creating an EFI partition. My questions are as follows;

  • What is it?
  • Why do I seem to require one now?
  • Do I still need a separate /boot partition?
  • I have windows 7 installed on the same disk, which always worked fine with grub2 from the mbr, is it possible to rescue that installation as well?
share|improve this question

2 Answers 2

up vote 16 down vote accepted

Your computer has UEFI firmware, a replacement for the old BIOS (although it still has support for BIOS-only operating systems).

  • In BIOS systems, the bootloader (or the "stage1" of a large bootloader) is stored inside the MBR, in the zeroth sector of the disk. (The 512-byte MBR reserves 446 bytes for bootstrap code, the rest is used for partition information.) If the bootloader is too large, its MBR "stage1" code usually tries to find "stage2" files in your /boot partition.

  • In EFI or UEFI systems, the bootstrap code area in MBR is usually empty (most UEFI systems don't even use MBR for partitioning, preferring GPT). Instead, all bootloaders are stored as ordinary .efi programs in an "EFI system partition", which is a regular FAT32 partition with a special "partition type" in the partition table. If you have multiple operating systems, they share the same EFI system partition.

    /boot/efi
    ├── EFI
    │   ├── arch
    │   │   ├── initramfs-linux.img
    │   │   └── vmlinuz-linux.efi
    │   └── gummiboot
    │       └── gummiboot.efi
    ├── loader
    │   ├── entries
    │   │   └── arch.conf
    │   └── loader.conf
    └── SHELLX64.EFI
    

    Some users choose to put the EFI partition at /boot, making configuration a little bit easier for Linux-only systems. But when dualbooting – even if it's two different Linux distros – I suggest having the EFI partition at /boot/efi. A separate /boot is usually unnecessary.)

The EFI partition is required if you want to boot your system in UEFI mode. However, if you want UEFI-bootable Debian, you might need to reinstall Windows as well, since mixing the two boot methods is inconvenient at best.

Both Windows 7 and Debian 7 support both BIOS and UEFI, and they install the apropriate bootloader depending on which mode the installer was booted in. Often, UEFI systems have a "boot mode" switch in their settings screen, having options such as "UEFI only", "Legacy (BIOS) only", "BIOS, then UEFI", or something similar. Your Windows 7 system was probably installed in BIOS mode, but the Debian installer now boots in UEFI mode and offers to install an UEFI-compatible bootloader. (Maybe you flipped the "UEFI/BIOS" switch somewhere. I don't know.)

For now, you can ignore EFI completely and install GRUB2 again into the MBR, possibly using grub-install --target=i386-pc.

share|improve this answer
    
Perfect thanks, this is much clearer. I have decided to go with BIOS/MBR in order to save my Windows 7 installation. –  lynks Dec 16 '12 at 18:19

It's not the same OS but it was a similar problem, I had Ubuntu 13.04 installed over a PC with windows 8 and it did give me the boot option it goes directly to windows 8. So i needed to use boot repair but it didnt recognize my wireless card so I follow the steps on this link to repair the issue with the wireless card: Can I enable WiFi on a Ubuntu Live CD?

Basically what I did to enable the wireless was:

  1. Go to System settings → Software sources → Additional drivers
  2. Select any available option other than "Do not use the device"
  3. Hit "Apply changes"

Then I followed the steps from https://help.ubuntu.com/community/Boot-Repair

Basically what I did was:

  1. launch Boot-Repair from either : 1.the Dash (the Ubuntu logo at the top-left of the screen)

    1. or System->Administration->Boot-Repair menu (Ubuntu 10.04 only)

    2. or by typing 'boot-repair' in a terminal

  2. Then click the "Recommended repair" button. When repair is finished, note the URL (paste.ubuntu.com/XXXXX) that appeared on a paper, then reboot and check if you recovered access to your OSs.

  3. If the repair did not succeed, indicate the URL to people who help you by email or forum.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.