2 |
auth --enableshadow --passalgo=sha512 |
auth --enableshadow --passalgo=sha512 |
3 |
# Use CDROM installation media |
# Use CDROM installation media |
4 |
cdrom |
cdrom |
5 |
# Use graphical install |
# we do not want Selinux |
|
#graphical |
|
|
#%include /usr/share/anaconda/interactive-defaults.ks |
|
|
#install |
|
|
ignoredisk --only-use=vda |
|
|
# Keyboard layouts |
|
|
keyboard --xlayouts='us' |
|
|
# System language |
|
|
lang en_US.UTF-8 |
|
6 |
selinux --disabled |
selinux --disabled |
7 |
#firewall --disabled |
# services to activate |
8 |
#services --enabled=NetworkManager,sshd |
services --disabled=lm_sensors |
9 |
#eula --agreed |
# default root pass, willbe changed in post-install process anyway |
10 |
#reboot |
rootpw --lock |
11 |
|
|
12 |
|
# include the partitioning logic from the pre section. |
13 |
|
%include /tmp/part-include |
14 |
|
|
15 |
# System timezone |
%pre |
16 |
timezone America/New_York --isUtc |
# pre section |
17 |
# System bootloader configuration |
#----- partitioning logic below-------------- |
18 |
bootloader --append=" crashkernel=auto quiet" --location=mbr --boot-drive=vda |
# pick the first drive that is not removable and is over MINSIZE |
19 |
|
DIR="/sys/block" |
20 |
|
|
21 |
|
# minimum size of hard drive needed specified in GIGABYTES |
22 |
|
MINSIZE=20 |
23 |
|
|
24 |
|
ROOTDRIVE="" |
25 |
|
|
26 |
|
# /sys/block/*/size is in 512 byte chunks |
27 |
|
|
28 |
|
for DEV in sda sdb sdc sdd hda hdb vda vdb xvda xvdb; do |
29 |
|
if [ -d $DIR/$DEV ]; then |
30 |
|
REMOVABLE=`cat $DIR/$DEV/removable` |
31 |
|
if (( $REMOVABLE == 0 )); then |
32 |
|
echo $DEV |
33 |
|
SIZE=`cat $DIR/$DEV/size` |
34 |
|
GB=$(($SIZE/2**21)) |
35 |
|
if [ $GB -gt $MINSIZE ]; then |
36 |
|
echo "$(($SIZE/2**21))" |
37 |
|
if [ -z $ROOTDRIVE ]; then |
38 |
|
ROOTDRIVE=$DEV |
39 |
|
fi |
40 |
|
fi |
41 |
|
fi |
42 |
|
fi |
43 |
|
done |
44 |
|
|
45 |
|
echo "ROOTDRIVE=$ROOTDRIVE" |
46 |
|
|
47 |
autopart --type=lvm |
# drives smaller than 40GB use smaller boot and swap partitions |
48 |
# Partition clearing information |
# drives larger than 40GB use percentage-based partition sizes |
|
clearpart --all --initlabel --drives=vda |
|
49 |
|
|
50 |
|
if [ $GB -lt 40 ]; then |
51 |
|
|
52 |
bootloader --location=mbr |
# drives smaller than 40GB |
53 |
|
cat << EOF > /tmp/part-include |
54 |
zerombr |
zerombr |
55 |
#part swap --asprimary --fstype="swap" --size=1024 |
clearpart --all --drives=$ROOTDRIVE --initlabel |
56 |
#part /boot --fstype xfs --size=200 |
bootloader --location=mbr --driveorder=$ROOTDRIVE |
57 |
#part pv.01 --size=1 --grow |
# for boot partition |
58 |
#volgroup rootvg01 pv.01 |
part /boot --fstype ext4 --size=300 --ondisk=$ROOTDRIVE |
59 |
#logvol / --fstype xfs --name=lv01 --vgname=rootvg01 --size=1 --grow |
# for LVM partition |
60 |
|
part pv.8 --size=4600 --grow --ondisk=$ROOTDRIVE |
61 |
|
# LVM |
62 |
|
volgroup main --pesize=65536 pv.8 |
63 |
|
logvol / --fstype ext4 --name=root --vgname=main --grow --size=3000 |
64 |
|
logvol swap --fstype swap --name=swap --vgname=main --size=1500 |
65 |
|
|
66 |
services --disabled=lm_sensors |
EOF |
67 |
|
|
68 |
|
|
69 |
|
else |
70 |
|
# drives 40GB and larger |
71 |
|
|
72 |
|
cat << EOF > /tmp/part-include |
73 |
|
zerombr |
74 |
|
clearpart --all --drives=$ROOTDRIVE --initlabel |
75 |
|
bootloader --location=mbr --driveorder=$ROOTDRIVE |
76 |
|
# for boot partition |
77 |
|
part /boot --fstype ext4 --size=500 --ondisk=$ROOTDRIVE |
78 |
|
# for LVM partition |
79 |
|
part pv.8 --size=4600 --grow --ondisk=$ROOTDRIVE |
80 |
|
# LVM |
81 |
|
volgroup main --pesize=65536 pv.8 |
82 |
|
logvol / --fstype ext4 --name=root --vgname=main --grow --size=3000 |
83 |
|
logvol swap --fstype swap --name=swap --vgname=main --size=4000 |
84 |
|
|
85 |
|
EOF |
86 |
|
|
87 |
|
fi |
88 |
|
|
89 |
|
%end |
90 |
|
|
91 |
|
|
92 |
|
|
93 |
|
|
94 |
|
|
95 |
|
|
96 |
|
|
97 |
|
|
98 |
|
|
99 |
|
|
100 |
|
|
101 |
|
|
102 |
|
|
103 |
|
|
104 |
|
|
105 |
|
|
106 |
|
|
107 |
|
# packages to install |
108 |
%packages |
%packages |
109 |
@^minimal |
@^minimal |
110 |
@base |
@base |
117 |
|
|
118 |
# pre script could be inserted there to handle partitionning |
# pre script could be inserted there to handle partitionning |
119 |
|
|
120 |
%post --log=/root/ks-post.log --interpreter=/usr/bin/bash |
%post --interpreter=/usr/bin/bash |
121 |
# before reboot performing post-install |
# before reboot performing post-install |
122 |
# this is for first alpha iso. we should put this in anaconda |
# this is for first alpha iso. we should put this in anaconda |
123 |
# and / or handle possible upgrade later |
# and / or handle possible upgrade later |
124 |
/sbin/rsyslogd; |
/sbin/rsyslogd; |
125 |
sleep 2; |
sleep 2; |
126 |
/sbin/e-smith/signal-event post-install; |
/sbin/e-smith/signal-event post-install; |
127 |
|
sleep 2; |
128 |
|
/sbin/e-smith/db configuration set UnsavedChanges no; |
129 |
touch /forcequotacheck |
touch /forcequotacheck |
130 |
|
|
131 |
%end |
%end |