projects
/
rrq
/
rescue-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
317e77d
)
cleanup
author
Ralph Ronnquist
<rrq@rrq.au>
Fri, 8 Mar 2024 13:07:22 +0000
(
00:07
+1100)
committer
Ralph Ronnquist
<rrq@rrq.au>
Fri, 8 Mar 2024 13:07:22 +0000
(
00:07
+1100)
run.sh
patch
|
blob
|
history
diff --git
a/run.sh
b/run.sh
index 86895f3fe8b56abfdcea33a1010c8598359b68bd..519621d43058f390518b8b683375abbc555d8ac1 100755
(executable)
--- a/
run.sh
+++ b/
run.sh
@@
-4,24
+4,29
@@
DISK=disk.raw
[ -f $DISK ] || dd if=/dev/null of=$DISK bs=1G count=0 seek=4
CD=$1
FS=FS.sqfs
[ -f $DISK ] || dd if=/dev/null of=$DISK bs=1G count=0 seek=4
CD=$1
FS=FS.sqfs
-PCODE=/usr/share/OVMF/OVMF_CODE_4M.fd
-PVARS=/usr/share/OVMF/OVMF_VARS_4M.fd
-cp $PVARS pvars.bin
if [ -n "$EFI" ] ; then
if [ -n "$EFI" ] ; then
- EFI="
+ PCODE=/usr/share/OVMF/OVMF_CODE_4M.fd
+ PVARS=/usr/share/OVMF/OVMF_VARS_4M.fd
+ cp $PVARS pvars.bin
+ BOOT="
-drive if=pflash,readonly=on,format=raw,file=$PCODE
-drive if=pflash,readonly=off,format=raw,file=pvars.bin
"
-drive if=pflash,readonly=on,format=raw,file=$PCODE
-drive if=pflash,readonly=off,format=raw,file=pvars.bin
"
+else
+ BOOT="-boot menu=on,splash-time=60000"
fi
NET="-nic vde,sock=/run/vde.ctl,model=e1000,mac=06:38:d0:34:20:d2"
QEMU=qemu-system-x86_64
[ -z "${CD##*i386*}" ] && QEMU=qemu-system-i386
fi
NET="-nic vde,sock=/run/vde.ctl,model=e1000,mac=06:38:d0:34:20:d2"
QEMU=qemu-system-x86_64
[ -z "${CD##*i386*}" ] && QEMU=qemu-system-i386
+CDT=cdrom
+[ -z "${CD##*.img}" ] && CDT=disk
+
exec $QEMU -name "${CD%.img}" -m 2G -M pc,accel=kvm -cpu host \
exec $QEMU -name "${CD%.img}" -m 2G -M pc,accel=kvm -cpu host \
-
-drive media=disk,format=raw,file=$CD
\
+
$BOOT
\
-drive media=disk,format=raw,file=$DISK \
-drive media=disk,format=raw,file=$DISK \
+ -drive media=$CDT,format=raw,file=$CD \
-virtfs local,path=FS,mount_tag=FS,security_model=passthrough \
-serial mon:stdio -echr 0x1c -vga std \
-virtfs local,path=FS,mount_tag=FS,security_model=passthrough \
-serial mon:stdio -echr 0x1c -vga std \
- $EFI $NET
-# -boot menu=on,splash-time=60000 \
+ $NET
# -kernel FS/vmlinuz -initrd FS/initrd.img \
# -append "root=FS rootfstype=9p console=ttyS0"
# -kernel FS/vmlinuz -initrd FS/initrd.img \
# -append "root=FS rootfstype=9p console=ttyS0"