summaryrefslogtreecommitdiffstats
path: root/bootcd
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-07-04 23:08:02 +0200
committerSuren A. Chilingaryan <csa@suren.me>2018-07-04 23:08:02 +0200
commit127a9061b2af28e3cb59f67b5cf7268b59d312cd (patch)
treed8382b48f764181aaf87bfcbd741b0a3596fb4c8 /bootcd
downloadkickstart-127a9061b2af28e3cb59f67b5cf7268b59d312cd.tar.gz
kickstart-127a9061b2af28e3cb59f67b5cf7268b59d312cd.tar.bz2
kickstart-127a9061b2af28e3cb59f67b5cf7268b59d312cd.tar.xz
kickstart-127a9061b2af28e3cb59f67b5cf7268b59d312cd.zip
Initial release
Diffstat (limited to 'bootcd')
-rwxr-xr-xbootcd/build.sh78
-rw-r--r--bootcd/isolinux-centos.cfg81
-rw-r--r--bootcd/isolinux-fedora.cfg63
3 files changed, 222 insertions, 0 deletions
diff --git a/bootcd/build.sh b/bootcd/build.sh
new file mode 100755
index 0000000..153ecf0
--- /dev/null
+++ b/bootcd/build.sh
@@ -0,0 +1,78 @@
+#!/bin/bash
+
+#inst.stage2 in isolinux.cfg needs to match the label of ISO, to get lable use 'file <name.iso>' or 'isoinfo -d -i <name.iso>'
+#Lantronix Spider does not provide CDROM labels (we can add inst.stage2=cdrom, but this may break booting on multicd systems)
+centos74_label="CentOS 7 x86_64"
+centos75_label="CentOS 7 x86_64"
+fedora28_label="Fedora-S-dvd-x86_64-28"
+
+die() { echo "$*" 1>&2 ; exit 1; }
+usage() { echo "Usage: $0 <distrib> [--cdrom]"; }
+
+[ $# -gt 0 ] || { usage; exit 1; }
+
+distrib=$(echo $1 | grep -oP '[\w\d_\-]+')
+label_arg=$(echo ${distrib}_label)
+label_std=${!label_arg}
+
+[ -d $distrib ] || die "$distrib is not found"
+[ -n "$label_std" ] || die "Label for $distrib is not configured"
+
+shift
+
+ver=1
+rhver=$(echo $distrib | grep -oP '\d+')
+dname=$(echo $distrib | grep -oP '[^\d]+')
+
+
+extra=""
+isoname="$distrib-ands$(if [ $ver -gt 1 ]; then echo $ver ; fi)"
+
+while [ $# -gt 0 ]; do
+ case "$1" in
+ --cdrom)
+ media=$(if [[ "$2" =~ ^[[:alnum:]] ]]; then echo $2; else echo "cdrom"; fi)
+ extra="$extra inst.stage2=$media"
+ isoname="$isoname-$media"
+ echo $media
+ shift $(if [[ "$2" =~ ^[[:alnum:]] ]]; then echo 2; else echo 1; fi)
+ ;;
+ h | *) usage; exit 0 ;;
+ esac
+done
+
+
+isolinux="isolinux-${distrib}.cfg"
+[ -f $isolinux ] || isolinux="isolinux-${dname}.cfg"
+[ -f $isolinux ] || die "Configuration $isolinux is not found"
+
+echo "Building ${isoname}.iso with extra parameters \"$extra\" and the label \"$label_std\""
+echo "Using configuration: $isolinux"
+
+#Generating config
+chmod +w $distrib/isolinux
+chmod +w $distrib/isolinux/isolinux.cfg
+sed -e "s/@EXTRA@/$extra/g" $isolinux > $distrib/isolinux/isolinux.cfg || die "Can't overwrite the configuration"
+
+#Creating output folder
+mkdir -p iso
+
+#Building ISO
+(
+ cd $distrib || die "Can't chdir"
+ chmod 664 isolinux/isolinux.bin
+
+ rm -f iso/${isoname}.iso
+
+# On Forums Disc1 label is recommended, but it is not recognized (at least by Fedora)
+# mkisofs -o ../iso/${isoname}.iso -A "$label_std" -V "$label_std Disc 1" -volset "$label_std" \
+
+ mkisofs -o ../iso/${isoname}.iso -A "$label_std" -V "$label_std" -volset "$label_std" \
+ -U -J -joliet-long -r -v -T \
+ -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table \
+ -eltorito-alt-boot -e images/efiboot.img -no-emul-boot \
+ .
+)
+
+#Installing
+scp iso/${isoname}.iso root@192.168.26.134:/virtual/images/
diff --git a/bootcd/isolinux-centos.cfg b/bootcd/isolinux-centos.cfg
new file mode 100644
index 0000000..54f3a26
--- /dev/null
+++ b/bootcd/isolinux-centos.cfg
@@ -0,0 +1,81 @@
+#ui vesamenu.c32
+#prompt 0
+#display boot.msg
+
+default auto
+timeout 10
+
+# Second port, 115200 baud
+#serial 1 115200
+
+label auto
+ menu label ^Kickstart CentOS 7 for Ands
+ kernel vmlinuz
+ append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 @EXTRA@ console=tty1 console=ttyS1,115200 earlyprint=serial,ttyS1,115200 ip=dhcp inst.vnc inst.vncpassword=ipepdv inst.ks=http://ufo.kit.edu/ands/kickstart/centos/ inst.ks.sendsn inst.ks.sendmac
+# append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 @EXTRA@ nomodeset text console=tty1 console=ttyS1,115200 earlyprint=serial,ttyS1,115200 ip=dhcp inst.vnc inst.vncpassword=ipepdv inst.ks=http://ufo.kit.edu/ands/kickstart/ inst.ks.sendsn inst.ks.sendmac
+
+label local
+ menu label ^Kickstart CentOS 7 for Ands
+ kernel vmlinuz
+ append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 @EXTRA@ console=tty1 console=ttyS1,115200 earlyprint=serial,ttyS1,115200 ip=dhcp inst.ks=http://ufo.kit.edu/ands/kickstart/centos/ inst.ks.sendsn inst.ks.sendmac xdriver=vesa nomodeset
+
+label linux
+ menu label ^Install CentOS 7
+ kernel vmlinuz
+ append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 @EXTRA@
+
+label check
+ menu label Test this ^media & install CentOS 7
+ menu default
+ kernel vmlinuz
+ append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 @EXTRA@ rd.live.check
+
+menu separator # insert an empty line
+
+# utilities submenu
+menu begin ^Troubleshooting
+ menu title Troubleshooting
+
+label vesa
+ menu indent count 5
+ menu label Install CentOS 7 in ^basic graphics mode
+ text help
+ Try this option out if you're having trouble installing
+ CentOS 7.
+ endtext
+ kernel vmlinuz
+ append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 @EXTRA@ xdriver=vesa nomodeset
+
+label rescue
+ menu indent count 5
+ menu label ^Rescue a CentOS 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=CentOS\x207\x20x86_64 @EXTRA@ rescue
+
+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 hdd
+ 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/bootcd/isolinux-fedora.cfg b/bootcd/isolinux-fedora.cfg
new file mode 100644
index 0000000..2580b41
--- /dev/null
+++ b/bootcd/isolinux-fedora.cfg
@@ -0,0 +1,63 @@
+#default vesamenu.c32
+default auto
+# Now in 0.1s (i.e. 100 = 10s)
+timeout 100
+
+# Second port, 115200 baud
+#serial 1 115200
+
+
+label auto
+ menu label ^Kickstart Fedora 28
+ kernel vmlinuz
+ append initrd=initrd.img inst.stage2=hd:LABEL=Fedora-S-dvd-x86_64-28 @EXTRA@ console=tty1 console=ttyS1,115200 earlyprint=serial,ttyS1,115200 ip=dhcp inst.vnc inst.vncpassword=ipepdv inst.ks=http://ufo.kit.edu/ands/kickstart/fedora/ inst.ks.sendsn inst.ks.sendmac
+
+label local
+ menu label ^Kickstart Locally Fedora 28
+ kernel vmlinuz
+ append initrd=initrd.img inst.stage2=hd:LABEL=Fedora-S-dvd-x86_64-28 @EXTRA@ console=tty1 console=ttyS1,115200 earlyprint=serial,ttyS1,115200 ip=dhcp inst.ks=http://ufo.kit.edu/ands/kickstart/fedora/ inst.ks.sendsn inst.ks.sendmac
+
+label linux
+ menu label ^Install Fedora 28
+ kernel vmlinuz
+ append initrd=initrd.img inst.stage2=hd:LABEL=Fedora-S-dvd-x86_64-28 @EXTRA@
+
+label check
+ menu label Test this ^media & install Fedora 28
+ menu default
+ kernel vmlinuz
+ append initrd=initrd.img inst.stage2=hd:LABEL=Fedora-S-dvd-x86_64-28 @EXTRA@ rd.live.check
+
+label vesa
+ menu indent count 5
+ menu label Install Fedora 28 in ^basic graphics mode
+ text help
+ Try this option out if you're having trouble installing
+ Fedora 28.
+ endtext
+ kernel vmlinuz
+ append initrd=initrd.img inst.stage2=hd:LABEL=Fedora-S-dvd-x86_64-28 @EXTRA@ nomodeset
+
+label rescue
+ menu indent count 5
+ menu label ^Rescue a Fedora 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=Fedora-S-dvd-x86_64-28 @EXTRA@ rescue
+
+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
+
+label hdd
+ menu label Boot from ^local drive
+ localboot 0xffff
+