23 |
|
|
24 |
|
|
25 |
# Add netinstall repos |
# Add netinstall repos |
26 |
repo --name=smeos --baseurl=http://mirror.canada.pialasse.com/releases/testing/10/smeos/x86_64/ |
#this one gives curl 6 errors on netinstall while added manually works from time to time |
27 |
repo --name=smeupdates --baseurl=http://mirror.canada.pialasse.com/releases/testing/10/smeupdates/x86_64/ |
#url --mirrorlist https://mirrorlist.koozali.org/mirrorlist/smeos-10-x86_64 |
28 |
|
#repo --name=smeupdates --mirrorlist https://mirrorlist.koozali.org/mirrorlist/smeupdates-10-x86_64 |
29 |
|
repo --name=smeos --baseurl http://distro.ibiblio.org/pub/linux/distributions/smeserver/releases/10/smeos/x86_64/ |
30 |
|
repo --name=smeupdates --baseurl http://distro.ibiblio.org/pub/linux/distributions/smeserver/releases/testing/10/smeupdates/x86_64/ |
31 |
|
|
32 |
# Packages to install |
# Packages to install |
33 |
%packages |
%packages |
45 |
# Read command line arguments |
# Read command line arguments |
46 |
if grep nolvm "/proc/cmdline" ; then NOLVM=true ; fi |
if grep nolvm "/proc/cmdline" ; then NOLVM=true ; fi |
47 |
if grep noraid "/proc/cmdline" ; then NORAID=true ; fi |
if grep noraid "/proc/cmdline" ; then NORAID=true ; fi |
48 |
|
if grep noxfs "/proc/cmdline" ; then FSTYPE="ext4" ; else FSTYPE="xfs" ; fi |
49 |
echo "Command line arguments:" |
echo "Command line arguments:" |
50 |
cat /proc/cmdline |
cat /proc/cmdline |
51 |
|
|
156 |
fi |
fi |
157 |
|
|
158 |
# Create boot partition |
# Create boot partition |
159 |
printf "part /boot --fstype=xfs --size=500 --label=BOOT --ondisk=%s\n" "${DRIVES[0]}" >> /tmp/part-include |
printf "part /boot --fstype=%s --size=500 --label=BOOT --ondisk=%s\n" "$FSTYPE" "${DRIVES[0]}" >> /tmp/part-include |
160 |
|
|
161 |
# Default to LVM unless specified at command line |
# Default to LVM unless specified at command line |
162 |
if [ $NOLVM ] ; then |
if [ $NOLVM ] ; then |
163 |
cat >> /tmp/part-include <<EOF |
cat >> /tmp/part-include <<EOF |
164 |
part / --fstype=xfs --grow --size=3000 --label=ROOT --ondisk=${DRIVES[0]} |
part / --fstype=$FSTYPE --grow --size=3000 --label=ROOT --ondisk=${DRIVES[0]} |
165 |
part swap --fstype=swap --recommended --label=SWAP --ondisk=${DRIVES[0]} |
part swap --fstype=swap --recommended --label=SWAP --ondisk=${DRIVES[0]} |
166 |
EOF |
EOF |
167 |
else |
else |
168 |
cat >> /tmp/part-include <<EOF |
cat >> /tmp/part-include <<EOF |
169 |
part pv.01 --size=4300 --grow --ondisk=${DRIVES[0]} |
part pv.01 --size=4300 --grow --ondisk=${DRIVES[0]} |
170 |
volgroup main pv.01 |
volgroup main pv.01 |
171 |
logvol / --fstype=xfs --name=root --vgname=main --grow --size=3000 |
logvol / --fstype=$FSTYPE --name=root --vgname=main --grow --size=3000 |
172 |
logvol swap --fstype=swap --name=swap --vgname=main --recommended |
logvol swap --fstype=swap --name=swap --vgname=main --recommended |
173 |
EOF |
EOF |
174 |
fi |
fi |
229 |
fi |
fi |
230 |
|
|
231 |
# Boot partition |
# Boot partition |
232 |
printf "raid /boot --fstype=xfs --level=1 --spares=0 --device=md0 %s\n" "$BOOTDEVS" >> /tmp/part-include |
printf "raid /boot --fstype=%s --level=1 --spares=0 --device=md0 %s\n" "$FSTYPE" "$BOOTDEVS" >> /tmp/part-include |
233 |
|
|
234 |
# Default to LVM unless specified |
# Default to LVM unless specified |
235 |
if [ $NOLVM ] ; then |
if [ $NOLVM ] ; then |
236 |
cat >> /tmp/part-include <<EOF |
cat >> /tmp/part-include <<EOF |
237 |
raid / --fstype=xfs --level=$LEVEL --spares=$SPARE --device=md1 $ROOTDEVS |
raid / --fstype=$FSTYPE --level=$LEVEL --spares=$SPARE --device=md1 $ROOTDEVS |
238 |
raid swap --fstype=swap --level=$LEVEL --spares=$SPARE --device=md2 $SWAPDEVS |
raid swap --fstype=swap --level=$LEVEL --spares=$SPARE --device=md2 $SWAPDEVS |
239 |
EOF |
EOF |
240 |
else |
else |
241 |
cat >> /tmp/part-include <<EOF |
cat >> /tmp/part-include <<EOF |
242 |
raid pv.01 --level=$LEVEL --spares=$SPARE --device=md1 $ROOTDEVS |
raid pv.01 --level=$LEVEL --spares=$SPARE --device=md1 $ROOTDEVS |
243 |
volgroup main pv.01 |
volgroup main pv.01 |
244 |
logvol / --fstype xfs --name=root --vgname=main --grow --size=3000 |
logvol / --fstype=$FSTYPE --name=root --vgname=main --grow --size=3000 |
245 |
logvol swap --fstype swap --name=swap --vgname=main --recommended |
logvol swap --fstype swap --name=swap --vgname=main --recommended |
246 |
EOF |
EOF |
247 |
fi |
fi |