init
This commit is contained in:
commit
b3dba4542f
44 changed files with 1596 additions and 0 deletions
27
bin/vm
Executable file
27
bin/vm
Executable file
|
@ -0,0 +1,27 @@
|
|||
|
||||
# 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
|
Loading…
Add table
Add a link
Reference in a new issue