summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshuai chen <chenshuai@huawei.com>2016-03-02 03:34:12 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-03-02 03:34:12 +0000
commite34f5c3a2900141a6ba67351a1260cd83c531160 (patch)
tree7f306f612652d1f2408a1b1a80262f1750135677
parente34bf5069353f2e91fe6c1682ca21dd12b16e3e7 (diff)
parent7a45023d02b13a282a592bc8b1edbda7ee3e2bae (diff)
Merge "bugfix: nfs space is too small on compass core, need make it bigger"
-rw-r--r--util/ks.cfg31
1 files changed, 14 insertions, 17 deletions
diff --git a/util/ks.cfg b/util/ks.cfg
index dd31d8fd..76ce0ff6 100644
--- a/util/ks.cfg
+++ b/util/ks.cfg
@@ -34,20 +34,15 @@ skipx
# System timezone
timezone America/Los_Angeles --isUtc
# System bootloader configuration
-bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
+
+%include /tmp/bootloader.ks
+
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
-part swap --asprimary --fstype="swap" --ondisk=sda --size=3072
-part /boot --asprimary --fstype="ext3" --ondisk=sda --size=500
-part pv.64 --fstype="lvmpv" --ondisk=sda --size=27145
-volgroup os --pesize=4096 pv.64
-logvol /var --fstype="ext3" --grow --percent=40 --name=varvol --vgname=os
-logvol /tmp --fstype="ext3" --grow --percent=5 --name=tmpvol --vgname=os
-logvol / --fstype="ext3" --grow --percent=50 --name=rootvol --vgname=os
-logvol /home --fstype="ext3" --grow --percent=5 --name=homevol --vgname=os
+%include /tmp/partition.ks
%pre
#!/bin/sh
@@ -124,14 +119,16 @@ sleep 3
hdparm -z /dev/${tgtdrive}
# partition
-echo > /tmp/partition.ks
-echo "partition /boot --onpart=/dev/${tgtdrive}3" >> /tmp/partition.ks
-echo "partition pv.001 --ondisk=${tgtdrive} --size=30000 --grow" >> /tmp/partition.ks
-echo "volgroup os pv.001" >> /tmp/partition.ks
-echo "logvol swap --vgname=os --recommended --name=swap" >> /tmp/partition.ks
-echo "logvol / --vgname=os --size=10000 --name=root --fstype=ext4" >> /tmp/partition.ks
-echo "logvol /var --vgname=os --size=10000 --percent 60 --grow --name=var --fstype=ext4" >> /tmp/partition.ks
-echo "logvol /var/log --vgname=os --size=4096 --percent 40 --grow --name=varlog --fstype=ext4" >> /tmp/partition.ks
+cat << EOF > /tmp/partition.ks
+part swap --asprimary --fstype="swap" --ondisk=sda --size=3072
+part /boot --asprimary --fstype="ext3" --ondisk=sda --size=500
+part pv.64 --fstype="lvmpv" --ondisk=sda --size=$((tgtdrivesize-3600))
+volgroup os --pesize=4096 pv.64
+logvol /var --fstype="ext3" --grow --percent=40 --name=varvol --vgname=os
+logvol /tmp --fstype="ext3" --grow --percent=5 --name=tmpvol --vgname=os
+logvol / --fstype="ext3" --grow --percent=50 --name=rootvol --vgname=os
+logvol /home --fstype="ext3" --grow --percent=5 --name=homevol --vgname=os
+EOF
# bootloader setting
echo "bootloader --location=mbr --driveorder=${tgtdrive} --append=' biosdevname=0 crashkernel=none'" > /tmp/bootloader.ks