I have configured my system to direct console output on boot to serial and vga using kernel parameters. Serial is the last argument in the kernel parameters and will be the default used for /dev/console. Also grub and a agetty is configured to use a serial console.

When booting the kernel messages are displayed on both consoles, as well as the init scripts and, when init is finished, the agetty.

When shutting down the system using shutdown the init stop scripts are only displayed in the serial console. I believe this is because the init scripts will only output to /dev/console. Although when the command is given the vga display will clear it screen and only kernel messages are displayed until the final reboot of the system.

I'm also using Xen4CentOS but the results using this are the same as the stock kernel.

  • Why can't I see init stop scripts on both consoles while I can see the start scripts?
  • Is there a workaround?
  • What issues the clear screen on the vga console?

To complete my question my specs and settings:

  • CentOS6 using stock kernel.
  • Kernel options: console=tty0 console=ttyS0,9600n8
  • When using Xen4CentOS added options to Xen Kernel: com1=9600,8n1 console=com1,vga
  • Set BOOTUP=serial in /etc/sysconfig/init
  • Added serial --unit=0 --speed=9600 --word=8 --parity=no --stop=1 to /etc/grub.conf

As described in the Remote Serial Console HOWTO:

When multiple consoles are listed output is sent to all consoles and input is taken from the last listed console. The last console is the one Linux uses as the /dev/console device.

You'll see messages from the kernel on all consoles but anything written to /dev/console (e.g. by init or systemd) will only appear on the last one.

  • Thank you for your answer starfry. Although you try to confirm my hypothesis that init scripts write to /dev/console when shutting down it does not answer my questions. Do init scripts only write to /dev/console when shutting down? Is there a workaround? What issues the clear-screen on the framebuffer? – Joffrey Jan 22 '15 at 12:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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