EFI Partition vs /boot partition

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.