Created
September 26, 2019 09:08
-
-
Save bjackman/f76a09a6b99cb3ec236617ef1793b4f9 to your computer and use it in GitHub Desktop.
QEMU command to boot with host rootfs
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
KERNEL_IMG=~/sources/linux/linux/arch/x86/boot/bzImage | |
kvm \ | |
-kernel $KERNEL_IMG \ | |
-smp $(nproc) \ | |
-m 2G \ | |
-nographic \ | |
-fsdev local,security_model=none,id=fsdev-root,path=/,readonly \ | |
-device virtio-9p-pci,id=fs-root,fsdev=fsdev-root,mount_tag=/dev/root \ | |
-serial mon:stdio \ | |
-append "console=ttyS0 root=/dev/root ro rootflags=trans=virtio,version=9p2000.u rootfstype=9p lsm= init=/bin/bash" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment