[CentOS] Notes on booting CentOS 6 natively on GPT with an EFI bootloader such as Chameleon without BIOS GPT/EFI support.

Wed May 16 20:21:37 UTC 2012
Lamar Owen <lowen at pari.edu>

Ok, did some experiments.  Here's the scoop.

You will need a live USB key of CentOS 6 with a persistence layer (overlay) and the EPEL gdisk package installed to make this thing boot.

On a system with Chameleon already installed, boot the CentOS 6 install media.  Installing Chameleon without OSX is an adventure that I've not done, so a 'testing' OSX install (10.6) with the Chameleon bootloader installed was used; once Chameleon is in the EFI boot partition in theory you can blow away the HFS+ OSX filesystem, but I've not tried it.  This involves partitioning the disk as GPT, and there are numerous howtos out there for many motherboards and laptops; the key is to get Chameleon in the MBR and the EFI boot partition properly created, set up with a protective MBR, and populated. 

Install to the free space on the system, using a /boot of about 500MB, swap space to taste, and other filesystems as you like.  When the install prompts for bootloader installation location, you DO NOT want to install to the MBR (Chameleon is there); rather, install it to the /boot partition (on my test system this was /dev/sda3).  Finish the installation.  It won't yet be bootable.

Now, boot your liveUSB stick.  When you get your desktop, pull up a terminal and become root.  At the root prompt, invoke gdisk just like you would fdisk, making sure to get the right disk device and partition.  The command set for gdisk is virtually identical to fdisk.  Use 'p' to list the partitions; you'll see your /boot as a partition type of 'EF00' as set by parted in the installer.  You want to change that partition type to '0700' instead.  The bootable partition must remain the small EFI boot partition of type EF00.  You can name the partitions with the 'c' command; I encourage this.  Use the 'w' to write out the GPT when done, and shut down.  Remove the CentOS 6 liveUSB and reboot.  Chameleon should automatically pick up the 'Linux' system in its bootsplash.  Now, it may be possible to get parted to make the /boot partition to be type 0700 instead of EF00; didn't try that, since I know gdisk will do it correctly.

As I was using a Dell Inspiron 640m, I used a Chameleon boot CD for a Dell Latitude D620 to good effect; you can find that on insanelymac.com.  That particular Chameleon install includes a Dell logo and such, and may be some different from your particular Chameleon install.

I have not tried this with a drive larger than 2TB; google for 'Chameleon bootloader EFI 2TB' to see the progress in this area.  In theory this would allow a BIOS booting machine to boot directly on a 2TB+ drive using GPT without having EFI or variant in the BIOS.  Once I get a single drive large than 2TB, or free up a machine with an FC connection and a > 2TB LUN attached to it, I'll try that out, and attempt to do a Chameleon installation without the OSX step in between.
-- 
Lamar Owen
Chief Information Officer
Pisgah Astronomical Research Institute
1 PARI Drive
Rosman, NC  28772
http://www.pari.edu