Re: Kickstart issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We ran into the same issue at my company, and I didn't want anaconda to install
on the SAN and wipe out a database.  The trick is to use a python script in the
%pre section of your kickstart to write out a partitioning file, then import
that using %import.  Your kickstart should looks like so:

install
text
network --bootproto dhcp
...
zerombr yes
bootloader --location mbr
clearpart --all --initlabel
%include /tmp/part-include

%packages
...

%pre
/usr/bin/python <<EOB
import sys

sys.path.append("/usr/lib/anaconda")

import isys

drive = isys.hardDriveDict().keys()[0]
f = open("/tmp/part-include", "w")
f.write("partition /boot --fstype=ext3 --size=200 --ondisk=%s\n" % (drive,))
f.write("partition / --fstype=ext3 --size=10240 --ondisk=%s\n" % (drive,))
f.write("partition /var --fstype=ext3 --size=4096 --ondisk=%s\n" % (drive,))
f.write("partition swap --size=2048 --ondisk=%s\n" % (drive,))
f.write("partition swap --size=2048 --ondisk=%s\n" % (drive,))
f.write("partition pv.01 --size=1 --grow --ondisk=%s\n" % (drive,))
f.write("volgroup vg0 pv.01 --pesize=32768\n")
f.write("logvol /logs --vgname vg0 --size=1 --grow --name logs --fstype=ext3\n")
f.close()

EOB

%post
..





_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list

[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux