Debian / Ubuntu Record Boot Messages

by on February 3, 2010 · 5 comments· LAST UPDATED February 3, 2010

in

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

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 5 comments… read them below or add one }

1 Al B.. February 3, 2010 at 10:28 pm

Interesting…But I thought usually whatever is in console is usually piped to messages anyway

Reply

2 dj February 6, 2010 at 11:38 pm
3 techbrainless February 12, 2010 at 6:55 pm

Thanks for the nice post ,

dj you are right regarding Ubuntu , i have tried the above method but it did not work for me (I am using ubuntu 9.10) but unfortunately i have just noticed your comment after applying the above method ……………………..

Reply

4 Yogesh May 18, 2010 at 1:49 pm

How do I do same with CentOS/RHEL?
Plz help Vivek!

Reply

5 pd January 8, 2013 at 2:41 am

Thanks for this post. Unfortunately I’m getting what seems to be some strange character muddling in the log, always at the end of each line, about the last one third. Is there any way to specify a charset for the log or some other solution?

Reply

Leave a Comment

Tagged as: , , , , , , ,

Previous Faq:

Next Faq: