Take the 2-minute tour ×

I want to make bootable USB drive with Debian and make it bootable on both BIOS and UEFI systems. I've found only separate instructions for BIOS and UEFI systems. Please help me to find a solution.

share|improve this question
There isn't a single solution unless the UEFI system supports a legacy BIOS mode. –  Ramhound Aug 21 '13 at 15:04
I don't know why this being downvoted. It's a perfectly valid question even if the answer is that it can't currently be done. –  supercheetah Aug 21 '13 at 15:09
It's definitely possible to create a Linux USB flash drive that's bootable in both EFI and BIOS modes. Fedora's intaller does this, for instance. It may not be possible to easily set up the Debian installer to boot in both modes, but it's definitely possible to do it if you're willing to take it apart and put it back together again. I don't know how hard this would be, but the general outline is in my answer. –  Rod Smith Aug 22 '13 at 0:13
add comment

1 Answer

If you're talking about creating a Debian installation image, I can't provide step-by-step instructions for it; however, the general way to create a USB drive that's bootable in both EFI and Linux is:

  1. Prepare the disk with partitions. GPT is probably most reliable for this, but MBR will work on at least some systems, too. Be sure to include an EFI System Partition (ESP) and (if you use GRUB 2) a BIOS Boot Partition.
  2. Install 64-bit Linux to the USB drive. (A 32-bit Linux will boot in EFI mode only on those rare 32-bit EFI-based PCs or with the help of a 64-bit EFI boot loader. These days, you're probably best off with a 64-bit Linux.)
  3. Install a BIOS-mode boot loader (probably GRUB 2, but GRUB Legacy patched with GPT support, SYSLINUX, or LILO will work, too).
  4. Install an EFI-mode boot loader/manager (GRUB 2, Fedora's patched GRUB Legacy, recent SYSLINUX, rEFInd, or gummiboot) in the ESP as EFI/BOOT/bootx64.efi.

The Debian installer, of course, has things set up in its own way, so step #2 will involve figuring out how the installer works and "translating" it to work from the USB flash drive.

share|improve this answer
Yes, I want to create bootable system, not installer. What partition shall I mark as 'boot': EFI System Partition or Linux rootfs? –  Alexander230 Aug 22 '13 at 5:07
If you use GPT, mark the ESP with the "boot flag" in parted, or give it a type code of EF00 in gdisk. (The term "boot flag" is not entirely accurate in GPT, but the parted developers chose to apply an MBR term to a very loosely related GPT concept.) If you use MBR, the "boot flag" in parted is semi-optional; GRUB doesn't use it, but some BIOSes require it to be set on a partition, and it doesn't really matter which one has the flag. If you use a boot loader other than GRUB, consult its documentation on this point. –  Rod Smith Aug 22 '13 at 14:32
add comment

Your Answer


