安装qemu
sudo apt install qemu-system-x86 -y
启动系统
cd ~/code
qemu-system-x86_64 -nographic \
-kernel ./linux-6.1.120/arch/x86_64/boot/bzImage \
-initrd ./busybox-1.36.1/rootfs.cpio \
-append "console=ttyS0 nokaslr"
输出
2秒启动完, 按回车进入命令行
系统启动时会停留在: Please press Enter to activate this console. 按回车进入命令行.
系统已经启动成功, 可以试试常用命令.