Differences between revisions 10 and 11
Revision 10 as of 2012-06-07 22:37:53
Size: 1922
Comment: Add link to french translation
Revision 11 as of 2013-10-14 11:22:43
Size: 2327
Editor: ?JinnKo
Comment:
Deletions are marked like this. Additions are marked like this.
Line 10: Line 10:
You do this by editing {{{/etc/default/bootlogd}}}, this is not enabled by default: {{{ As of Wheezy, the bootlog 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: {{{
Line 17: Line 19:
As from Wheezy, the bootlog package is automatically started as a daemon in the normal way (with a sys-V like init.d script). No config file any more.
Line 22: Line 22:
sed $'s/\^\[/\E/g' /var/log/boot | less -R sed 's/\^\[/\E/g' /var/log/boot | less -R
Line 26: Line 26:
sed $'s/\^\[/\E/g;s/\[1G\[/\[27G\[/' /var/log/boot sed 's/\^\[/\E/g;s/\[1G\[/\[27G\[/' /var/log/boot
Line 31: Line 31:

== 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"
}}}

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


Bootlogd records boot messages.

Activate bootlogd

As of Wheezy, the bootlog 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"