From b4841f65a13e1341eb38cb4d8e2c93db4d0a450e Mon Sep 17 00:00:00 2001 From: Gabriele Giacone <1o5g4r8o@gmail.com> Date: Sun, 27 Jul 2014 13:08:37 +0200 Subject: Restore boot sector check. --- bin/g-i-installation.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bin') diff --git a/bin/g-i-installation.sh b/bin/g-i-installation.sh index 27a43ae1..cb46e1bc 100755 --- a/bin/g-i-installation.sh +++ b/bin/g-i-installation.sh @@ -242,6 +242,12 @@ boot_system() { echo "Booting system installed with g-i installation test for $NAME." # qemu related variables (incl kernel+initrd) - display first, as we grep for this in the process list QEMU_OPTS="-display vnc=$DISPLAY -no-shutdown -enable-kvm -cpu host" + echo "Checking $LV:" + FILE=$(file -Ls $LV) + if [ $(echo $FILE | grep -E '(x86 boot sector|DOS/MBR boot sector)' | wc -l) -eq 0 ] ; then + echo "ERROR: no x86 boot sector found in $LV - its filetype is $FILE." + exit 1 + fi QEMU_OPTS="$QEMU_OPTS -drive file=$LV,index=0,media=disk,cache=unsafe -m $RAMSIZE -net nic,vlan=0 -net user,vlan=0,host=10.0.2.1,dhcpstart=10.0.2.2,dns=10.0.2.254" case $NAME in debian-edu*-server) -- cgit v1.2.3-70-g09d2