44

I want to find place to where Linux writes all boot messages. You know:

facility one    [STARTED]
facility two    [STARTED]
facility three  [FAILED]

I searched with

find . -print0 | xargs -0 grep -i "words from boot messages"

in /var/log/, but found nothing.

I have CentOS 5.5.
For example at boot time I had: "Determining IP information for eth0... failed; no link present. Check cable?"
I don't care about error specificaly, but I can't find any log that holds this error.

dmesg | grep "no link present" returns nothing too.

Jonas Stein
  • 1,182
Rodnower
  • 2,259

4 Answers4

28

Most of the boot messages are put in a buffer, that you can access using the command dmesg. On most Linux distributions, that output is also stored in

/var/log/dmesg.log

That you can view with

tail -n 100 /var/log/dmesg.log
rubo77
  • 5,218
20

Every exceptional entry during boot is placed in /var/log/syslog Could also be in /var/log/boot.msg

Pylsa
  • 31,383
9

This solution surely works on Debian systems, but maybe can be useful anyway.

In order to store all the messages shown during the boot you have to start a service called bootlogd, after the next reboot you can read the messages in /var/log/boot.

cYrus
  • 22,335
3

Type dmesg > ~/dmesg.log to copy all the boot messages into your own copy. You can add the date and time if you want to keep multiple copies and you could even automate it within a login script.