Skip to contentSkip to conversation

Serial Console / NoGraphic

Qemu-devel Clemens Kolbitsch 3 participants 4 messages Sep 25, 2007 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

hi!
i've been trying around for quite some time now trying to start qemu without the graphic screen... can someone tell me exactly what I'm supposed to do??

i want to redirect the output of my i386 debian linux to my host-console (also a i386 debian) to fully see the output of a kernel panic (see previous messages i have posted).

i'm starting qemu:

qemu -hda myimage -boot c -kernel-kqemu -kernel mykernel -initrd myinitrd -append "root=/dev/hda1 console=/dev/ttyS0" -nographic

after tons of trial-and-error i finally got my system to boot, however, the login-screen is not displayed (i see all output of the starting system up until the ">>login:"). how do i connect to the serial line now to get to the login??

i have tried minicom, however that seems to just hang :-(

should i use (tell qemu to use) a different "virtual" serial console?? how to i start minicom correctly?? could you give me the parameter set you guys are using for
1.) qemu
2.) connector (minicom???)
3.) what i have to enable inside my guest-system (i have checked that /etc/securetty include ttyS0 already)

any help will - as always - be greatly appreciated!! thanks :-)

#2 lore raw
Quoted 10 lines · Clemens Kolbitsch

hi!
i've been trying around for quite some time now trying to start qemu without the graphic screen... can someone tell me exactly what I'm supposed to do??

i want to redirect the output of my i386 debian linux to my host-console (also a i386 debian) to fully see the output of a kernel panic (see previous messages i have posted).

i'm starting qemu:

qemu -hda myimage -boot c -kernel-kqemu -kernel mykernel -initrd myinitrd -append "root=/dev/hda1 console=/dev/ttyS0" -nographic

after tons of trial-and-error i finally got my system to boot, however, the login-screen is not displayed (i see all output of the starting system up until the ">>login:"). how do i connect to the serial line now to get to the login??

Add this to /etc/inittab in the guest system:
co:2345:respawn:/sbin/agetty ttyS0 9600 vt100-nav

Without that it's only going to put the login prompts on the (now hidden) virtual consoles.

The (emulated) hardware display still exists, it's just not shown. I use just such a setup for a Win2000 virtual-machine that's accessible by VNC. I've had issues with QEMU's own VNC server (it crashes with a core dump on disconnection, and no-one on the list was remotely interested) so instead I run UltraVNC within Win2000 and connect to that instead.

Signature · 5 lines
-- Michael "Soruk" McConnell
   Eridani Star System

   MailStripper - http://www.MailStripper.eu/ - UNIX spam filter
   Mail Me Anywhere - http://www.mailmeanywhere.com/ - email for phones
#4 lore raw
In reply to Clemens Kolbitsch
Quoted 29 lines · On Tuesday 25 September 2007 12:04:17 Clemens Kolbitsch wrote:

hi!
i've been trying around for quite some time now trying to start qemu without the graphic screen... can someone tell me exactly what I'm supposed to do??

i want to redirect the output of my i386 debian linux to my host-console (also a i386 debian) to fully see the output of a kernel panic (see previous messages i have posted).

i'm starting qemu:

qemu -hda myimage -boot c -kernel-kqemu -kernel mykernel -initrd myinitrd -append "root=/dev/hda1 console=/dev/ttyS0" -nographic

after tons of trial-and-error i finally got my system to boot, however, the login-screen is not displayed (i see all output of the starting system up until the ">>login:"). how do i connect to the serial line now to get to the login??

i have tried minicom, however that seems to just hang :-(

should i use (tell qemu to use) a different "virtual" serial console?? how to i start minicom correctly?? could you give me the parameter set you guys are using for
1.) qemu
2.) connector (minicom???)
3.) what i have to enable inside my guest-system (i have checked that /etc/securetty include ttyS0 already)

Quoted 2 lines

any help will - as always - be greatly appreciated!! thanks :-)

hi!
i finally found out that it was all just a configuration problem inside my guest :-)

for anyone having the same problem:

qemu myimage -serial stdio -nographic

is totally sufficient as long as you tell linux to start getty listening on a serial console (make sure that GRUB tells your kernel to
include "console=/dev/ttyS0").

in my case (a newer debian system) this was adding a file to /etc/event.d/ called "ttyS0"

containing the line

/sbin/getty -L /dev/ttyS0 38400 vt100

maybe it helps someone :-)

#3 lore raw
In reply to Michael McConnell

Hi Michael,

About your VNC problems : I have had problems w/ vnc too (see
http://qemu-forum.ipi.fi/viewtopic.php?p=10468) but had no answer as well...

Anyway, it's better to do like you're doing : installing a VNC server inside the vm is much better because you can have authentication and such things... and no mouse / keyboard issues.

I'm using Qemu VNC server for the Qemu supervisor I'm developing (see
http://sourceforge.net/projects/casimir-web/ ) and it works very well this way : ask qemu vnc to listen in a socket (-vnc unix:/tmp//vmXXX.vnc) and use socat to make it listen on a tcp port when you need it (socat TCP4-LISTEN:<port> UNIX-CONNECT:<socket>), socat will die when the connexion closes, not Qemu :)
I don't know if it is because of the socat thing, but I don't have problems anymore...

Quoted 31 lines · Michael McConnell
Quoted 10 lines · Clemens Kolbitsch

hi!
i've been trying around for quite some time now trying to start qemu without the graphic screen... can someone tell me exactly what I'm supposed to do??

i want to redirect the output of my i386 debian linux to my host-console (also a i386 debian) to fully see the output of a kernel panic (see previous messages i have posted).

i'm starting qemu:

Quoted 7 lines

qemu -hda myimage -boot c -kernel-kqemu -kernel mykernel -initrd myinitrd -append "root=/dev/hda1 console=/dev/ttyS0" -nographic

after tons of trial-and-error i finally got my system to boot, however, the login-screen is not displayed (i see all output of the starting system up until the ">>login:"). how do i connect to the serial line now to get to the login??

Add this to /etc/inittab in the guest system:
co:2345:respawn:/sbin/agetty ttyS0 9600 vt100-nav

Without that it's only going to put the login prompts on the (now hidden) virtual consoles.

The (emulated) hardware display still exists, it's just not shown. I use just such a setup for a Win2000 virtual-machine that's accessible by VNC. I've had issues with QEMU's own VNC server (it crashes with a core dump on disconnection, and no-one on the list was remotely interested) so instead I run UltraVNC within Win2000 and connect to that instead.