From: Lev Lvovsky on
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(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
From: Tom H on
> 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(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
From: Matt Zagrabelny on
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(a)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
From: Lev Lvovsky on
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(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
From: Tom H on
>> 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(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org