Kernel boot-time messages

As the Linux kernel boots, it gives detailed status of its progress in the form of console messages. Modules that are loaded also yield status messages. These messages contain important information regarding the health and configuration of your hardware. Generally, the kinds of messages you will see are:

  • Kernel identification

  • Memory and CPU information

  • Information on detected hardware, such as pointers (mice), serial ports, and disks

  • Partition information and checks

  • Network initialization

  • Kernel module output for modules that load at boot time

These messages are displayed on the system console at boot time but often scroll off the screen too quickly to be read. The messages are also logged to disk and can easily be viewed using the dmesg command, which displays messages logged at the last system boot. For example, to view messages from the last boot sequence, simply pipe the output of dmesg to less:

# dmesg | less

It is also common to use dmesg to dump boot messages to a file for later inspection or archive, by simply redirecting the output:

# dmesg > bootmsg.txt

Note

The kernel buffer used for log messages that dmesg displays is a fixed size, so it may lose some (or all) of the boot-time messages as the kernel writes runtime messages.

Get LPI Linux Certification in a Nutshell, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.