How can one create a bootable Linux USB key that works on Mac (Intel 64 bit CPU) hardware?

11
2013-09
  • ascobol

    I'm trying to create a bootable USB key with Linux (debian) and that can be booted on Macintel hardware.

    I have read that MAC's EFI can only boot GPT GUID formatted disks. I'm desperately trying to find a good tutorial which explains how to create such a key.

    Here what I have done so far:

    • create a GUID partition on te key using Linux GNU parted
    • create a HFS+ or ext3 partition on the key, with the boot flag on
    • install a Linux .iso with unetbootin

    While all steps were successfull and in some cases I could even boot on a PC, the step of booting on Macintel software failed (on a macbook). I need to precise that I holded the "alt" key while booting the mac and the only visible bootable disk was the hard disk.

    PS: I have tried with rEFIt as well. In one case I had a "Windows" icon but it then failed to boot with a message like "no system found"

  • Answers
  • slhck

    From Boot Linux from USB on MacBook Pro 17″ :

    It works! Can now boot Linux on an unmodified MacBook Pro (5,2) from a single USB stick (or external hard drive).

    I created a small 25MB partition as the first partition, formated it as Mac OS X Journaled and installed rEFIt to it, then followed that partition with a 100 MB boot partition, and then a root partition on a thumb drive (if using an external hard drive you could create swap as well, but I don’t do that on thumb drives so they don’t get worn out).

    Install linux normally (debootstrap is how I do it) onto the second and third partitions. Make sure Grub is installed to the MBR of the drive and points to the /boot partition as the second partition. Then take the USB drive to a MacBook Pro and insert it.

    Turn on the MBP and hold down the Alt/Option key until you see a boot menu offering Mac OS X or rEFIt. Choose rEFIt. After that you’ll be give a menu to choose OS X again or Linux. Here, choose Linux.

    Tada, now comes the Grub boot screen and then on into the Linux of your choice. Congrats and enjoy…

    Some other useful articles that contain detailed instructions:

  • slhck

    I have found that a standard Ubuntu/Fedora and even Debian install disc, live CD or USB key will boot fine on a Mac. With a CD you may need to hold down the c key to boot. But I have no problems with USB installs.

    I would warn that I only have Linux installed on my MacBook now. I installed Ubuntu with a live CD a while ago, now rocking Fedora. Once there is no more OS X, any Linux distribution will boot without much trouble.

    I'm not sure what happens when you boot a USB key and OS X is still on the machine though. I would recommend looking up key combinations to hold down to boot from USB – c might be enough.


  • Related Question

    How to boot a Linux live USB on a Mac?
  • slubman

    I have a USB stick with a Fedora 11 live environment on it. It's booting fine on 3 PCs where I've tried it.

    But I can't get it to boot on a Mac (Intel). When pressing the alt key (or command key, I don't remember which one) during startup I can only choose the "Macintosh HD" and the USB stick doesn't appear.


  • Related Answers
  • user14912

    In order to create an Intel Mac bootable USB stick, it needs to be setup for EFI/GPT. This should work as of Fedora 10, but it's not automatic; you need to create a USB stick specifically configured for this purpose.

    According to the Fedora 10 release notes, you can do this using the livecd-iso-to-disk tool like so:

    livecd-iso-to-disk --mactel /path/to/live.iso /my/partition
    

    replacing the path and partition as appropriate. However, this post suggests that the MBR may also need to be cleared (destroying all existing data on the USB disk):

    livecd-iso-to-disk --mactel --reset-mbr /path/to/live.iso /my/partition
    

    Other details on creating a USB stick are in the Fedora wiki, though curiously nothing about support for Intel Macs. I've had success with this method in the past, though it seems somewhat hit and miss. As far as I know, it's not possible to create a USB stick that will boot on both Intel Macs and non-EFI machines.

  • nagul

    I'm not sure you can do this directly; you might require something like rEFit to be able to boot into an Intel Mac with your live usb.

    Have a look at the Myths and Facts About Intel Macs page on their site.

  • Josso

    You may try to press "E" at startup.
    Or see if it is visible as a startup disk (System Preferences » Startup Disk) and boot from there (reboot).

  • nik

    Some notes on booting Intel Mac from external USB drives.

    [it is] possible to boot an Intel Mac from a USB flash drive. That is a bit more involved, and there are several methods. One is Das Boot, a free utility from Sub Rosa that allows you to convert original disks from DiskWarrior, Drive Genius, TechTool Pro and others to a flash drive. Let Google be your friend on this. Many people have put their favorite rescue utility on a bootable flash drive to save them from any problems in the field.

    Before you ask; no, USB does not support target disk mode -- a sore point for MacBook Air and unibody MacBook owners.

  • Stephan Kristyn

    The Flash Drive has to have a GUID Partition Table. The Windows7 Tool diskpart finally implemented this or of course MacOSX itself.

    Also, the flash drive has to feature a HFS+ filesystem.