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
Best Answer
As described in the Remote Serial Console HOWTO:
You'll see messages from the kernel on all consoles but anything written to
/dev/console
(e.g. byinit
orsystemd
) will only appear on the last one.