summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriele Giacone <1o5g4r8o@gmail.com>2014-07-27 13:08:37 +0200
committerGabriele Giacone <1o5g4r8o@gmail.com>2014-07-27 13:08:37 +0200
commitb4841f65a13e1341eb38cb4d8e2c93db4d0a450e (patch)
tree83ff0eec73e36b15d3ae5891bda64d36fbbe2b80
parentf4a75028b5c61b4fc19509ed72adba2170e6c88a (diff)
downloadjenkins.debian.net-b4841f65a13e1341eb38cb4d8e2c93db4d0a450e.tar.xz
Restore boot sector check.
-rwxr-xr-xbin/g-i-installation.sh6
1 files changed, 6 insertions, 0 deletions
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)