EFI Partition vs /boot partition

125,097

Solution 1

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

  • 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", "UEFI and CSM", "Legacy (BIOS) only", "BIOS, then UEFI", or something similar. (CSM is Compatibility Support Module, the BIOS emulation.)

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.

Solution 2

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:
125,097

Related videos on Youtube

lynks
Author by

lynks

Updated on September 18, 2022

Comments

  • lynks
    lynks over 1 year

    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?
  • Timur Fayzrakhmanov
    Timur Fayzrakhmanov over 9 years
    Great answer! So if I use GPT and EFI, I need just separate "EFI boot partition", "/" (root), "swap", "/home" and that is fine?
  • user1686
    user1686 over 8 years
    @TimurFayzrakhmanov: The minimum required is "/boot (EFI system partition)" and "/ (root)".