12

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"

Edit: This is a rather old question, I haven't tried for a while, maybe today it is just a matter of running dd to copy the iso, but it did not work 5 years ago. I'm going to try with a recent macbook and linux iso

2
  • With Ubuntu, you can just sudo dd if=ubuntu.iso of=/dev/sdb and it will boot. Sep 10, 2015 at 18:05
  • Unetbootin is not advisable. I would recommend simply running sudo dd if=/Users/Joe/name.iso of=/dev/disk# bs=16m && sync from a terminal emulator.
    – oemb1905
    Nov 17, 2017 at 4:45

4 Answers 4

13
+50

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:

1
  • Looks promising. I can't wait to come home and test that!
    – ascobol
    Feb 9, 2011 at 9:35
0

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.

3
  • 5
    Being unable to boot from a USB stick unless you follow careful procedures is a well known problem with some mac hardware. It's more than just "burn the image as an image" or "use unetbootin" or "hold the right key combination down at boot".
    – DanBeale
    Jan 26, 2012 at 15:05
  • It is not the c key but the alt key. Additionally, bear in mind that this will re-enable the default macOS EFI bootloader and break refind installations. Refind will need to be re-installed if one desires efficient dual boot, or alternatively, will simply need to depress alt every single time they desire the alternative OS.
    – oemb1905
    Nov 17, 2017 at 4:37
  • In addition to not specifying the proper key command, your method only runs the Debian installer and does not put a bootable OS onto the USB drive.
    – oemb1905
    Nov 17, 2017 at 4:43
0

I would recommend using the UNetbootin utility to create the bootable USB stick from your favorite Linux distro's install disc ISO. I've created many USB sticks with this, including OS X install sticks.

Then simply hold the alt/option key while booting the Mac (wait until you hear the boot sound and the Apple logo appears on screen), and you should see the option to boot off the USB drive. Take it from there :)

1
  • That creates an installer version of Debian, not a bootable Debian OS on the USB stick (i.e., not a Live CD) which is what was requested above.
    – oemb1905
    Nov 17, 2017 at 4:35
0

Here is an easier alternative and also a more modern answer.

I do the following from macOS (assuming the USB was listed as disk4):

 diskutil list
 diskutil eraseDisk JHFS+ Temp disk4
 diskutil unmountDisk disk4
 sudo dd if=/Users/Joe/name.iso of=/dev/disk4 bs=16m && sync

With that ready, then do the following to prepare your Mac system. Download refind, unzip it, place it in Applications ...

 cd ~/Downloads
 unzip refind-bin-0.11.2
 cp -R refind-bin-0.11.2/ /Volumes/Macintosh\ HD/Applications/

You should disable SIP first (optional but recommended), so restart your Mac, holding command + R, and once in recovery, open a Terminal up and disable SIP:

 csrutil disable

Now that SIP is disabled, you can install refind without Recovery mode.

 cd /Volumes/Macintosh\ HD/Applications/refind-bin-0.11.2/
 ./refind-install

Insert USB drive from Step 1 above

 reboot

(Some users report trouble, even after disabling SIP, so the refind maintainer recommends installing refind in Recovery Mode if this happens.)

You will be greeted by the refind bootloader now. At this stage, select your Debian .iso that you made in Step 1. There will be an option to pick Grub or to pick the kernel directly (since refind is also an alternative to Grub). It will boot either way, but the Debian installer has a known glitch with the track pad, so use a USB mouse while installing, or use the optional n-curses installer. Insert a second USB drive, and follow the instructions to install the Debian OS to that second USB drive. I agree with the other answer about not using SWAP.

I would not use refit, it has been deprecated and not maintained for quite some time. Refind is a modern fork that is maintained (see link above).

2
  • @ascobol - I think this ^ is much easier personally ... The other method is nice though ... very manual.
    – oemb1905
    Nov 17, 2017 at 4:32
  • I have found that Applications is simply convenient as a location. It is easy to navigate to when refind gets hosed.
    – oemb1905
    Nov 17, 2017 at 4:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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