Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I run Linux (RedHat-based, CentOS, SL, versions 5 & 6) on a variety of Supermicro and other whitebox servers. Some have IPMI, some do not.

Sometimes we want to log into these system using the attached Keyboard/monitor console. Other times we log into these systems via a remote serial console. And other times we interact with these systems using the IPMI KVM-over-LAN. With all of these methods, we'd like to see consistant output on all of the serial console and on the KVM screens.

With all of these console methods, we want the ability to interact with the system from startup to shutdown, and we want to see the entire boot sequence. This includes seeing any messages printed by, and interacting with:

  1. The BIOS (This is handled by the BIOS console redirection in many modern BIOSes, and is independent from the Operating System)
  2. The bootloader (Grub 0.97, in this case)
  3. See messages printed by the kernel
  4. See messages printed by programs during the startup session
    • (e.g. Starting sshd: [ FAILED ] typo in sshd_config on line 171)
  5. The login: prompt , and allow me to log into the system.

I've tried a few methods, but it seems that no matter what I put in grub.conf, some messages are printed to either the monitor or the serial console, but not both.

Is it possible to tell the bootloader, Linux kernel, OS, etc. to print all messages to the attached monitor and too the serial console?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

I've tried a few methods, but it seems that no matter what I put in grub.conf, some messages are printed to either the monitor or the serial console, but not both.

In theory, you can use multiple console= options in the grub.conf to make the Linux kernel output to all console when possible, something like this:

title CentOS (2.6.18-194.el5)
    root (hd0,0)
    kernel /vmlinuz-2.6.18-194.el5 ro root=LABEL=/ rhgb console=tty0 console=ttyS0,9600n8 
    initrd /initrd-2.6.18-194.el5.img

But in fact, according to the Serial Console HOWTO, messages from init and syslog only appear on the last listed console device.

share|improve this answer
    
+1 for the tip about multiple consoles. If I look at the kernel line in grub.conf, ends with console=ttyS0,115200n8r console=tty0. As I understand it, this will send kernel console messages to the screen (tty0). In addition, Upstart (and systemd?) will automatically assign the 'primary console' (e.g. the login:` prompt and beyond) to the console which is the "last console on the commandline in grub" –  Stefan Lasiewski Sep 7 '11 at 0:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.