I have a couple lines like:
part / --ondisk=sda --fstype ext3 --size=20000 --asprimary part swap --ondisk=sda --size=4000 --asprimary part /home --ondisk=sda --fstype ext3 --size=1 --asprimary --grow
in my kickstart file.
Is there a way to have 1 kickstart file that works for hda and sda both???
So I would like to have 1 kickstart file that works for either a hda install or sda install. Thanks, Jerry
On Wed, 30 Apr 2008 at 2:46pm, Jerry Geis wrote
I have a couple lines like:
part / --ondisk=sda --fstype ext3 --size=20000 --asprimary part swap --ondisk=sda --size=4000 --asprimary part /home --ondisk=sda --fstype ext3 --size=1 --asprimary --grow
in my kickstart file.
Is there a way to have 1 kickstart file that works for hda and sda both???
If you only expect to have 1 drive in the systems you're installing, you can just leave off the "--ondisk=".
/ I have a couple lines like: />/ />/ part / --ondisk=sda --fstype ext3 --size=20000 --asprimary />/ part swap --ondisk=sda --size=4000 --asprimary />/ part /home --ondisk=sda --fstype ext3 --size=1 --asprimary --grow />/ />/ in my kickstart file. />/ />/ Is there a way to have 1 kickstart file that works for hda and sda both??? / If you only expect to have 1 drive in the systems you're installing, you can just leave off the "--ondisk=".
Thanks, what do I do when I am installing RAID with 2 disks then.
Jerry
On Wed, 30 Apr 2008 at 4:30pm, Jerry Geis wrote
/ I have a couple lines like: />/ />/ part / --ondisk=sda --fstype ext3 --size=20000 --asprimary />/ part swap --ondisk=sda --size=4000 --asprimary />/ part /home --ondisk=sda --fstype ext3 --size=1 --asprimary --grow />/ />/ in my kickstart file. />/ />/ Is there a way to have 1 kickstart file that works for hda and sda both??? / If you only expect to have 1 drive in the systems you're installing, you can just leave off the "--ondisk=".
Thanks, what do I do when I am installing RAID with 2 disks then.
AFAIK, there you're stuck with calling the disks by hda/sda.
Jerry Geis wrote:
I have a couple lines like:
part / --ondisk=sda --fstype ext3 --size=20000 --asprimary part swap --ondisk=sda --size=4000 --asprimary part /home --ondisk=sda --fstype ext3 --size=1 --asprimary --grow
in my kickstart file.
Is there a way to have 1 kickstart file that works for hda and sda both???
So I would like to have 1 kickstart file that works for either a hda install or sda install. Thanks, Jerry
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Jerry,
see the attached example of my partitioning %pre script i use for all my builds.
hope it helps.
Ben
%include /tmp/part-include
%pre
#!/bin/bash
set $(list-harddrives)
# $1 = 1st disk name # $2 = 1st disk size # $3 = 2nd disk name # $4 = 2nd disk size # so on
let numhd=$#/2
drive1=$1 drive2=$3
# calculate swap mem=$(grep MemTotal /proc/meminfo | awk '{print $2}') swap=$(( $mem / 1000 * 2 ))
#Write out partition scheme based on whether there are 1 or 2 hard drives
if [ $numhd == "2" ] ; then #2 drives echo "# partitioning scheme generated in %pre for 2 drives" > /tmp/part-include echo "bootloader --location=mbr --driveorder=$drive1,$drive2" >> /tmp/part-include echo "clearpart --all --initlabel" >> /tmp/part-include echo "part raid.11 --size=100 --ondisk=$drive1" >> /tmp/part-include echo "part raid.21 --size=100 --ondisk=$drive2" >> /tmp/part-include echo "part raid.13 --size=100 --ondisk=$drive1 --grow" >> /tmp/part-include echo "part raid.23 --size=100 --ondisk=$drive2 --grow" >> /tmp/part-include
echo "raid /boot --fstype ext3 --level=RAID1 --device=md0 raid.11 raid.21" >> /tmp/part-include echo "raid pv.01 --level=RAID1 --device=md2 raid.13 raid.23" >> /tmp/part-include
echo "volgroup vg0 pv.01" >> /tmp/part-include
echo "logvol swap --fstype swap --name=swap --vgname=vg0 --size=$swap" >> /tmp/part-include echo "logvol / --fstype ext3 --name=root --vgname=vg0 --size=300 --grow" >> /tmp/part-include else #1 drive echo "# partitioning scheme generated in %pre for 1 drives" > /tmp/part-include echo "bootloader --location=mbr --driveorder=$drive1" >> /tmp/part-include echo "clearpart --all --initlabel" >> /tmp/part-include echo "part /boot --fstype ext3 --size=100 --ondisk=$drive1" >> /tmp/part-include echo "part swap --fstype ext3 --size=$swap --ondisk=$drive1" >> /tmp/part-include echo "part / --fstype ext3 --size=300 --ondisk=$drive1 --grow" >> /tmp/part-include fi
[ -f /tmp/part-include ] || touch /tmp/part-include