summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2013-01-08 14:22:24 +0100
committerHolger Levsen <holger@layer-acht.org>2013-01-08 14:22:24 +0100
commit13a2fffda8d729a5c09272dd6f2bcbf0a8251575 (patch)
tree84100bdbdf78c9930268ea93fec393cb974b51bf
parentc3e17179b40c2af240c539980aef1be1908f0cdd (diff)
downloadjenkins.debian.net-13a2fffda8d729a5c09272dd6f2bcbf0a8251575.tar.xz
g-i: fail if no bootable image was created
-rwxr-xr-xbin/g-i-installation.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/g-i-installation.sh b/bin/g-i-installation.sh
index 837ce0eb..5bbc0dfb 100755
--- a/bin/g-i-installation.sh
+++ b/bin/g-i-installation.sh
@@ -191,8 +191,11 @@ boot_system() {
QEMU_OPTS="-display vnc=$DISPLAY -no-shutdown"
QEMU_OPTS="$QEMU_OPTS -drive file=$NAME.raw,index=0,media=disk,cache=writeback -m $RAMSIZE"
echo "Checking $NAME.raw:"
- file $NAME.raw
- # FIXME: exit here if image is not bootable
+ FILE=$(file $NAME.raw)
+ if [ $(echo $FILE | grep "x86 boot sector" | wc -l) -eq 0 ] ; then
+ echo "ERROR: no x86 boot sector found in $NAME.raw - it's filetype is $FILE."
+ exit 1
+ fi
case $NAME in
debian-edu*_combi-server)
QEMU_OPTS="$QEMU_OPTS -net nic -net user -net nic,model=e1000"