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
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop






![HowTo: Use grep Command In Linux / UNIX [ Examples ]](http://s13.cyberciti.org/images/shared/rp/3/13.jpg)




{ 5 comments… read them below or add one }
Interesting…But I thought usually whatever is in console is usually piped to messages anyway
Setting BOOTLOGD_ENABLE=yes does not work in the current version of Ubuntu. This is a popular recommendation, but it ain’t gonna help :-(
https://bugs.launchpad.net/ubuntu/+source/boot/+bug/34165
https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/306998
https://bugs.launchpad.net/upstart/+bug/328881
https://answers.launchpad.net/ubuntu/+question/2933
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 ……………………..
How do I do same with CentOS/RHEL?
Plz help Vivek!
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?