4

How can I install Linux on a Mac without screwing up any data? I don't want to open Mac OS X and then use something like VirtualBox. I want to boot right into Linux OR Mac OS X.

Is there a good way to do this?

I have a late 2012 iMac right now with the latest version of Mac OS X (10.9, Mavericks).

1

Lucky you since you have Mac OS X. Windows users are envious at how easy this will be.

When you install Linux—and may I suggest you choose Linux Mint 17 Xfce for its ease of setup and ability to mimic the Mac desktop—you need to setup a USB FlashDrive for the install.

Tools to create such a drive include Penguintosh—and there's a tutorial for using that here—since you must initially create the USB drive image as an EFI compatible hybrid device.

As an alternative for USB flash drive creation, you can do it all in Mint as explained here.

Lifehacker Australia also has a step-by-step tutorial on making your Mac dual-boot.

Then—once installed—the GRUB2 menu will appear and ask which OS you want to boot into.

If you want the default OS to be your Mac OS X, then edit GRUB2 as so:

Make a backup of your current GRUB2 config file like this:

sudo cp -an /etc/default/grub /etc/default/grub.sav

And then edit the GRUB2 config like this; for this example we are using nano but you can use any text editor you wish:

sudo nano /etc/default/grub

Find the line that contains GRUB_DEFAULT=0 and set it to GRUB_DEFAULT=X where X is the index of grub menu item for Mac OS X.

Since the numbering is based on zero indexing, the first item in the list is 0, the second item is indexed as 1, the third item is indexed as 2 and the fourth item is 3. So to boot to the fourth item in the list, the line should say GRUB_DEFAULT=3.

Then rebuild the updated grub configuration by running this command:

sudo update-grub

Reboot your machine & you should be all set.

As an alternative, you can just boot directly from the USB flash drive if you wish. But the instructions above allow you to create a nice dual boot setup on one drive.

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.