A Comp-Sci Saga
Dual Boot Mac & Linux w/ Boot Camp

This weekend I had a lot of extra free time and I was feeling a bit under the weather, so I decided to make use of this time that I couldn’t be out with friends (or out shredding the gnar on my snowboard) by installing Ubuntu Linux 9.10 on my Mac.  I encountered a variety of problems getting everything to work, so here’s how it went:

1.) Start up Boot Camp Assistant.  This can be found in /Applications/Utilities/  — For those of you who still don’t have leopard (10.5+) you have to download Boot Camp Assistant. Use google to find it.

2.) Next, click Continue. I figure printing the Installation and Setup Guide is for sissies!

3.) Allocate some space for Linux.  Do this by dragging the slider on your hard drive.  I gave Linux 15GB and left the rest of my 250GB for OS X. Here is where I encountered my first ERROR!

boot camp error

Formatting my hard-drive, and restoring it from a backup seemed like a scary idea, so I went to Google for some alternatives.

Defragmentation in Mac OS X: I found out that one can get the files to move by defragmenting the hard-drive before trying any partitioning.  Supposedly, the combination of how OS X is written along with their journaled file system, should extinguish the need for a defrag.  However, after running iDefrag, my system definitely needed it.  Unfortunately, all the defrag programs available for mac (after a very short Google search) cost money.

Defrag via Time Machine & System Restore: I gave up searching for a defragger and decided to take my Mac’s advice and do a system restore.
A.) First, I updated my external usb hard-drive (for backups) using Time Machine.
B.) Second, I plugged in my Snow Leopard cd and told my computer to restart (keeping my Time Machine Backup HD plugged in).
C.) To boot to the cd, during start up, hold the Alt/Option key.  Eventually bootloader in the form of a picture of Macintosh HD and a CD will pop up.  Click the CD to boot to the cd.
D.) Once the computer has loaded everything from the cd goto Utilities > Restore from Time Machine Backup.

About 4 hours later, my issues with partitioning had been fixed! Returning now to Boot Camp Assistant…

4.) The next screen (after the partitioning is complete) in Boot Camp Assistant asks you to either “Start Installation” (of windows) or to “Restart Mac OS X” — Since we don’t want to install windows, this is where you plug in your Linux Installation CD and click “Restart Mac OS X”

5.) Boot to the cd.  This can be done (as mentioned earlier) by holding Alt/Option during startup.

6.) Proceed to install Linux as you normally would, until you get to the partitioning section. Choose to set up the partitioning table manually. Boot Camp should have allocated your space for Linux in the form of FAT32, leaving about 500MB of free space between Mac and the Fat32 space.  Go ahead and delete this partition.

7.) Now, I’m not really sure why they leave the free space, but I figured it should stay there to be safe.  Since you now have a giant chunk of free space, it might be difficult to allocate both space for “swap” and “ext3.”  I achieved this by using the following equation:

ext3 Linux Space = Free Space - (500 for the barrier + 1024 for swap)

Create the ext3 allocation at the END of the hard-drive, and then do the same for the swap.  The mount point should obviously be ‘/’ in the ext3 partition (Note: keeping swap closer to the center of the hard-drive gives it quicker access and therefore gives you a slight performance increase when actually running linux) If you did everything right, your hard-drive should now look like

Mac OS X, 500MB Free Space Barrier, 1024MB Swap, Ext3 Linux.

8.) Finish the installation and reboot, taking the cd out.

Your computer is now ready to dual boot to both Mac OS X and Linux!! Whenever you want to boot to Linux, just hold Alt/Option during start up, and choose “Windows.”  You’ll be taken to Linux’s boot loader (either GRUB or LILO).

Finishing Notes: For more information regarding Mac’s journaled file system structure check out this link. http://support.apple.com/kb/HT2355.  Also, I installed Ubuntu 9.10 onto an ext4 partition, which worked just fine, and I imagine, is better than ext3.

  1. compscisaga posted this