I have been trying to setup QEMU to provide console output only. So far I have succeeded with the following parameters: qemu-system -curses -hda debian.img
, where debian.img is a working Debian installation. No other boot related parameters are used. (N)Curses seems to be terribly buggy and slow for this purpose however, at least under a macOS host.
I found out that a better way to achieve console, non-gui output to the terminal that qemu is launched in by using -serial stdio -append "console=ttyAMA0"
instead of -curses
. This option requires you to specify a kernel with the -kernel
parameter however. Is there a way I can extract a bootable kernel from my existing Debian installation that I can provide to qemu? I already tried copying vmlinux from /boot
, and also followed this guide to extract the kernel from the OS, but they won't boot under QEMU with my existing debian.img file. I believe I possibly have to supply the initrd.img from my OS to qemu as well.
Now, is it possible to keep using my exisiting debian.img file with a fully working OS on it, while also passing an (extracted) kernel from that image (or elsewhere if needed) to qemu using the -kernel
parameter? (and the same question for the initrd.img file)
My guest OS on the debian.img file is Debian Jessy.