Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I found two ways for printing boot messages one using dmesg and another the content of file /var/log/boot.log:

The content of the /var/log/boot.log file are:

 fsck from util-linux 2.20.1
/dev/loop0: clean, 263563/2271232 files, 7843644/18169856 blocks
 * Starting configure network device security^[[74G[ OK ]
 * Starting configure network device security^[[74G[ OK ]
 * Starting configure network device^[[74G[ OK ]
 * Starting Mount network filesystems^[[74G[ OK ]
 * Starting Failsafe Boot Delay^[[74G[ OK ]
 * Stopping Mount network filesystems^[[74G[ OK ]
 * Starting Bridge socket events into upstart^[[74G[ OK ]
 * Starting mDNS/DNS-SD daemon^[[74G[ OK ]
 * Starting Userspace bootsplash^[[74G[ OK ]
 * Starting Send an event to indicate plymouth is up^[[74G[ OK ]
 * Starting bluetooth daemon^[[74G[ OK ]
 * Starting configure network device^[[74G[ OK ]
 * Stopping Failsafe Boot Delay^[[74G[ OK ]
 * Starting System V initialisation compatibility^[[74G[ OK ]
 * Starting set sysctls from /etc/sysctl.conf^[[74G[ OK ]
 * Starting configure network device security^[[74G[ OK ]
 * Starting modem connection manager^[[74G[ OK ]
 * Stopping set sysctls from /etc/sysctl.conf^[[74G[ OK ]
 * Starting CUPS printing spooler/server^[[74G[ OK ]
 * Starting network connection manager^[[74G[ OK ]
 * Stopping cold plug devices^[[74G[ OK ]
 * Stopping log initial device creation^[[74G[ OK ]
 * Starting configure network device security^[[74G[ OK ]
 * Starting save udev log and update rules^[[74G[ OK ]
 * Stopping save udev log and update rules^[[74G[ OK ]
 * Stopping Userspace bootsplash^[[74G[ OK ]
Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
 * Starting AppArmor profiles       ^[[170G
^[[164G[ OK ]
speech-dispatcher disabled; edit /etc/default/speech-dispatcher
saned disabled; edit /etc/default/saned
 * Stopping System V initialisation compatibility^[[74G[ OK ]
 * Starting System V runlevel compatibility^[[74G[ OK ]

while dmesg gives some thing like this:

[    0.008660] Initializing cgroup subsys blkio
[    0.008663] Initializing cgroup subsys perf_event
[    0.008667] Initializing cgroup subsys hugetlb
[    0.008713] CPU: Physical Processor ID: 0
[    0.008716] CPU: Processor Core ID: 0
[    0.008720] mce: CPU supports 4 MCE banks
[    0.008739] CPU0: Thermal monitoring enabled (TM1)
[    0.008746] process: using mwait in idle threads
[    0.008753] Last level iTLB entries: 4KB 64, 2MB 64, 4MB 64
[    0.008753] Last level dTLB entries: 4KB 64, 2MB 0, 4MB 64
[    0.008753] tlb_flushall_shift: 6
[    0.008895] Freeing SMP alternatives: 24k freed
[    0.011699] ACPI: Core revision 20121018
[    0.016015] ftrace: allocating 29358 entries in 115 pages
[    0.028544] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.068468] smpboot: CPU0: Intel(R) Pentium(R) 4 CPU 3.00GHz (fam: 0f, model: 04, stepping: 09)
[    0.072000] Performance Events: Netburst events, Netburst P4/Xeon PMU driver.
[    0.072000] ... version:                0

and so on

So my question how are the two related? When should we use demsg and when boot.log?

share|improve this question

2 Answers 2

dmesg output is diagnostic messages of the Linux kernel, i.e. some information about hardware and driver initialization.

boot.log seems to be a specific feature of your distribution (I don't have it), which shows you a log of successful/failed starts of your daemons and other initscripts which are located at /etc/rc.d/ or /etc/init.d/. These initscripts are started after the Linux kernel is booted.

share|improve this answer

dmesg is a kernels ring buffer, it can be used by the kernel to log messages before device drivers have been loaded (to access disk, etc). boot.log is the permanent store of boot messages.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.