33 lines
774 B
Bash
Executable file
33 lines
774 B
Bash
Executable file
#!/bin/bash
|
|
|
|
mkdir -vp esp/EFI/BOOT
|
|
cp $1 esp/EFI/BOOT/BOOTX64.EFI
|
|
shift
|
|
|
|
echo "$(pwd)"
|
|
|
|
qemu-system-x86_64 -accel kvm \
|
|
-m 4G \
|
|
-cpu host \
|
|
-smp 2,sockets=1,dies=1,cores=2,threads=1 \
|
|
-vga virtio \
|
|
-nodefaults \
|
|
-no-reboot \
|
|
-serial stdio \
|
|
-usb -device usb-mouse \
|
|
-drive if=pflash,format=raw,readonly=on,file=/usr/share/ovmf/x64/OVMF_CODE.fd \
|
|
-drive if=pflash,format=raw,readonly=on,file=/usr/share/ovmf/x64/OVMF_VARS.fd \
|
|
-device isa-debug-exit,iobase=0xf4,iosize=0x04 \
|
|
-drive format=qcow2,file=btrfs.qcow2 \
|
|
-drive format=qcow2,file=ntfs.qcow2 \
|
|
-drive format=raw,file=fat:rw:esp $@ \
|
|
-drive format=qcow2,file=windows.qcow2
|
|
|
|
case $? in
|
|
33)
|
|
exit 0;;
|
|
*)
|
|
exit $?;;
|
|
esac
|
|
|