[CentOS] Force anaconda to use GPT labels on all drives?

Tue May 14 05:44:13 UTC 2013
Tucker <junk at gmail.com>

I did a quick search through the archive and couldn't find anything that
mapped to my need, so I figured I should ping the community and see if
anyone has the requisite knowledge and could point me in the right

*Succinct Version*
Is there a way to, using updates.img, monkey patching or swapping in a
newer Anaconda (>= 16) to force all disks to have gpt labels and not just
disks> 2TB?

*TL;DR Version*
I'm working on setting up an installation environment and am trying to make
it as machine agnostic as possible.  We're currently using CentOS 6.3 (will
start 6.4 work soon).  Getting software on a machine is simple but laying
out disks is less so.  Some of our machines have eight disks and some
twelve and some others have two.  Normenpoughaalizing on a single hardware
profile is not an option, due to the various types of systems we need.

What I'm currently having to do is wipe the partition information and set a
gpt label, in a %pre section, on the first two disks only.  After that, I
have to use our post installation installer to create the partitions on the
remaining disks.  Because of the way it works, unless we manually remove
the partitions from the remaining partitions, prior to doing the post
installation steps (which setup the host for its role), we will end up with
drives that have old information (read as: not formatted).

I understand that that normal way to do this is to use zerombr and
clearpart but this leaves me with some disks that have msdos labels (<=
2TB) and some with gpt labels (> 2TB).  In order to simplify everything,
without having to be deterministic about hardware type, we need to use gpt
labels on everything.

It appears that Anaconda 16 and beyond use gpt labels by default (unless
"nogpt" is provided as a kernel option) but CentOS (even 6.4) is using
Anaconda 13.  I've read about updates.img but I'm not sure that's the
solution (if so, I don't grok it yet).  I've managed to get Anaconda 17 to
build from source (wow... that was "fun") but don't know enough
kickstart/anaconda to know how and if I can swap that in place of the
existing Anaconda images and still get CentOS to install.