1、 建一個5G的raw格式的虛擬磁盤,大小根據自己的需要設定。
$ qemu-img create test.img 5G
2、接着运行qemu并加载磁盘:
$ qemu-system-x86_64 -kernel /usr/src/linux-4.6.2-x86_64/arch/x86/boot/bzImage -initrd ~/Downloads/initramfs.img ~/Downloads/disk.img -append "console=ttyS0" -nographic
</