diff --git a/netinstall/CVS/Entries b/netinstall/CVS/Entries new file mode 100644 index 0000000..c7390fd --- /dev/null +++ b/netinstall/CVS/Entries @@ -0,0 +1,3 @@ +/ks.cfg/1.13/Sun Apr 17 16:24:12 2022// +D/EFI//// +D/isolinux//// diff --git a/netinstall/CVS/Repository b/netinstall/CVS/Repository new file mode 100644 index 0000000..970f181 --- /dev/null +++ b/netinstall/CVS/Repository @@ -0,0 +1 @@ +cdrom.image/sme10/netinstall diff --git a/netinstall/CVS/Root b/netinstall/CVS/Root new file mode 100644 index 0000000..c00a8e4 --- /dev/null +++ b/netinstall/CVS/Root @@ -0,0 +1 @@ +:ext:shell.koozali.org:/cvs/smeserver diff --git a/netinstall/EFI/BOOT/CVS/Entries b/netinstall/EFI/BOOT/CVS/Entries new file mode 100644 index 0000000..08bc370 --- /dev/null +++ b/netinstall/EFI/BOOT/CVS/Entries @@ -0,0 +1,2 @@ +/grub.cfg/1.5/Wed Nov 25 14:10:36 2020// +D diff --git a/netinstall/EFI/BOOT/CVS/Repository b/netinstall/EFI/BOOT/CVS/Repository new file mode 100644 index 0000000..861024d --- /dev/null +++ b/netinstall/EFI/BOOT/CVS/Repository @@ -0,0 +1 @@ +cdrom.image/sme10/netinstall/EFI/BOOT diff --git a/netinstall/EFI/BOOT/CVS/Root b/netinstall/EFI/BOOT/CVS/Root new file mode 100644 index 0000000..c00a8e4 --- /dev/null +++ b/netinstall/EFI/BOOT/CVS/Root @@ -0,0 +1 @@ +:ext:shell.koozali.org:/cvs/smeserver diff --git a/netinstall/EFI/BOOT/grub.cfg b/netinstall/EFI/BOOT/grub.cfg new file mode 100644 index 0000000..7d32557 --- /dev/null +++ b/netinstall/EFI/BOOT/grub.cfg @@ -0,0 +1,44 @@ +set default="2" + +function load_video { + insmod efi_gop + insmod efi_uga + insmod video_bochs + insmod video_cirrus + insmod all_video +} + +load_video +set gfxpayload=keep +insmod gzio +insmod part_gpt +insmod ext2 + +set timeout=60 +### END /etc/grub.d/00_header ### + +search --no-floppy --set=root -l 'SME Server' + +### BEGIN /etc/grub.d/10_linux ### +menuentry 'Install Koozali SME Server 10' --class fedora --class gnu-linux --class gnu --class os { + linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=SME\x20Server quiet inst.ks=hd:LABEL=SME\x20Server:/ks.cfg + initrdefi /images/pxeboot/initrd.img +} +menuentry 'Install Koozali SME Server 10 in text mode' --class fedora --class gnu-linux --class gnu --class os { + linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=SME\x20Server quiet inst.ks=hd:LABEL=SME\x20Server:/ks.cfg text + initrdefi /images/pxeboot/initrd.img +} +menuentry 'Test this media & install Koozali SME Server 10' --class fedora --class gnu-linux --class gnu --class os { + linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=SME\x20Server rd.live.check quiet inst.ks=hd:LABEL=SME\x20Server:/ks.cfg + initrdefi /images/pxeboot/initrd.img +} +submenu 'Troubleshooting -->' { + menuentry 'Install Koozali SME Server 10 in basic graphics mode' --class fedora --class gnu-linux --class gnu --class os { + linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=SME\x20Server xdriver=vesa nomodeset quiet inst.ks=hd:LABEL=SME\x20Server:/ks.cfg + initrdefi /images/pxeboot/initrd.img + } + menuentry 'Rescue a Koozali SME Server system' --class fedora --class gnu-linux --class gnu --class os { + linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=SME\x20Server rescue quiet + initrdefi /images/pxeboot/initrd.img + } +} diff --git a/netinstall/EFI/CVS/Entries b/netinstall/EFI/CVS/Entries new file mode 100644 index 0000000..aeddde4 --- /dev/null +++ b/netinstall/EFI/CVS/Entries @@ -0,0 +1 @@ +D/BOOT//// diff --git a/netinstall/EFI/CVS/Repository b/netinstall/EFI/CVS/Repository new file mode 100644 index 0000000..3dd32e5 --- /dev/null +++ b/netinstall/EFI/CVS/Repository @@ -0,0 +1 @@ +cdrom.image/sme10/netinstall/EFI diff --git a/netinstall/EFI/CVS/Root b/netinstall/EFI/CVS/Root new file mode 100644 index 0000000..c00a8e4 --- /dev/null +++ b/netinstall/EFI/CVS/Root @@ -0,0 +1 @@ +:ext:shell.koozali.org:/cvs/smeserver diff --git a/netinstall/isolinux/CVS/Entries b/netinstall/isolinux/CVS/Entries new file mode 100644 index 0000000..d4a991a --- /dev/null +++ b/netinstall/isolinux/CVS/Entries @@ -0,0 +1,2 @@ +/isolinux.cfg/1.10/Wed Aug 17 19:16:19 2022// +D diff --git a/netinstall/isolinux/CVS/Repository b/netinstall/isolinux/CVS/Repository new file mode 100644 index 0000000..4c7d89f --- /dev/null +++ b/netinstall/isolinux/CVS/Repository @@ -0,0 +1 @@ +cdrom.image/sme10/netinstall/isolinux diff --git a/netinstall/isolinux/CVS/Root b/netinstall/isolinux/CVS/Root new file mode 100644 index 0000000..c00a8e4 --- /dev/null +++ b/netinstall/isolinux/CVS/Root @@ -0,0 +1 @@ +:ext:shell.koozali.org:/cvs/smeserver diff --git a/netinstall/isolinux/isolinux.cfg b/netinstall/isolinux/isolinux.cfg new file mode 100644 index 0000000..df4a7f1 --- /dev/null +++ b/netinstall/isolinux/isolinux.cfg @@ -0,0 +1,137 @@ +default vesamenu.c32 +timeout 600 + +display boot.msg + +# Clear the screen when exiting the menu, instead of leaving the menu displayed. +# For vesamenu, this means the graphical background is still displayed without +# the menu itself for as long as the screen remains in graphics mode. +menu clear +menu background splash.png +menu title Koozali SME Server 10.1 +menu vshift 8 +menu rows 18 +menu margin 8 +#menu hidden +menu helpmsgrow 15 +menu tabmsgrow 13 + +# Border Area +menu color border * #00000000 #00000000 none + +# Selected item +menu color sel 0 #ffffffff #00000000 none + +# Title bar +menu color title 0 #ff7ba3d0 #00000000 none + +# Press [Tab] message +menu color tabmsg 0 #ff3a6496 #00000000 none + +# Unselected menu item +menu color unsel 0 #84b8ffff #00000000 none + +# Selected hotkey +menu color hotsel 0 #84b8ffff #00000000 none + +# Unselected hotkey +menu color hotkey 0 #ffffffff #00000000 none + +# Help text +menu color help 0 #ffffffff #00000000 none + +# A scrollbar of some type? Not sure. +menu color scrollbar 0 #ffffffff #ff355594 none + +# Timeout msg +menu color timeout 0 #ffffffff #00000000 none +menu color timeout_msg 0 #ffffffff #00000000 none + +# Command prompt text +menu color cmdmark 0 #84b8ffff #00000000 none +menu color cmdline 0 #ffffffff #00000000 none + +# Do not display the actual menu unless the user presses a key. All that is displayed is a timeout message. + +menu tabmsg Press Tab for full configuration options on menu items. + +menu separator # insert an empty line +menu separator # insert an empty line + +label linux + menu label ^Install Koozali SME Server 10 + text help + Default GUI install uses kick-start to prepare your disk, + then will let you setup the repo that you want to install from. + If you use the GUI partitioning menu, it will use the CentOS default + instead of our settings, and you will need to restart the installer. + endtext + kernel vmlinuz + append initrd=initrd.img inst.stage2=hd:LABEL=SME\x20Server quiet inst.ks=hd:LABEL=SME\x20Server:/ks.cfg + +label text + menu label ^Install Koozali SME Server 10 in text mode + text help + This text interface uses a kick-start to prepare your disk, + then let you setup the repo that you want. If you use the + partitioning menu, it will use the CentOS default instead + of our settings, and you will need to restart the installer. + endtext + kernel vmlinuz + append initrd=initrd.img inst.stage2=hd:LABEL=SME\x20Server quiet inst.ks=hd:LABEL=SME\x20Server:/ks.cfg text + +label check + menu label Test this ^media & install Koozali SME Server 10 + menu default + kernel vmlinuz + append initrd=initrd.img inst.stage2=hd:LABEL=SME\x20Server rd.live.check quiet inst.ks=hd:LABEL=SME\x20Server:/ks.cfg + +menu separator # insert an empty line + +# utilities submenu +menu begin ^Troubleshooting + menu title Troubleshooting + +label vesa + menu indent count 5 + menu label Install Koozali SME Server 10 in ^basic graphics mode + text help + Try this option out if you're having trouble installing + Koozali SME Server 10. + endtext + kernel vmlinuz + append initrd=initrd.img inst.stage2=hd:LABEL=SME\x20Server xdriver=vesa nomodeset quiet inst.ks=hd:LABEL=SME\x20Server:/ks.cfg + +label rescue + menu indent count 5 + menu label ^Rescue a Koozali SME Server system + text help + If the system will not boot, this lets you access files + and edit config files to try to get it booting again. + endtext + kernel vmlinuz + append initrd=initrd.img inst.stage2=hd:LABEL=SME\x20Server rescue quiet + +label memtest + menu label Run a ^memory test + text help + If your system is having issues, a problem with your + system's memory may be the cause. Use this utility to + see if the memory is working correctly. + endtext + kernel memtest + +menu separator # insert an empty line + +label local + menu label Boot from ^local drive + localboot 0xffff + +menu separator # insert an empty line +menu separator # insert an empty line + +label returntomain + menu label Return to ^main menu + menu exit + +menu end diff --git a/netinstall/ks.cfg b/netinstall/ks.cfg new file mode 100644 index 0000000..49cd8af --- /dev/null +++ b/netinstall/ks.cfg @@ -0,0 +1,274 @@ +# System authorization information +auth --enableshadow --passalgo=sha512 + +# We do not want SELinux +selinux --disabled + +# Services to activate +services --disabled=lm_sensors + +# Default root pass, will be changed in post-install process anyway +rootpw --lock +user --name=installer --uid=9999 + +# Accept EULA +eula --agreed + +# Partitioning from pre section +%include /tmp/part-include + +# Disable kdump +%addon com_redhat_kdump --disable +%end + + +# Add netinstall repos +url --mirrorlist https://mirrorlist.koozali.org/mirrorlist/smeos-10-x86_64 +repo --name=smeupdates --mirrorlist https://mirrorlist.koozali.org/mirrorlist/smeupdates-10-x86_64 +repo --name=remi-safe --baseurl http://rpms.famillecollet.com/enterprise/7/safe/x86_6/ +#url --url http://distro.ibiblio.org/pub/linux/distributions/smeserver/releases/10/smeos/x86_64/ +#repo --name=smeupdates --baseurl http://distro.ibiblio.org/pub/linux/distributions/smeserver/releases/10/smeupdates/x86_64/ + +# Packages to install +# need to unselect to be able to use mirrorlist or anaconda errors before loading repo. +%packages +#@^minimal +#@base +#@core +-chrony +-kexec-tools +%end + + +# Partitioning in pre-install +%pre --interpreter=/bin/bash --log=/var/log/sme-partitioning.log + +# Read command line arguments +if grep nolvm "/proc/cmdline" ; then NOLVM=true ; fi +if grep noraid "/proc/cmdline" ; then NORAID=true ; fi +if grep noxfs "/proc/cmdline" ; then FSTYPE="ext4" ; else FSTYPE="xfs" ; fi +echo "Command line arguments:" +cat /proc/cmdline + +# Minimum size of hard drive needed specified in MB +MINSIZE=5000 + +# Number of detected drives and first disk size +NDEV=0 +BASESIZE=0 +SIZEDIFF=0 + +# Loop through block devices, keep those over MINSIZE and ensure additional drives for RAID are within 100MB of the first +for DEV in $(lsblk -nl | grep disk | cut -d' ' -f1) ; do + if [ -d /sys/block/$DEV ] ; then + REMOVABLE=`cat /sys/block/$DEV/removable` + if (( $REMOVABLE == 0 )) ; then + SIZE=`cat /sys/block/$DEV/size` + MB=$(($SIZE/2**11)) + if [ $MB -gt $MINSIZE ] ; then + if [ $NDEV == 0 ] ; then + echo "First drive found: $DEV with size $MB MB" + DRIVES[$NDEV]=$DEV + BASESIZE=$MB + ((NDEV++)) + else + SIZEDIFF=$(($MB-$BASESIZE)) + if [ $SIZEDIFF -gt 100 ] || [ $SIZEDIFF -lt -100 ] ; then + echo "Drive found but size of $MB MB doesn't match $BASESIZE MB - ignoring" + else + echo "Additional drive found: $DEV with size $MB MB" + DRIVES[$NDEV]=$DEV + ((NDEV++)) + fi + fi + fi + fi + fi +done +echo "Total disks found: $NDEV" + +# Calculate recommended swap size for RAID + nolvm case +if [ -d /sys/firmware/efi ] ; then + DISKSPARE=$(($BASESIZE-200-500-3000)) +else + DISKSPARE=$(($BASESIZE-1-500-3000)) +fi +MEMSIZE=$(awk '/^MemTotal:/{print $2}' /proc/meminfo) +MEMSIZEMB=$(($MEMSIZE/2**10)) + +if [ $MEMSIZEMB -lt 2000 ] ; then + SWAPSIZE=$((2*$MEMSIZEMB)) +elif [ $MEMSIZEMB -lt 8000 ] ; then + SWAPSIZE=$MEMSIZEMB +else + SWAPSIZE=8000 +fi +if [ $SWAPSIZE -gt $DISKSPARE ] ; then SWAPSIZE=$DISKSPARE ; fi + +# Declare useful variables +printf -v DRIVELIST ",%s" "${DRIVES[@]}" +if [ $NORAID ] ; then + DRIVELIST=${DRIVES[0]} +else + DRIVELIST=${DRIVELIST:1} +fi + +echo "Final drive list: $DRIVELIST" +LEVEL=1 +SPARE=0 + + +# Error if detection has failed and fall back +if [ ${#DRIVES[@]} == 0 ] ; then + echo "No drive suitable for installation found! Reverting to Anaconda defaults." + + cat > /tmp/part-include < /tmp/part-include <> /tmp/part-include + elif [ $BASESIZE -gt 2048000 ] ; then + printf "part biosboot --fstype=biosboot --size=1 --ondisk=%s\n" "${DRIVES[0]}" >> /tmp/part-include + fi + + # Create boot partition + printf "part /boot --fstype=%s --size=500 --label=BOOT --ondisk=%s\n" "$FSTYPE" "${DRIVES[0]}" >> /tmp/part-include + + # Default to LVM unless specified at command line + if [ $NOLVM ] ; then + cat >> /tmp/part-include <> /tmp/part-include <> /tmp/part-include + elif [ $BASESIZE -gt 2048000 ] ; then + printf "part biosboot --fstype=biosboot --size=1 --ondisk=%s\n" "${DRIVES[$i]}" >> /tmp/part-include + fi + printf "part raid.%s1 --size=500 --ondisk=%s\n" "$i" "${DRIVES[$i]}" >> /tmp/part-include + + # Default to LVM unless specified + if [ $NOLVM ] ; then + printf "part raid.%s2 --size=3000 --grow --ondisk=%s\n" "$i" "${DRIVES[$i]}" >> /tmp/part-include + printf "part raid.%s3 --size=%s --ondisk=%s\n" "$i" "$SWAPSIZE" "${DRIVES[$i]}" >> /tmp/part-include + else + printf "part raid.%s2 --size=4300 --grow --ondisk=%s\n" "$i" "${DRIVES[$i]}" >> /tmp/part-include + fi + + done + + # Compute RAID level + # from https://wiki.contribs.org/Raid + # 2 Drives - Software RAID 1 + # 3 Drives - Software RAID 1 + 1 Hot-spare + # 4 Drives - Software RAID 6 + # 5+ Drives - Software RAID 6 + 1 Hot-spare + + if [ ${#DRIVES[@]} == 2 ] ; then + LEVEL=1 + SPARE=0 + elif [ ${#DRIVES[@]} == 3 ] ; then + LEVEL=1 + SPARE=1 + elif [ ${#DRIVES[@]} == 4 ] ; then + LEVEL=6 + SPARE=0 + else + LEVEL=6 + SPARE=1 + fi + + # Set up RAID devices + printf -v EFIDEVS "raid.%s0 " "${!DRIVES[@]}" + printf -v BOOTDEVS "raid.%s1 " "${!DRIVES[@]}" + printf -v ROOTDEVS "raid.%s2 " "${!DRIVES[@]}" + printf -v SWAPDEVS "raid.%s3 " "${!DRIVES[@]}" + + # Include the EFI partition if necessary + if [ -d /sys/firmware/efi ] ; then + printf "raid /boot/efi --fstype=efi --level=1 --spares=0 --device=md9 %s\n" "$EFIDEVS" >> /tmp/part-include + fi + + # Boot partition + printf "raid /boot --fstype=%s --level=1 --spares=0 --device=md0 %s\n" "$FSTYPE" "$BOOTDEVS" >> /tmp/part-include + + # Default to LVM unless specified + if [ $NOLVM ] ; then + cat >> /tmp/part-include <> /tmp/part-include <