From 8befef16dc59618f81a3f828ff809ac5da94e971 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Thu, 5 Jul 2018 05:58:04 +0200 Subject: Parametrize cd-building --- bootcd/build.sh | 7 +++++-- bootcd/isolinux-centos.cfg | 6 +++--- bootcd/isolinux-fedora.cfg | 4 ++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/bootcd/build.sh b/bootcd/build.sh index 153ecf0..4cfee75 100755 --- a/bootcd/build.sh +++ b/bootcd/build.sh @@ -1,5 +1,8 @@ #!/bin/bash +images="root@192.168.26.134:/virtual/images/" +kickstart="http://ufo.kit.edu/ands/kickstart/" + #inst.stage2 in isolinux.cfg needs to match the label of ISO, to get lable use 'file ' or 'isoinfo -d -i ' #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" @@ -52,7 +55,7 @@ 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" +sed -e "s/@EXTRA@/$extra/g" -e "s/@KICKSTART@/$kickstart/g" $isolinux > $distrib/isolinux/isolinux.cfg || die "Can't overwrite the configuration" #Creating output folder mkdir -p iso @@ -75,4 +78,4 @@ mkdir -p iso ) #Installing -scp iso/${isoname}.iso root@192.168.26.134:/virtual/images/ +scp iso/${isoname}.iso $images diff --git a/bootcd/isolinux-centos.cfg b/bootcd/isolinux-centos.cfg index 54f3a26..58a940e 100644 --- a/bootcd/isolinux-centos.cfg +++ b/bootcd/isolinux-centos.cfg @@ -11,13 +11,13 @@ timeout 10 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 + 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=@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=@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 + 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=@KICKSTART@/centos/ inst.ks.sendsn inst.ks.sendmac xdriver=vesa nomodeset label linux menu label ^Install CentOS 7 diff --git a/bootcd/isolinux-fedora.cfg b/bootcd/isolinux-fedora.cfg index 2580b41..962feda 100644 --- a/bootcd/isolinux-fedora.cfg +++ b/bootcd/isolinux-fedora.cfg @@ -10,12 +10,12 @@ timeout 100 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 + 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=@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 + 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=@KICKSTART@/fedora/ inst.ks.sendsn inst.ks.sendmac label linux menu label ^Install Fedora 28 -- cgit v1.2.3 From db87d3dc5284372b73fbd50e96755d15deb70268 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Thu, 5 Jul 2018 06:04:12 +0200 Subject: Fix escaping --- bootcd/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootcd/build.sh b/bootcd/build.sh index 4cfee75..9c8cdda 100755 --- a/bootcd/build.sh +++ b/bootcd/build.sh @@ -1,7 +1,7 @@ #!/bin/bash images="root@192.168.26.134:/virtual/images/" -kickstart="http://ufo.kit.edu/ands/kickstart/" +kickstart="http://ufo.kit.edu/ands/kickstart" #inst.stage2 in isolinux.cfg needs to match the label of ISO, to get lable use 'file ' or 'isoinfo -d -i ' #Lantronix Spider does not provide CDROM labels (we can add inst.stage2=cdrom, but this may break booting on multicd systems) @@ -55,7 +55,7 @@ echo "Using configuration: $isolinux" #Generating config chmod +w $distrib/isolinux chmod +w $distrib/isolinux/isolinux.cfg -sed -e "s/@EXTRA@/$extra/g" -e "s/@KICKSTART@/$kickstart/g" $isolinux > $distrib/isolinux/isolinux.cfg || die "Can't overwrite the configuration" +sed -e "s/@EXTRA@/$extra/g" -e "s|@KICKSTART@|$kickstart|g" $isolinux > $distrib/isolinux/isolinux.cfg || die "Can't overwrite the configuration" #Creating output folder mkdir -p iso -- cgit v1.2.3 From acb918cf6c5401d805273c5661ec336d14b9c009 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Thu, 5 Jul 2018 06:19:09 +0200 Subject: Add script to create testing KVM virtual machine --- bootcd/testvm.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 bootcd/testvm.sh diff --git a/bootcd/testvm.sh b/bootcd/testvm.sh new file mode 100755 index 0000000..ee29f5d --- /dev/null +++ b/bootcd/testvm.sh @@ -0,0 +1,10 @@ +#! /bin/bash + +sudo modprobe kvm-intel +sudo /etc/init.d/vde start + +mkdir -p vm +[ ! -f vm/1.qcow2 ] && qemu-img create -f qcow2 vm/1.qcow2 "80G" +[ ! -f vm/2.qcow2 ] && qemu-img create -f qcow2 vm/2.qcow2 "80G" + +qemu-system-x86_64 -enable-kvm -display sdl -hda vm/1.qcow2 -hdb vm/2.qcow2 -m 2048 -net nic,macaddr=66:66:66:13:13:00 -net vde,sock=/var/run/vde.ctl -cdrom iso/centos74-ands.iso -boot order=d -- cgit v1.2.3