* [Qemu-devel] Re: How to get target system display with qemu -nographic option?
@ 2008-07-21 20:40 Atoosah
2008-07-21 21:52 ` David Barrett
0 siblings, 1 reply; 6+ messages in thread
From: Atoosah @ 2008-07-21 20:40 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 2274 bytes --]
Thank you guys for the explanation. I don't want to ssh as that will modify
the behavior of my kernel. The option -monitor requires a device, and so
"none" would be viewed as a device (which does not exist).
My goal is to run qemu and have my guests display available via the serial
line (for example /dev/ttyS0). In order to do this, it seems to me that the
guests grub.conf file console parameter needs to be modified (similar to
below); on the host, qemu needs to be started with "console" option (as
shown below); finally, another terminal should be opened with serial port
capabilities (such as minicom). Is this correct? If so, how do I get
minicom to connect?
- I've modified my guest kernel /boot/grub/grub.conf file as follows:
title Fedora ...
console=ttyS0,38400n8
- To start qemu the options I use are:
qemu -hda mydisk.img -m 512 -append "root=/dev/hda console=ttyS0" -nographic
-serial pty
- My minicom settings are similar to my grub.conf file, i.e. "Comm
Parameters" are 38400 8N1
If I start qemu in one terminal and minicom in the other, should my guests
display automatically show up in the minicom screen? If not, how do I get
minicom to connect to /dev/ttyS0? So far, my minicom shows as offline. (I've
also tried GtkTerm, with no success).
Thanks again.
> Ah, "graphics" means "display" -- it doesn't matter whether your guest
> VM is running X or using a simple terminal, it all looks like one big
> graphic to qemu.
>
> Said another way, "-nographic" disables the display entirely, whether
> that display is used for graphics or text.
>
> I don't know what you're trying to do with /etc/inittab. That doesn't
> mean it's wrong, it just means I've never found it necessary to go that
> route. I'm guessing you should probably undo all your changes there and
> just stick with whatever was the default, and then use the "-nographic
> -monitor none" option I mention above.
>
> -david
>
> On the guest. When you use -nographic, you get a (vritual) pc without
> a monitor, but with a serial port. If your Fedora is not set up to
> have a login on the serial port, you will see nothing when you connect
> a serial cable to the port. You can have login prompts both on serial
> and on screen.
>
> You could also ssh into the guest instead.
>
>
>
[-- Attachment #2: Type: text/html, Size: 2719 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] Re: How to get target system display with qemu -nographic option?
2008-07-21 20:40 Atoosah
@ 2008-07-21 21:52 ` David Barrett
0 siblings, 0 replies; 6+ messages in thread
From: David Barrett @ 2008-07-21 21:52 UTC (permalink / raw)
To: qemu-devel
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
Atoosah wrote:
> Thank you guys for the explanation. I don't want to ssh as that will
> modify the behavior of my kernel. The option -monitor requires a device,
> and so "none" would be viewed as a device (which does not exist).
>
> My goal is to run qemu and have my guests display available via the
> serial line (for example /dev/ttyS0). In order to do this, it seems to
> me that the guests grub.conf file console parameter needs to be modified
> (similar to below); on the host, qemu needs to be started with
> "console" option (as shown below); finally, another terminal should be
> opened with serial port capabilities (such as minicom). Is this
> correct? If so, how do I get minicom to connect?
>
> - I've modified my guest kernel /boot/grub/grub.conf file as follows:
> title Fedora ...
> console=ttyS0,38400n8
>
> - To start qemu the options I use are:
> qemu -hda mydisk.img -m 512 -append "root=/dev/hda console=ttyS0"
> -nographic -serial pty
>
> - My minicom settings are similar to my grub.conf file, i.e. "Comm
> Parameters" are 38400 8N1
> If I start qemu in one terminal and minicom in the other, should my
> guests display automatically show up in the minicom screen? If not, how
> do I get minicom to connect to /dev/ttyS0? So far, my minicom shows as
> offline. (I've also tried GtkTerm, with no success).
>
> Thanks again.
>
>
> Ah, "graphics" means "display" -- it doesn't matter whether your guest
> VM is running X or using a simple terminal, it all looks like one big
> graphic to qemu.
>
> Said another way, "-nographic" disables the display entirely, whether
> that display is used for graphics or text.
>
> I don't know what you're trying to do with /etc/inittab. That doesn't
> mean it's wrong, it just means I've never found it necessary to go that
> route. I'm guessing you should probably undo all your changes there and
> just stick with whatever was the default, and then use the "-nographic
> -monitor none" option I mention above.
>
> -david
>
> On the guest. When you use -nographic, you get a (vritual) pc without
> a monitor, but with a serial port. If your Fedora is not set up to
> have a login on the serial port, you will see nothing when you connect
> a serial cable to the port. You can have login prompts both on serial
> and on screen.
>
> You could also ssh into the guest instead.
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] Re: How to get target system display with qemu -nographic option?
@ 2008-07-21 23:16 Vikram Hegde
0 siblings, 0 replies; 6+ messages in thread
From: Vikram Hegde @ 2008-07-21 23:16 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 4100 bytes --]
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 ----
From: David Barrett <dbarrett@quinthar.com>
To: qemu-devel@nongnu.org
Sent: Monday, July 21, 2008 2:52:14 PM
Subject: Re: [Qemu-devel] Re: How to get target system display with qemu -nographic option?
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
Atoosah wrote:
> Thank you guys for the explanation. I don't want to ssh as that will
> modify the behavior of my kernel. The option -monitor requires a device,
> and so "none" would be viewed as a device (which does not exist).
>
> My goal is to run qemu and have my guests display available via the
> serial line (for example /dev/ttyS0). In order to do this, it seems to
> me that the guests grub.conf file console parameter needs to be modified
> (similar to below); on the host, qemu needs to be started with
> "console" option (as shown below); finally, another terminal should be
> opened with serial port capabilities (such as minicom). Is this
> correct? If so, how do I get minicom to connect?
>
> - I've modified my guest kernel /boot/grub/grub.conf file as follows:
> title Fedora ...
> console=ttyS0,38400n8
>
> - To start qemu the options I use are:
> qemu -hda mydisk.img -m 512 -append "root=/dev/hda console=ttyS0"
> -nographic -serial pty
>
> - My minicom settings are similar to my grub.conf file, i.e. "Comm
> Parameters" are 38400 8N1
> If I start qemu in one terminal and minicom in the other, should my
> guests display automatically show up in the minicom screen? If not, how
> do I get minicom to connect to /dev/ttyS0? So far, my minicom shows as
> offline. (I've also tried GtkTerm, with no success).
>
> Thanks again.
>
>
> Ah, "graphics" means "display" -- it doesn't matter whether your guest
> VM is running X or using a simple terminal, it all looks like one big
> graphic to qemu.
>
> Said another way, "-nographic" disables the display entirely, whether
> that display is used for graphics or text.
>
> I don't know what you're trying to do with /etc/inittab. That doesn't
> mean it's wrong, it just means I've never found it necessary to go that
> route. I'm guessing you should probably undo all your changes there and
> just stick with whatever was the default, and then use the "-nographic
> -monitor none" option I mention above.
>
> -david
>
> On the guest. When you use -nographic, you get a (vritual) pc without
> a monitor, but with a serial port. If your Fedora is not set up to
> have a login on the serial port, you will see nothing when you connect
> a serial cable to the port. You can have login prompts both on serial
> and on screen.
>
> You could also ssh into the guest instead.
>
>
>
[-- Attachment #2: Type: text/html, Size: 5281 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] Re: How to get target system display with qemu -nographic option?
@ 2008-07-25 19:21 Atoosah
0 siblings, 0 replies; 6+ messages in thread
From: Atoosah @ 2008-07-25 19:21 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 3758 bytes --]
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
>
>
[-- Attachment #2: Type: text/html, Size: 4764 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] Re: How to get target system display with qemu -nographic option?
@ 2008-07-26 1:03 Vikram Hegde
0 siblings, 0 replies; 6+ messages in thread
From: Vikram Hegde @ 2008-07-26 1:03 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 4656 bytes --]
Hi Atoosah,
>-- 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?
Try to disable X startup (shouldn't actually be a problem since you don't have a framebuffer in the guest)
> 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.
No I haven't tried mgetty. Getting it to work may solve your problem.
Vikram
----- Original Message ----
From: Atoosah <atoosaah@gmail.com>
To: qemu-devel@nongnu.org
Sent: Friday, July 25, 2008 12:21:31 PM
Subject: Re: [Qemu-devel] Re: How to get target system display with qemu -nographic option?
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
[-- Attachment #2: Type: text/html, Size: 5997 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] Re: How to get target system display with qemu -nographic option?
@ 2008-07-26 3:13 Vikram Hegde
0 siblings, 0 replies; 6+ messages in thread
From: Vikram Hegde @ 2008-07-26 3:13 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 5249 bytes --]
Hi Atoosah,
Something else you may want to try:
- The -B option on the "kernel" line was a Solaris specific extension added to the modified GRUB that ships with Solaris. So it is unlikely -B is used for the same purpose in Linux. Try deleting the -B i.e. just have something like
kernel ...something... console=ttyS0
I bet that would work as well
Vikram
----- Original Message ----
From: Vikram Hegde <vikhegde1@yahoo.com>
To: qemu-devel@nongnu.org
Sent: Friday, July 25, 2008 6:03:36 PM
Subject: Re: [Qemu-devel] Re: How to get target system display with qemu -nographic option?
Hi Atoosah,
>-- 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?
Try to disable X startup (shouldn't actually be a problem since you don't have a framebuffer in the guest)
> 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.
No I haven't tried mgetty. Getting it to work may solve your problem.
Vikram
----- Original Message ----
From: Atoosah <atoosaah@gmail.com>
To: qemu-devel@nongnu.org
Sent: Friday, July 25, 2008 12:21:31 PM
Subject: Re: [Qemu-devel] Re: How to get target system display with qemu -nographic option?
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
[-- Attachment #2: Type: text/html, Size: 6936 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-07-26 3:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-25 19:21 [Qemu-devel] Re: How to get target system display with qemu -nographic option? Atoosah
-- strict thread matches above, loose matches on Subject: below --
2008-07-26 3:13 Vikram Hegde
2008-07-26 1:03 Vikram Hegde
2008-07-21 23:16 Vikram Hegde
2008-07-21 20:40 Atoosah
2008-07-21 21:52 ` David Barrett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).