[CentOS] CentOS 7 kickstart question

Paul Heinlein
Fri, 05 Aug 2016 00:13:59 -0000

On Thu, 4 Aug 2016, Valeri Galtsev wrote:

> Dear Experts,
>
> Could somebody point to kicstart HOWTO specific for CentOS 7?
>
> On CentOS 7 I somehow am always given human intervention questions
> about drive which defeats unattended ks install.
>
> At least one snag I hit consistently with CentOS 7 kickstart is: it
> drops me into human decision as far as wiping hard drive and
> creating custom (or default probably as well) partitioning scheme is
> concerned. Most likely it is me who needs to learn new trick (like
> "tricking smart macintosh into actually doing what you want
done")
> as it looks like safety defeats my unattended kickstart installation
> (like on Windows: "Do you really - really want to do this?").

It would have been helpful to see the disk-specific part of your
kickstart file, but here's a snippet that's worked for me:

clearpart --all --initlabel
zerombr
bootloader --location=mbr
part ...
part ...

I've also noticed that LVM meta information will stick around during a
re-installation. So if you're reusing the names of volumes groups, you
might encounter an error. I do something like this in a %pre section:

%pre --interpreter=/usr/bin/bash
# DANGER: will remove all volume groups
for VG in $(vgs -o vg_name --noheadings); do
   vgremove -f "$VG"
done
%end

--
Paul Heinlein <> heinlein at madboa.com <> http://www.madboa.com/