FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 02-04-2010, 04:44 PM
Lev Lvovsky
 
Default grub2 + serial redirect

Hello,

So after 12+ years of using lilo on my server, I've decided that it might be time to upgrade my boot loader. With lilo I'm using the standard serial redirect since I'm running a headless box (more specifically it's a guest of a VirtualBox host).

With Grub2, I've been able to get the standard serial redirect working with the following in my /etc/default/grub:

---
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,9600"
GRUB_TERMINAL=serial
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=9600 --word=8 --parity=no --stop=1"
---

This works fine once the kernel is booted (it redirects output to my serial port). I am not able to see the boot menu with this new configuration however - it appears on the "video" portion of the screen, and I'm able to select a kernel that way, but the serial ouput gets nothing. With Grub v.1 on other machines with serial redirect, I've been able to get the menu. Is there some option that I'm missing?

Additionally, IIRC, the GRUB_CMDLINE_LINUX option above is conditional, meaning that if I want video vs. serial redirection while booting, I need to swap the two 'console' directives. Given that there's only one way I can specify the linux command line option, how would I go about doing this?

thanks!
-lev

--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-04-2010, 07:14 PM
Tom H
 
Default grub2 + serial redirect

> So after 12+ years of using lilo on my server, I've decided that it might be time to upgrade my boot loader. *With lilo I'm using the standard serial redirect since I'm running a headless box (more specifically it's a guest of a VirtualBox host).

> With Grub2, I've been able to get the standard serial redirect working with the following in my /etc/default/grub:

> GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,9600"
> GRUB_TERMINAL=serial
> GRUB_SERIAL_COMMAND="serial --unit=0 --speed=9600 --word=8 --parity=no --stop=1"

> This works fine once the kernel is booted (it redirects output to my serial port). *I am not able to see the boot menu with this new configuration however - it appears on the "video" portion of the screen, and I'm able to select a kernel that way, but the serial ouput gets nothing. *With Grub v.1 on other machines with serial redirect, I've been able to get the menu. *Is there some option that I'm missing?

> Additionally, IIRC, the GRUB_CMDLINE_LINUX option above is conditional, meaning that if I want video vs. serial redirection while booting, I need to swap the two 'console' directives. *Given that there's only one way I can specify the linux command line option, how would I go about doing this?

Here's a WAG:

Change
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,9600"
to
GRUB_CMDLINE_LINUX="console=ttyS0,9600"
and run
update-grub
and reboot to see if you have the serial output (and still have the
console output).


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-04-2010, 08:28 PM
Matt Zagrabelny
 
Default grub2 + serial redirect

On Thu, 2010-02-04 at 15:14 -0500, Tom H wrote:
> > So after 12+ years of using lilo on my server, I've decided that it might be time to upgrade my boot loader. With lilo I'm using the standard serial redirect since I'm running a headless box (more specifically it's a guest of a VirtualBox host).
>
> > With Grub2, I've been able to get the standard serial redirect working with the following in my /etc/default/grub:
>
> > GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,9600"
> > GRUB_TERMINAL=serial
> > GRUB_SERIAL_COMMAND="serial --unit=0 --speed=9600 --word=8 --parity=no --stop=1"
>
> > This works fine once the kernel is booted (it redirects output to my serial port). I am not able to see the boot menu with this new configuration however - it appears on the "video" portion of the screen, and I'm able to select a kernel that way, but the serial ouput gets nothing. With Grub v.1 on other machines with serial redirect, I've been able to get the menu. Is there some option that I'm missing?
>
> > Additionally, IIRC, the GRUB_CMDLINE_LINUX option above is conditional, meaning that if I want video vs. serial redirection while booting, I need to swap the two 'console' directives. Given that there's only one way I can specify the linux command line option, how would I go about doing this?
>
> Here's a WAG:
>
> Change
> GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,9600"
> to
> GRUB_CMDLINE_LINUX="console=ttyS0,9600"
> and run
> update-grub
> and reboot to see if you have the serial output (and still have the
> console output).

Here is mine and I have the same problem as the OP.

% cat /etc/default/grub
# This file is sourced by update-grub, and its variables are propagated
# to its children in /etc/grub.d/
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX="rootdelay=15 console=ttyS0,9600"
GRUB_TERMINAL=serial


Note the GRUB_CMDLINE_LINUX line, it includes console=ttyS0,9600.

Perhaps it is time to file a bug report against grub-pc?

--
Matt Zagrabelny - mzagrabe@d.umn.edu - (218) 726 8844
University of Minnesota Duluth
Information Technology Systems & Services
PGP key 4096R/42A00942 2009-12-16
Fingerprint: 5814 2CCE 2383 2991 83FF C899 07E2 BFA8 42A0 0942

He is not a fool who gives up what he cannot keep to gain what he cannot
lose.
-Jim Elliot
 
Old 02-04-2010, 08:55 PM
Lev Lvovsky
 
Default grub2 + serial redirect

Hi Tom,

On Feb 4, 2010, at 12:14 PM, Tom H wrote:
> Here's a WAG:
>
> Change
> GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,9600"
> to
> GRUB_CMDLINE_LINUX="console=ttyS0,9600"
> and run
> update-grub
> and reboot to see if you have the serial output (and still have the
> console output).

I'm not at the machine right now (don't have access to see how the video looks), but this should only change the operation of the booting of the kernel, rather than the availability of the Grub menu. On machines which use grub1, I have the following:

"terminal --timeout=1 serial console"

currently, for grub2, I have:

"terminal serial"

no timeout value, and no option to pass both serial and console in - apparently grub2 does not support the timeout option for that line.

thanks,
-lev

--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-04-2010, 10:18 PM
Tom H
 
Default grub2 + serial redirect

>> Here's a WAG:
>>
>> Change
>> GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,9600"
>> to
>> GRUB_CMDLINE_LINUX="console=ttyS0,9600"
>> and run
>> update-grub
>> and reboot to see if you have the serial output (and still have the
>> console output).

> I'm not at the machine right now (don't have access to see how the video looks), but this should only change the operation of the booting of the kernel, rather than the availability of the Grub menu. *On machines which use grub1, I have the following:

It was just a WAG...


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-04-2010, 10:20 PM
Tom H
 
Default grub2 + serial redirect

>> Here's a WAG:

>> Change
>> GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,9600"
>> to
>> GRUB_CMDLINE_LINUX="console=ttyS0,9600"
>> and run
>> update-grub
>> and reboot to see if you have the serial output (and still have the
>> console output).

> Here is mine and I have the same problem as the OP.

> % cat /etc/default/grub
> # This file is sourced by update-grub, and its variables are propagated
> # to its children in /etc/grub.d/
> GRUB_DEFAULT=0
> GRUB_TIMEOUT=5
> GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
> GRUB_CMDLINE_LINUX="rootdelay=15 console=ttyS0,9600"
> GRUB_TERMINAL=serial

That answers my WAG, in the negative...


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-04-2010, 10:23 PM
Lev Lvovsky
 
Default grub2 + serial redirect

Hey Tom,

On Feb 4, 2010, at 3:18 PM, Tom H wrote:
>> I'm not at the machine right now (don't have access to see how the video looks), but this should only change the operation of the booting of the kernel, rather than the availability of the Grub menu. On machines which use grub1, I have the following:
>
> It was just a WAG...

and much appreciated - usually if I write something out like that, it might help me sort out where else to look (http://c2.com/cgi/wiki?RubberDucking)

thanks,
-lev

--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-04-2010, 10:26 PM
Lev Lvovsky
 
Default grub2 + serial redirect

Matt,

On Feb 4, 2010, at 1:28 PM, Matt Zagrabelny wrote:
>
> Note the GRUB_CMDLINE_LINUX line, it includes console=ttyS0,9600.
>
> Perhaps it is time to file a bug report against grub-pc?

After your explaining how to do this privately, I dug through the existing bug reports, and found this:

http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg685989.html

This looks sort of similar to the related problem, although oddly enough even specifying serial doesn't get the menu on the serial console. I have to see what the video output looks like once booting...

thanks,
-lev

--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-05-2010, 04:56 AM
Tom H
 
Default grub2 + serial redirect

>>> I'm not at the machine right now (don't have access to see how the video looks), but this should only change the operation of the booting of the kernel, rather than the availability of the Grub menu. *On machines which use grub1, I have the following:

>> It was just a WAG...

> and much appreciated - usually if I write something out like that, it might help me sort out where else to look (http://c2.com/cgi/wiki?RubberDucking)

You're welcome. Sorry it was useless...


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-05-2010, 02:21 PM
Andrew Malcolmson
 
Default grub2 + serial redirect

On Thu, Feb 4, 2010 at 12:44 PM, Lev Lvovsky <lists2@sonous.com> wrote:
> Hello,
[snip.
>
> This works fine once the kernel is booted (it redirects output to my serial port). *I am not able to see the boot menu with this new configuration however - it appears on the "video" portion of the screen, and I'm able to select a kernel that way, but the serial ouput gets nothing. *With Grub v.1 on other machines with serial redirect, I've been able to get the menu. *Is there some option that I'm missing?

I was working on this a few weeks ago and AFAICK I needed the
following in grub.cfg to serial the grub menu over serial:

terminal_input serial
terminal_output serial

> Additionally, IIRC, the GRUB_CMDLINE_LINUX option above is conditional, meaning that if I want video vs. serial redirection while booting, I need to swap the two 'console' directives. *Given that there's only one way I can specify the linux command line option, how would I go about doing this?

According to the following bug report (which is also where I saw an
example using the two above lines in grub.cfg), concurrent output is
coming:

http://old.nabble.com/-bug--28628--Concurrent-console-and-serial-access-td27186757.html


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 11:35 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org