by Noah Gift
I know there are many OS X users curious about running Linux on their Mac hardware, but are overwhelmed with the configuration options. There are also many Linux users who want to work on one machine and would like to dual-boot OS X and Red Hat Enterprise Linux 5.
Here’s one scenario—in the animation industry. Maybe you want to work on OS X for video editing but want to boot RHEL 5 for your Animation Software, and Gnome/KDE specific open source applications. You may also be a developer who wants to work in and develop cross-platform applications. RHEL 5 is a great developer platform and now you can work in both worlds.
Enough talk, lets get your MacBookPro dual-booting. These instructions are specifically for dual-booting with MacbookPro, but there should only be minor changes to apply these instructions to different models of Mac Hardware.
You will need to perform 6 steps before beginning:
Perform a full backup of your hard drive onto an external drive. This is not an optional step. There is a chance you could lose data, so do not proceed without fully backing up your system. The easiest way to do this is to boot onto an external firewire drive running OS X and to make a disk image of your whole partition using the Disk Utility Application. Please refer to Apple documentation on your computer if you have never done this before.
Download and install Boot Camp: http://www.apple.com/macosx/bootcamp/. Please note you must carefully read the installation instructions before installing. In some situations you may need to perform a firmware upgrade before using bootcamp.
Download the ATI video driver for Linux x86, RadeonX1600. This is the exact download URL:
Or you can also go directly to the driver page and select the driver yourself:
Copy this driver onto a USB stick. You will use this USB stick to install the driver from the command line after you install RHEL5, as the X window system will not start so you won’t have access to a GUI web browser.
You need to have access to a wired internet connection as you will need to authorize your RHEL 5 installation, perform updates and do some package installations using YUM to complete the installation. Getting wireless working is beyond the scope of this article, but can be done later.
Have a copy of all five RHEL 5 discs downloaded, and both the installation and entitlements codes printed out.
Finally, print out this article during your installation as you don’t want to have to remember commands from memory later.
Creating a second partition with Boot Camp
Boot Camp was designed to repartition your OS X hard drive so you can create an additional Windows volume to boot from. It also modifies the EFI bootloader to show an additional volume called Windows. I won’t go through the specifics of how to run Boot Camp, you can refer to the bootcamp documentation that comes with the application. In a nutshell, create another volume of about 20-30GBs that you will later erase when installing RHEL 5. Please note you do not need to create a Windows driver CD as you won’t need it.
Please format the partition as a FAT32 partition for the purpose of this tutorial, although it really doesn’t matter as we will be deleting this partition later.
Installing RHEL 5
Step 1: Boot to RHEL 5 CD
Insert the RHEL 5 Installation Disk into your machine and change the startup disk in System Preferences to the RHEL 5 CD. Please note you can also reboot and hold down the “option” key to see all available boot volume options. You will do this later as the way to select RHEL 5 booting after you’re done installing.
Once you boot onto the CD, you can go through the default options until you get to Disk Partitioning. Please be extremely careful as if you select the wrong choices you will delete your hard drive permanently.
2a. Make sure all external drives are detached before you begin. If you have an external firewire drive or usb stick please remove them and navigate back several screens until the Disk Partitioning dialog starts over.
2b. Select Custom Layout.
2c. There is a 99% chance you will see three partitions:
/dev/sda1 vfat /dev/sda2 hfs+ /dev/sda3 fat32
2d. You want to highlight the fat32 partition which should probably be additionally be marked at /dev/sda3 and mark it for deletion and apply the changes. Please be extremely careful and double check that the partition is a fat32 partition before you delete it.
2e. Go back to the original dialog boxes and select option: “Use existing free space”. This will now automatically partition the free space you just created by deleting the windows partition into a customized Linux layout. You should see something like this:
VGVolGroup00 21344M volgroup LVLogVol01 21344M swap LVLogVol00 1984M ext3 /
The sizes will be different depending on how much RAM you have and what size of partition you created. Again double check and make sure that you still have a vfat and hfs+ partition before you commit any changes.
Go through the rest of the installation until you get to the Boot Loader Configuration. Please install Grub and tell grub to install on the first sector of the boot partition and not the MBR or Master Boot Record or Grub will fail to install as the MBR is where Apple stores its Boot Information.
Select what software package groups you would like to install. I selected Software Development, Virtualization, and Webserver as I used the Developer 30-day Evaluation entitlement.
When the software installs, you’re almost done. But in order to get a GUI running we will need to do a little more work. Remember the seven steps I mentioned in the beginning of the article? You’ll need to use them now.
Booting into RHEL 5
Whenever you want to boot into RHEL 5 you will need to hold down the “option” key while you are rebooting. This will bring you to a screen that shows an OS X and a Windows partition. You will need to select the “Windows” partition icon to boot into RHEL 5. (I know, how ironic.)
Pay careful attention to the Grub boot process. You will need to press the return key when you see the red Grub splash screen to append a kernel boot time parameter. The OS X hardware is a little tricky to boot into linux and so you will need to select “e” to edit the kernel options and put this exactly to the kernel line in Grub, otherwise you will get a kernel panic:
The line should look something like this now:
kernel /xen.gz-2.6.18-8.el5 append=”noapic”
Press return to enter the data and then “b” to boot with this option. Later you will need to permanently edit grub.conf to hold these boot time parameters. Don’t forget to edit this file later.
You should now be booting into RHEL 5, but the X Windows system will not be able to start as you don’t have the proper ATI driver loaded yet.
Getting the GUI to work
Step 1: Update
Update your system, but make sure you’re plugged into a wired internet connection first.
Type in exactly:
Yum will now trigger registration to Red Hat Network. Enter your installation code.
Step 2: Mount your files
Place your USB stick into your system and mount it into /mnt. To do this type in the command exactly:
You should see the output list all of the volumes on your system and should see one called something like /dev/sdb VFAT. This is your USB stick. Type this command to mount it:
mount /dev/sdb /mnt
Step 3: Install the ATI driver
Change into the directory:
cd /mnt ls -l
You should see the ATI driver you downloaded earlier:
Please make a directory in /opt
mv ati-driver-installer-8.36.5-x86.x86_64.run /opt/ati
You are moving the driver off of your USB stick into the /opt directory so you can generate an rpm for installation. Next, you’re ready to install the driver so you can begin using a GUI again. A black terminal is only nice for so long.
Run the installer by typing this into the terminal:
Please go through the wizard and select the Generic driver. This will now create an rpm for you to install. When the wizard is done you will see an rpm called:
Please install this driver by using the rpm install command:
rpm -ivh fx...blah...rpm
You will most likely see an error complaining that you do not have the correct C++ library installed. Don’t worry, you can use yum to fix that for you:
yum install c++library
Now issue the install command again.
rpm -ivh fx...blah...rpm
You should have now installed the ATI driver. Take a deep breath and relax. There are only two commands left to bring your machine’s GUI to life:
Step 4: Configure xorg.conf through the aticonfig tool.
4a. First run:
This will create an intial aticonfig file.
4b. Then configure it for your Macbook resolution:
5. Launch the GUI:
Type in exactly to start the GUI:
You’re now running RHEL 5. Pat yourself on the back.
Quick rewind: We used BootCamp to create another partition by resizing the internal hard drive, and we then installed RHEL 5. Because we were prepared before beginning, we were able to install the ATI driver and get the X Windows GUI working. Note: Wireless configuration is beyond the scope of this article, but can be done by using a 3rd party driver from http://madwifi.org/.
Shout, scream, and show your new dual-boot RHEL 5 laptop to all your friends.