I'm trying to use parted to partition my entire drives automatically during the CentOS kickstart install, however, I'm getting two issues with my install. I want to kickstart my installs across multiple devices without any required user input.
Issue 1 UNSOLVED: Came across the Assign Devices screen which required user input. Ex: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/Assign_Storage_Devices-ppc.html. What can I do to avoid this?
Issue 2 RESOLVED: On the second attempt of the install, it is saying the software RAID device is already in use and causes the install to exit. (Maybe from the previous install or the last try) How do I avoid this error?
Resolution of Issue 2: I resolved issue two by writing a script for the %pre section:
%pre
#!/bin/bash
for x in `ls /dev/sd[a-z][1-9]`
do
mdadm --misc --zero-superblock $x
done
Exact error: The software RAID array name "md1" is already in use.
My top section (part / raid commands):
raid /boot --fstype=ext4 --level=1 --device=md0 /dev/sda1 /dev/sdb1
raid / --fstype=ext4 --level=1 --device=md1 /dev/sda2 /dev/sdb2
Then in my %pre section:
%pre
parted -s /dev/sda mklabel gpt
parted -s /dev/sda mkpart 1 1MB 200MB
parted -s /dev/sda mkpart 2 200MB 16GB
parted -s /dev/sda mkpart 3 16GB -1
parted -s /dev/sda set 1 raid on
parted -s /dev/sda set 2 raid on
parted -s /dev/sdb mklabel gpt
parted -s /dev/sdb mkpart 1 1MB 200MB
parted -s /dev/sdb mkpart 2 200MB 16GB
parted -s /dev/sdb mkpart 3 16GB -1
parted -s /dev/sdb set 1 raid on
parted -s /dev/sdb set 2 raid on