[CentOS] Kickstart issue with UEFi

Sun Aug 21 02:48:58 UTC 2016
Gordon Messmer <gordon.messmer at gmail.com>

On 08/19/2016 11:35 PM, Phil Manuel wrote:
> The install fails under UEFi due to the fact the partitions are not cleared, and it doesn’t have any space to continue. Is there an extra step I need to do to remove the original partitions before the new layout will work ?

Yes.  If you have pre-existing RAID partitions, they'll automatically 
assemble before Anaconda runs, and the installer won't be able to remove 
them.  It's easiest to handle this interactively, using wipefs to clear 
the filesystems, RAID metadata, and disks.  Because my systems are 
fairly predictable, I have a function in my kickstart file that I run 
from the %pre script when I specify a keyword in the boot parameters.  
You'll want to do something similar...

Stop logical volumes if present.  Wipe filesystems with wipefs, and then 
stop the RAID volumes.  Finally, wipe the disk partition table.

wipedisks() {
         vgchange -a n
         test -b /dev/md/efi && wipefs -a /dev/md/efi && mdadm --stop 
         test -b /dev/md/boot && wipefs -a /dev/md/boot && mdadm --stop 
         test -b /dev/md/primary && wipefs -a /dev/md/primary && mdadm 
--stop /dev/md/primary
         for x in /dev/md/*
                 mdadm --stop $x
         for x in ${drives[@]}
                 for p in /dev/${x}[0-9]*
                         wipefs -a $p
                 wipefs -a $x