Last active
August 14, 2019 09:22
-
-
Save ljmccarthy/b238e108456eeecc6f53537bcee5da30 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
HDA=disk.img | |
run_qemu() { | |
qemu-system-i386 \ | |
-cpu pentium \ | |
-m size=64M \ | |
-vga cirrus \ | |
-soundhw sb16,adlib \ | |
-netdev user,id=network0 \ | |
-device rtl8139,netdev=network0 \ | |
-drive "file=$HDA,format=raw,if=ide" \ | |
"$@" | |
} | |
case $1 in | |
init) | |
qemu-img create -f raw "$HDA" 100M | |
;; | |
install) | |
# Change floppy with command: | |
# (qemu) change floppy0 disk.img | |
run_qemu -drive "file=$2,format=raw,if=floppy" -boot "order=a" -monitor stdio | |
;; | |
run) | |
run_qemu | |
;; | |
monitor) | |
run_qemu -monitor stdio | |
;; | |
*) | |
echo "usage: $0 [init | install FDIMG | run | monitor]" | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment