Differences between revisions 12 and 13
Revision 12 as of 2013-10-15 12:15:00
Size: 2338
Editor: GeoffSimmons
Comment: Correct package name.
Revision 13 as of 2014-03-29 11:13:41
Size: 2403
Editor: jidanni
Comment: As of 2014 purging and reinstalling bootlogd should fix the /var on other disk issue
Deletions are marked like this. Additions are marked like this.
Line 36: Line 36:
(As of 2014 purging and reinstalling bootlogd should fix this.)

Translation(s): English - Français - Italiano


Bootlogd records boot messages.

Activate bootlogd

As of Wheezy, the bootlogd package is automatically started as a daemon in the normal way (with a sys-V like init.d script). No config file any more.

Prior to Wheezy you activate bootlogd by editing /etc/default/bootlogd, this is not enabled by default:

# Run bootlogd at startup ?
BOOTLOGD_ENABLE=yes

When the system is restarted, userspace messages will be logged to /var/log/boot.

Reading /var/log/boot file

Parts of a boot message sometimes can be wrapped with an ASCII color sequences, e.g. "failed" string after unsuccessful init action. bootlogd writes ^[ characters to its log file instead of actual ASCII escape character. To view colored strings via less as expected, you must replace ^[ characters with actual escape character and tell less to output ASCII color escape sequences in "raw" form:

sed 's/\^\[/\E/g' /var/log/boot | less -R

On bootlogd version 2.88 (Wheezy), a date stamp is added in front of the boot message.Consequently, the ok, fail etc. messages overwrite part of the date stamp. The cursor repositioning escape sequence [1G must be replaced by [27G to offset the cursor before printing the ok, fail, info etc. strings.

sed 's/\^\[/\E/g;s/\[1G\[/\[27G\[/' /var/log/boot

See also

Discussion on howto display the bootlgd generated file

Caveats

If /var/log is a separate mount, bootlogd may not correctly log to /var/log/boot. In this case using another log file should resolve the issue for now. This can be done by editing /etc/init.d/bootlogd and adding a log target to the options. Find the line with BOOTLOGD_OPTS and change it to something like this:

BOOTLOGD_OPTS="-r -c -l /root/boot.log"

(As of 2014 purging and reinstalling bootlogd should fix this.)