How To Dual Boot OS X and Linux

By | 2011/06/14

How to dual boot OS X and Linux. Works on any Intel Mac with any version of Linux!

Note: rEFIt does not work with 10.7 Lion yet (step 4). Wait for an rEFIt update before attempting on a 10.7 machine.

Warning: This is scary stuff – you can really trash your system and data! I am not responsible if any problems occur. Always backup your data!


1. Backup your entire existing OS X hard drive onto an external drive using a utility such as Carbon Copy Cloner. This is a CYA step!

01_mac_linux
2. Create a Boot Camp partition using the Boot Camp Assistant. I’m creating a 60GB partition for Linux Mint in this example.

02_mac_linux
03_mac_linux
04_mac_linux
05_mac_linux
06_mac_linux


3. Reboot, make sure all is well with OS X after the Boot Camp partition change.


4. Install rEFIt and then reboot twice to make sure it is installed and working ok. (Hold down option at boot to see rEFIt menu if it does not appear automatically.)

07_mac_linux
08_mac_linux
09_mac_linux
10_mac_linux


5. Boot your desired Linux install CD/DVD by holding down ‘C’.

11_mac_linux
6. Install Linux as normal to the Boot Camp partition. It is critical to _delete_ the Boot Camp-made Fat32 partition for Windows and replace it by creating a root (/) and swap partition for your Linux install.

12_mac_linux
13_mac_linux
14_mac_linux
15_mac_linux

Another critical step: the bootloader (grub) should be installed to the Linux root partition, and not the MBR/EFI part of your hard drive. You must make this change in your Linux install! In this example, the Linux boot loader is being installed to /dev/sda3.

16_mac_linux
7. After the Linux install completes, fully shutdown the computer. (Apple ‘reboots’ are at times very soft reboots that sometimes do not cut it.)


8. Turn the machine back on. From the rEFIt menu, you can now choose and boot into Linux or OS X!

22_mac_linux 23_mac_linux 24_mac_linux

Notes: If Apple complains that it cannot create a boot partition, try booting from an OS X install CD, run Disk Utility, and click Repair Disk. The go back into OS X and try the Boot Camp Assistant again.

If you ever want to remove rEFIt, simply go to the OS X Startup Disk Preferences, and choose your OS X Hard Drive as the startup disk. This ‘click’ will overwrite and remove rEFIt.

Grub is optional – you actually can skip installing a bootloader if needed. rEFIt will just dump you right into Linux. However the recovery options that grub provides are worth keeping, IMO.

rEFIt has trouble booting to a second internal hard drive. If you are attempting this, be aware of this as an issue in their FAQs.

As seen before, Linux beats OS X on the same hardware in identical cross platform benchmarks!


37 thoughts on “How To Dual Boot OS X and Linux

  1. Bobe Dole

    Be careful with your claims about working on any Mac / Linux. Apple dropped Boot Camp from their server line of Mac OS. It’s possible to boot a Linux ISO without Boot Camp for sure, but if you have a RAID configuration you’ll find that current major distributions won’t be able to detect any storage devices. Furthermore, there are stability issues on bleeding-edge releases. I installed Fedora 14 on a Mac server, after installing the security upgrades it destroyed itself.

    Reply
    1. scott Post author

      Dual booting different operating systems with RAID involved is quite a headache. Be that solaris, mac, linux, windows, whatever. It is possible, but definitely not the focus of this article. 🙂

      Cheers,

      Reply
  2. Erik

    Thank you so much for this walk through. I am going to give it a try. I love Linux Mint, but I don’t want to completely eliminate OS X. Thanks again for taking the time to publish this!

    –Erik

    Reply
  3. ht

    Thanks for this tutorial. I want to install Linux Mint on my new macbook air. Since I can’t use a CD I tried to create a bootable USB using unetbootin, but at the end of the process, I received a message saying that the process is complete and that it cannot be booted from a mac. Are there any other alternatives to creating bootable USB “live disks” that can boot up with mac OSs?

    Any tips for installing a dual boot Lion OS and Linux mint on a macbook air?

    Reply
  4. Kari

    Has anyone tried booting Linux from an SD card in the macbook’s SD card slot? This is something I would really like to try but I have found zilch on it….

    Reply
  5. paulcoholic

    Newbie question: Why use Boot Camp at all to partition the HD? Why not just use Disk Utility?

    I did this last summer and installed Kubuntu, and it worked just fine. Did the same thing when I replaced Kubuntu with Mint, but I messed it up somehow. (I had installed Mint over Kubuntu, using the same partitioning scheme. Whenever I booted my iMac, I got a ?-and-folder icon, which from what I can tell meant the startup process was looking for a bootable drive and took some time to do that. Eventually after a few seconds it booted into whichever OS I chose from rEfit, and worked all right. I eventually felt the need to fix the startup issue, and for now do not have Linux on my Macs.)

    Reply
  6. scott Post author

    Note to all: rEfIt does not work (yet!) with OS X Lion. So step 4 – you cannot ever boot. So probably wait until there is an update to rEFIt before attempting with a Lion machine. Thanks,

    Reply
    1. Paulcoholic

      I don’t have 10.7 Lion, just Snow Leopard.

      Reply
      1. scott Post author

        Hi Paul, That wasn’t a direct reply to you, but rather a new comment on this post. The threading is a bit odd I have in place. :O Thanks,

        Reply
        1. Paulcoholic

          Thanks, Scott. But again, why use Boot Camp to partition and not just Disk Utility? Just curious! 🙂

          Reply
  7. BugBoy

    Thanks Scott for the excellent write-up. I have tried this 3 times now but with no success. I’m trying to get Linux Mint 12 installed on a 1st gen MacBook Air with OS Lion 10.7.2. I seem to be OK with installing rEfit and I get to the screen exactly as you show it in the first picture of Step 8. If I choose the Mac icon – no problem – I boot into MacOS just fine. If i pick the Linux icon my computer gives me a black screen that says “Missing operating system”. Finally, if I choose “start partitioning tool” from the rEFIt menu I get “Error: Not Found returned from gptsync.efi” – not sure if that is relevant to my problem. Any feedback or suggestions would be appreciated.

    Reply
    1. scott Post author

      rEFIt doesn’t work with 10.7 Lion yet. (See comment just above yours). I’ll update the post,

      Reply
  8. BugBoy

    Oh yeah – – If I use the Partition Inspector app that comes with rEFIt 0.14 I get the output below.

    *** Report for internal hard disk ***

    Current GPT partition table:
    # Start LBA End LBA Type
    1 40 409639 EFI System (FAT)
    2 409640 127300735 Mac OS X HFS+
    3 127300736 128570271 Mac OS X Boot
    4 128570272 154347615 Basic Data
    5 154347616 156300741 Linux Swap

    Current MBR partition table:
    # A Start LBA End LBA Type
    1 1 39 ee EFI Protective
    2 40 409639 0b FAT32 (CHS)
    3 * 409640 127300735 af Mac OS X HFS+
    4 127300736 128570271 af Mac OS X HFS+

    MBR contents:
    Boot Code: Unknown, but bootable

    Partition at LBA 40:
    Boot Code: None (Non-system disk message)
    File System: FAT32
    Listed in GPT as partition 1, type EFI System (FAT)
    Listed in MBR as partition 2, type 0b FAT32 (CHS)

    Partition at LBA 409640:
    Boot Code: None
    File System: HFS Extended (HFS+)
    Listed in GPT as partition 2, type Mac OS X HFS+
    Listed in MBR as partition 3, type af Mac OS X HFS+, active

    Partition at LBA 127300736:
    Boot Code: None
    File System: HFS Extended (HFS+)
    Listed in GPT as partition 3, type Mac OS X Boot
    Listed in MBR as partition 4, type af Mac OS X HFS+

    Partition at LBA 128570272:
    Boot Code: GRUB
    File System: ext4
    Listed in GPT as partition 4, type Basic Data

    Partition at LBA 154347616:
    Boot Code: None
    File System: Unknown
    Listed in GPT as partition 5, type Linux Swap

    Reply
  9. Andrew

    How do I boot the linux install from a thumb drive or external?

    Thanks for all the help.

    Reply
  10. BugBoy

    Hey everyone – I was able to get Ubuntu 10.04 LTS to work with my configuration. Not exactly what I wanted , but good enough for now (I’m taking a linux course). I didn’t change the partitioning at all, just basically followed Scott’s directions but substituted Ubuntu 10,04 (64-bit) for Linux Mint.

    Reply
  11. FrenchFire

    For anyone wanting rEFIt on Lion, here’s how i got it to work on my macbook pro8,2. Installing with the rEFIt installer put my mac into a reboot loop, and i had to completely restore it. However installing manually by copying the efi folder to the root of my drive and then blessing it worked like a charm. check out rEFIt’s documentation on how to install manually. Works almost perfectly, the only issue that i’ve noted is that it tends not to recognize bootable disks from the optical drive(but for that you can just hold option key while it boots 🙂

    Cheers! and good luck

    Reply
  12. AT

    I also got it to work on OSX Lion, a different way.

    I created a partition of 1GB using Disk Utility (in the Applications/Utilities folder on your Macintosh). Then I downloaded the rEFIt ISO image available here: http://refit.sourceforge.net/#download , and used Disk Utility to restore it to the newly created partition. (You can do that by right-clicking on the file and opening-with Disk Utility).

    Finally, I ‘blessed’ the partition using the bless command:
    sudo bless –device /dev/disk0s3 –setBoot

    I used /dev/disk0s3 because I installed rEFIt on the second partition. The numbers are off, because OSX automatically creates a recovery partition. Thus, if you install rEFIt on your first partition, you can use:

    first partition = /dev/disk0s2
    second partition = /dev/disk0s3
    third partition = /dev/disk0s4

    Use the correct disk for your partition. Note that if you do this step wrong, you won’t lose any data, but you might have to boot from the CD, run a recovery shell, and try the command again to get it right. And of course, you should make a backup anyway.

    Reply
  13. daniel

    Seemed like the install went well, but when I go to boot it goes from the Penguin to a black screen and blinking cursor. Any advice? Thanks!

    Reply
    1. AT

      When you install linux, try installing it on the Master Boot Record.

      Reply
  14. thomas

    Just a Q: is there an update on rEFIt and Lion?
    Or can I just skip the rEFIt thingy and just use option key to boot into linux?

    Reply
    1. AT

      Either skip rEFIt or read the examples in the comments from someone who got it to work with OSX Lion, and copy their method. Or create your own method, and add it to the comments!

      Reply
      1. thomas

        So it is possible to boot into Linux without any disadvantages using just the option button while starting the mac?

        Reply
        1. BZ

          I would really like a response to Thomas here… that would be sweet.

          Reply
  15. thomas

    So I just installed Linux Mint on a partition created via bootable Lion DVD without rEFIt, however when I press option on bootup Linux doesn’t show up.
    I did everything according to the instructions, so what can I do to fix this?

    Reply
    1. AT

      When you figure out what you did wrong, you should let everyone know! It’s possible you didn’t install the Linux bootloader on the right partition (MBR?), or maybe you used the wrong filesystem. Just try different things until you figure out what works.

      Reply
  16. thomas

    I DID install the bootloader to the right partition. However, diskutil says (in lion) that my Linux partition is fat32 – although I deleted it … I will try to reinstall it – hopefully it will work then ^^

    Reply
    1. AT

      Try installing it on a different partition then lol. If one thing didn’t work, try another thing.

      Another thing you might try, is create two partitions for Linux. One small one (maybe 50-100megs) to hold the boot loader, which would be formatted in FAT32, and one to hold everything else, formatted in anything you want. Even KillerFS, I mean, ResierFS, if you are daring.

      Reply
      1. thomas

        Ok I managed to get it to work – funny, only with rEFIt. I do not know what I did different to others so I will just describe how I got it to work:

        Created a bootable DVD and partitioned the HD via Disk Utility. Deleted the Recovery HD that Lion created and merged the partition with the lion partition (no warranty on that one! you can ruin your system with that and PLEASE do create a bootable USB-Stick or DVD BEFORE that!)
        Then booted into Linux Mint via DVD, clicked on install, created a swap partition and reformatted the old one. It seems like Linux has to be installed on one of the first FOUR partitions – don’t ask me why …
        When I realized that I could boot into Linux just by holding the option key (EFI won’t recognize Linux) I just intalled rEFIt, booted twice. On the second bootup I pressed option and there was rEFIt.

        Now everything works fine 🙂
        Lucky me, I guess 😉

        Reply
  17. thomas

    So as I mentioned above I managed to install Linux, however, the Screen brightness is very low.
    What can I do about that?

    Reply
  18. gingercyde

    Thomas: The reason for being in the first 4 partitions is the Basic Disk type that your HD is setup to be. You can only boot from an active partition on a basic disk, and only allowed 3 primary partitions and then as many volumes as you like in an extended partition (traditionally it is 4 primary parts only or 3 primary parts and 1 extended). Partitions and volumes are not the same thing, but many OSs use the term interchangeably. The dynamic disk type cannot have primary partitions and support dual boot…basically if you have your HDD setup as a dynamic disk, you can only boot one OS. I am going to try this method soon on my MacBook Pro currently running Snow.

    Reply
  19. Wesley

    Boot Camp Assistant in OS X 10.7 no longer allows you the ability to partition your hard drive before installing an OS. It’s part and parcel of the process. For example, you now click the “Install Windows 7” option that first takes you to the partition section. Partitioning can only be finished if you have a valid Windows installation media type of some kind. Thus, Linux bootable drives are not accepted, thus you cannot partition.

    I’m beginning to think it’s impossible to install any non-Microsoft / non-Apple OS on the latest Apple hardware.

    Reply
    1. phyt0xic

      Pretty sure when you boot in Lion, hold Command+R, then go into disk utility and partition it.

      Reply
  20. JAKE

    Hello !

    I have OS x lion what do recommend I should install instead of Linux mint 13 64 bit thats what i have been struggling with the whole time.

    Please tell me about anything that’s better or at least ‘will’ work with lion 10,7,4 !!!

    Thank you soooooooooo muchhh, in advance !

    Reply
  21. Robert Vila

    Mac OSX Leopard in a macbokpro 3,1
    After installing refit and Linux with grub, and everything seems ok… how do you know if you can boot a system or a live-system from USB? How you do it?

    – I can boot a liveCD (it appears as an additional option in rEFIt)
    – I can select Linux in refit’s menu and then, doing what you do in Linux, I can boot from an Linux ISO file saved in a Linux partition.

    But:
    – How can I boot from an ISO saved in MacOS’s partition?
    – How can I boot from an USB? (noting has worked: the USB does not appear in refit’s menu, an entry in Grub’s menu does not work as it does for an ISO in HD)

    Reply
  22. Tim Posselwhite

    Awesome guide man! Thanks alot. Worked like a charm for me on my Late2008 MacBook!
    I created the new partition and formatted it in Disk Utility! Format with MS dos FAT. Worked fine that way as well
    Also, the part with the swap partition was a bit tricky. More steps for that would be useful for someone that doesn’t know partitioning.

    Thanks for a great guide!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.