Thursday, April 26, 2012

Debian / Ubuntu Record Boot Messages

Once the userspace boot messages are gone from the console in Debian, they're gone forever. How do I log all messages sent to the /dev/console device to a logfile under Debian Linux sever?

You need to use the bootlogd to record boot messages to a file called /var/log/boot. However, this is turned off by default. Edit /etc/default/bootlogd, enter:
# vi /etc/default/bootlogd
To run bootlogd at startup set it as follows:
BOOTLOGD_ENABLE=yes
After reboot you can see message in /var/log/boot:
# tail -f /var/log/boot
OR
# egrep -iw 'word1|err|warn' /var/log/boot

No comments:

Post a Comment