27 lines
761 B
Text
Executable file
27 lines
761 B
Text
Executable file
|
|
# mount -t 9p -o trans=virtio,version=9p2000.L share /home/user
|
|
|
|
# this add to brake and inspect /dev if /dev/sda1 not found
|
|
# -append "root=/dev/sda1 console=ttyS0 rd.break"
|
|
|
|
function run {
|
|
qemu-system-x86_64 -append "root=/dev/sda1 console=ttyS0 rd.break" \
|
|
-kernel "vmlinuz-linux" \
|
|
-initrd "initramfs-linux.img" \
|
|
-m 2048 \
|
|
-smp $(sysctl -n hw.logicalcpu) \
|
|
-cpu qemu64 \
|
|
-virtfs local,path=.,security_model=none,mount_tag=share \
|
|
-drive id=root-disk,if=none,format=raw,file=linux.img \
|
|
-device ide-hd,bus=ide.0,drive=root-disk \
|
|
-drive id=data-disk,if=none,format=qcow2,file=dat.qcow2 \
|
|
-device ide-hd,bus=ide.1,drive=data-disk \
|
|
-nographic
|
|
}
|
|
|
|
|
|
function reset {
|
|
qemu-img create -f qcow2 dat.qcow2 32G
|
|
}
|
|
|
|
$1
|