From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KMSr9-0002F9-4a for qemu-devel@nongnu.org; Fri, 25 Jul 2008 15:21:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KMSr7-0002Ex-HE for qemu-devel@nongnu.org; Fri, 25 Jul 2008 15:21:33 -0400 Received: from [199.232.76.173] (port=48617 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KMSr7-0002Eu-9y for qemu-devel@nongnu.org; Fri, 25 Jul 2008 15:21:33 -0400 Received: from rv-out-0708.google.com ([209.85.198.247]:46274) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KMSr6-0003wQ-UT for qemu-devel@nongnu.org; Fri, 25 Jul 2008 15:21:33 -0400 Received: by rv-out-0708.google.com with SMTP id f25so2598296rvb.22 for ; Fri, 25 Jul 2008 12:21:31 -0700 (PDT) Message-ID: Date: Fri, 25 Jul 2008 12:21:31 -0700 From: Atoosah Subject: Re: [Qemu-devel] Re: How to get target system display with qemu -nographic option? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_109896_18790367.1217013691608" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ------=_Part_109896_18790367.1217013691608 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Yay! I've almost got it. I'd appreciate a bit more help for the last few steps. Thank you David for pointing out the command options wouldn't be recognized. Now, I see how it wouldn't make sense to pass in commands to a bootable image. I had previously added the same console parameters to grub, but the kernel was not recognizing it. Vikram, thank you telling me about the -B option. That was the key :-) My kernel is not that old, 2.6.11, and so needed that option. Now I get the boot up messaged on my terminal! -- But, after bootup messages are done, I do not see the login screen. After the last bootup messages are done, shouldn't the login screen magically appear on the terminal? I don't see anyting after the last bootup message of "Starting HAL daemon: [ OK ]". Why would that be? -- Also, I'm easily able to switch to Qemu's Command window with Ctrl-a c, but cannot switch back to console. Shouldn't I be able to? Below I've listed the changes (on a 2.6.11 Fedora Core guest) I've made in case someone needs to refer to it: A) modified grub.conf as follows: default=0 timout=10 serial --unit=0 --speed=9600 terminal serial console title something root (hd0,0) kernel some_stuff -B console=ttyS0 initrd something B) In /etc/inittab mgetty was giving me respawning error so I removed the below line. It seems that mgetty was not being recognized. #T0:2345:respawn:/sbin/mgetty dev=ttyS0 b 9600 ... Vikram, have you tried mingetty? I don't have getty available. C) Running qemu as follows: $ qemu -hda myboot.img -m 512 -nographic ----------------------------------------------------------------------- Note: my last last boot message are: Checking filesystems Checking all file systems. ... [ OK ] Remounting root filesystem in read-write mode: [ OK ] Mounting local filesystems: [ OK ] Enabling local filesystem quotas: [ OK ] Enabling swap space: [ OK ] INIT: Entering runlevel: 3 Entering non-interactive startup Checking for new hardware [ OK ] Starting pcmcia: [ OK ] Starting system logger: [ OK ] ... Starting system message bus: [ OK ] Starting HAL daemon: [ OK ] ----------------------------------------------------------------------- Thank you. > Hi, > > There are two components to making output appear on the serial port. > > 1. Getting GRUB to output (the menu etc.) to the serial port. You can do > this via the following global directive > serial --unit=0 --speed=9600 > terminal serial > Add this as a "global" entry to grub.conf i.e. at the same level as your > "default" and "timeout" directives (i.e. outside the title block) > > 2. Getting the Linux kernel to output console to the serial port (once it > takes over from GRUB). I don't > have experience doing console redirection on Linux but on Opensolaris we > do it via a property specified via > a -B option specified on the "kernel" line. > > Atoosah wrote: > > title Fedora .... > > console=ttyS0 .... > > This is unlikely to work - the "console" token is interpreted by GRUB as a > command and there is no "console" command in legacy GRUB. > > Vikram > > ----- Original Message ---- > > Ah, you're going well outside my area of familiarity -- I've never set > up a console terminal over a serial line physically nor virtually. > > However, I notice you're using the "-append" line -- I made that mistake > as well, but learned that you can only use "-append" if you're also > using "-kernel" and "-initrd". Basically, you can wholly specify the > kernel in the qemu command line, or you need to go with the kernel > defined by GRUB, but you can't selectively override grub using the > command line. > > Other than that, I'm not sure how to help. Good luck! > > -david > > ------=_Part_109896_18790367.1217013691608 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Yay! I've almost got it. I'd appreciate a bit more help for the last few steps.

Thank you David for pointing out the command options wouldn't be recognized. Now, I see how it wouldn't make sense to pass in commands to a bootable image. I had previously added the same console parameters to grub, but the kernel was not recognizing it.

Vikram, thank you telling me about the -B option. That was the key :-) My kernel is not that old, 2.6.11, and so needed that option. Now I get the boot up messaged on my terminal!

-- But, after bootup messages are done, I do not see the login screen. After the last bootup messages are done, shouldn't the login screen magically appear on the terminal? I don't see anyting after the last bootup message of  "Starting HAL daemon: [  OK ]". Why would that be?

-- Also, I'm easily able to switch to Qemu's Command window with Ctrl-a c, but cannot switch back to console. Shouldn't I be able to?

Below I've listed the changes (on a 2.6.11 Fedora Core guest) I've made in case someone needs to refer to it:

A) modified grub.conf as follows:
default=0
timout=10
serial --unit=0 --speed=9600
terminal serial console
title something
         root (hd0,0)
         kernel some_stuff -B console=ttyS0
         initrd something

B) In /etc/inittab mgetty was giving me respawning error so I removed the below line. It seems that mgetty was not being recognized.
#T0:2345:respawn:/sbin/mgetty dev=ttyS0 b 9600 ...

Vikram, have you tried mingetty? I don't have getty available.

C) Running qemu as follows:
$ qemu  -hda myboot.img -m 512 -nographic
 
-----------------------------------------------------------------------
Note: my last last boot message are:
Checking filesystems
Checking all file systems.
...
[  OK  ]
Remounting root filesystem in read-write mode:  [  OK  ]
Mounting local filesystems:  [  OK  ]
Enabling local filesystem quotas:  [  OK  ]
Enabling swap space:  [  OK  ]
INIT: Entering runlevel: 3
Entering non-interactive startup
Checking for new hardware [  OK  ]
Starting pcmcia:  [  OK  ]
Starting system logger: [  OK  ]
...
Starting system message bus: [  OK  ]
Starting HAL daemon: [  OK  ]

-----------------------------------------------------------------------

Thank you.



Hi,

There are two components to making output appear on the serial port.

1. Getting GRUB to output (the menu etc.) to the serial port. You can do this via the following global directive
         serial --unit=0 --speed=9600
         terminal serial
Add this as a "global" entry to grub.conf  i.e. at the same level as your "default" and "timeout" directives (i.e. outside the title block)

2. Getting the Linux kernel to output console to the serial port (once it takes over from GRUB). I don't
   have experience doing console redirection on Linux but on Opensolaris we do it via a property specified via
   a -B option specified  on the "kernel" line.

Atoosah wrote:
> title Fedora ....
> console=ttyS0   ....

This is unlikely to work - the "console" token is interpreted by GRUB as a command and there is no "console" command in legacy GRUB.

Vikram

----- Original Message ----

Ah, you're going well outside my area of familiarity -- I've never set
up a console terminal over a serial line physically nor virtually.

However, I notice you're using the "-append" line -- I made that mistake
as well, but learned that you can only use "-append" if you're also
using "-kernel" and "-initrd".  Basically, you can wholly specify the
kernel in the qemu command line, or you need to go with the kernel
defined by GRUB, but you can't selectively override grub using the
command line.

Other than that, I'm not sure how to help.  Good luck!

-david


------=_Part_109896_18790367.1217013691608--