On Thu, 4 Aug 2016, Valeri Galtsev wrote:


On Thu, August 4, 2016 7:13 pm, Paul Heinlein wrote:
On Thu, 4 Aug 2016, Valeri Galtsev wrote:

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


Thanks Paul,

here is my unsuccessful (requiring human intervention) kistart disk
related part:

# System bootloader configuration
#bootloader --location=mbr --boot-drive=sda
# Darn, they changed grub password encryption standard
#bootloader --location=mbr --boot-drive=sda --append="crashkernel=no rhgb
quiet" --md5pass=$1$F/BHluSk$YticIZvEKa6Ckmw6GYTno.
bootloader --location=mbr --boot-drive=sda --append="crashkernel=no rhgb
quiet"
# Partition clearing information
clearpart --all --initlabel --drives=sda
# Disk partitioning information
part /boot --fstype="xfs" --ondisk=sda --size=500 --asprimary
part  [... other ops on sda ...]

The only bit you don't have is the "zerombr" directive. From the Red Hat documentation:

If zerombr is specified, any invalid partition tables found on disks are initialized. This destroys all of the contents of disks with invalid partition tables. This command is required when performing an unattended installation on a system with previously initialized disks.

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html

--
Paul Heinlein <> heinl...@madboa.com <> http://www.madboa.com/
_______________________________________________
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos

Reply via email to