summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2010-06-29 02:58:55 -0300
committerGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2010-06-29 02:58:55 -0300
commit6a0333c9556cbe43d8eff73a37ae8f862dbba8ba (patch)
tree1c9deb4bf18f8e8381d6fbc94909371e879ab93e
parent3e773f1c728d7d36484041d5432fc04821fee5b2 (diff)
downloadarchiso32-6a0333c9556cbe43d8eff73a37ae8f862dbba8ba.tar.xz
Improved testiso to allow differents scenarios
A quick & dirty changes to test iso withs differents combinations of I={virtio,scsi,ide} x M={disk,cdrom} Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
-rwxr-xr-xarchiso/testiso27
1 files changed, 23 insertions, 4 deletions
diff --git a/archiso/testiso b/archiso/testiso
index 9de347a..75bedc9 100755
--- a/archiso/testiso
+++ b/archiso/testiso
@@ -1,7 +1,26 @@
-#!/bin/sh
+#!/bin/bash
-if [ $# -ne 1 ]; then
- echo "usage: testiso <iso name>"
+if [ $# -eq 0 ]; then
+ echo "usage: testiso <isofile> [id|ic|sd|sc|vd|vc]"
+ echo
+ echo "id boot .iso as IDE disk"
+ echo "ic boot .iso as IDE cd-rom"
+ echo "sd boot .iso as SCSI disk"
+ echo "sc boot .iso as SCSI cd-rom"
+ echo "vd boot .iso as virtio disk"
+ echo "vc boot .iso as virtio cd-rom"
exit 1
fi
-qemu -boot d -kernel-kqemu -m 256 -cdrom "${1}"
+
+case "${2}" in
+ id) IF="ide"; MEDIA="disk";;
+ ic) IF="ide"; MEDIA="cdrom";;
+ sd) IF="scsi"; MEDIA="disk";;
+ sc) IF="scsi"; MEDIA="cdrom";;
+ vd) IF="virtio"; MEDIA="disk";;
+ vc) IF="virtio"; MEDIA="cdrom";;
+ *) IF="scsi"; MEDIA="cdrom";;
+esac
+
+echo qemu -m 256 -drive file=${1},if=${IF},media=${MEDIA},boot=on
+qemu -m 256 -drive file=${1},if=${IF},media=${MEDIA},boot=on