/[smeserver]/cdrom.image/sme10/netinstall/ks.cfg
ViewVC logotype

Annotation of /cdrom.image/sme10/netinstall/ks.cfg

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Sat Jun 13 20:01:09 2020 UTC (3 years, 11 months ago) by jpp
Branch: MAIN
netinstall

1 jpp 1.1 # System authorization information
2     auth --enableshadow --passalgo=sha512
3    
4     # we do not want Selinux
5     selinux --disabled
6    
7     # services to activate
8     services --disabled=lm_sensors
9    
10     # default root pass, willbe changed in post-install process anyway
11     rootpw --lock
12    
13     # Accept eula
14     eula --agreed
15    
16     # include the partitioning logic from the pre section.
17     %include /tmp/part-include
18    
19     # disable kdump
20     %addon com_redhat_kdump --disable
21     %end
22    
23     # added for netinstall
24     url --url https://mirror.canada.pialasse.com/releases/testing/10/smeos/x86_64/
25     repo --name=smeupdates --baseurl=https://mirror.canada.pialasse.com/releases/testing/10/smeupdates/x86_64/
26     #repo --name=remi-safe --baseurl=http://rpms.famillecollet.com/enterprise/7/safe/x86_64/
27     #repo --name=smeupdates-testing --baseurl=http://mirror.canada.pialasse.com/releases/testing/10/smeupdates-testing/x86_64/
28     #firewall --disabled
29     # /added for netinstall
30    
31     %pre --interpreter=/bin/bash
32     # pre section
33     #----- partitioning logic below--------------
34     # pick the first drive that is not removable and is over MINSIZE
35     DIR="/sys/block"
36    
37     # minimum size of hard drive needed specified in GIGABYTES
38     MINSIZE=5
39    
40    
41     # Number of detected drives
42     NDEV=0
43    
44     for DEV in $(lsblk -nl | grep disk | cut -d' ' -f1); do
45     if [ -d /sys/block/$DEV ]; then
46     REMOVABLE=`cat /sys/block/$DEV/removable`
47     if (( $REMOVABLE == 0 )); then
48     SIZE=`cat /sys/block/$DEV/size`
49     GB=$(($SIZE/2**21))
50     if [ $GB -gt $MINSIZE ]; then
51     DRIVES[$NDEV]=$DEV
52     ((NDEV++))
53     fi
54     fi
55     fi
56     done
57    
58     # For now keep things simple and just use the first one
59     # TODO:
60     # * Create software RAID depending on the number of detected drives
61     # * Allow non LVM install
62    
63     ROOTDRIVE=${DRIVES[0]}
64     if [ $ROOTDRIVE == "" ] ; then
65     echo "No drive suitable for installation found! Please proceed manually."
66     # first in case detection fails...
67     cat << EOF > /tmp/part-include
68     # Clear the Master Boot Record
69     zerombr
70     # System bootloader configuration
71     clearpart --all --initlabel
72     # Automatically create partitions, no LVM
73     autopart --lvm
74    
75     EOF
76    
77     else
78     cat <<_EOF > /tmp/part-include
79     zerombr
80     clearpart --all --drives=$ROOTDRIVE --initlabel
81     bootloader --boot-drive=$ROOTDRIVE
82     part /boot --fstype xfs --size=500 --ondisk=$ROOTDRIVE --label=BOOT
83     part pv.01 --size=4500 --grow --ondisk=$ROOTDRIVE
84     volgroup main pv.01
85     logvol / --fstype xfs --name=root --vgname=main --grow --size=3000 --label=ROOT
86     logvol swap --fstype swap --name=swap --vgname=main --recommended --label=SWAP
87     _EOF
88    
89     fi
90    
91     %end
92    
93    
94    
95     # packages to install
96     %packages
97     @base
98     @core
99     -chrony
100     -kexec-tools
101     -firewalld
102     %end
103    
104    
105    
106     %post --interpreter=/usr/bin/bash --log=/var/log/ks.post02.log
107     # before reboot performing post-install
108     # this is for first alpha iso. we should put this in anaconda
109     # and / or handle possible upgrade later
110     /sbin/rsyslogd;
111     sleep 2;
112     /sbin/e-smith/signal-event post-install;
113     sleep 2;
114     /sbin/e-smith/db configuration set UnsavedChanges no;
115     touch /forcequotacheck
116    
117     %end
118    
119     %post --nochroot --log=/mnt/sysimage/var/log/ks.post01.log
120     #!/bin/bash
121     sysimage="/mnt/sysimage"
122    
123     cp -r /tmp/anaconda.log ${sysimage}/root/
124     %end

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed