Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 733776d181
Fetching contributors…

Cannot retrieve contributors at this time

executable file 53 lines (42 sloc) 0.97 kB
#/bin/sh
set -e
set -x
usage () { echo "usage: `basename $0` [ --uefi ] [ --usb ] disk iso" ; return 0; }
usageerr () { usage >&2 ; return 1 ; }
MEM=4096
[ $# -lt 5 ] || usageerr
[ $# -gt 1 ] || usageerr
SPREZZ_USB=0
SPREZZ_UEFI=0
if [ $1 == "--uefi" ] ; then
SPREZZ_UEFI=1
shift
elif [ $1 == "--usb" ] ; then
SPREZZ_USB=1
shift
elif [ $# -gt 2 ] ; then
usageerr
fi
if [ $1 == "--uefi" ] ; then
SPREZZ_UEFI=1
shift
elif [ $1 == "--usb" ] ; then
SPREZZ_USB=1
shift
elif [ $# -gt 2 ] ; then
usageerr
fi
if [ $SPREZZ_UEFI -ne 0 ] ; then
KVMOPTS="-L ovmf -bios OVMF.fd"
fi
KVMOPTS="$KVMOPTS -vga cirrus"
rm -f "$1"
qemu-img create "$1" 80G
qemu-img create "$1-1" 120G
qemu-img create "$1-2" 120G
KVMOPTS="$KVMOPTS -drive file=$1-1 -drive file=$1-2"
if [ $SPREZZ_USB -ne 0 ] ; then
kvm --hda "$1" -drive file="$2",if=none,id=b,boot=on -m $MEM -usb -device usb-storage,drive=b $KVMOPTS
else
kvm --boot d --hda "$1" --cdrom "$2" -m $MEM -usb $KVMOPTS
fi
Jump to Line
Something went wrong with that request. Please try again.