Friday, October 11, 2013

Read boot messages log in Debian

Boot into Debian and you'll see messages scroll down the screen. Sometimes there's an error message you'd like to read carefully but it's gone before you have a chance. To create a boot log to read after the computer has booted, in Debian Wheezy simply install bootlogd.

There is a small bug in that some characters in the boot log are not displayed correctly in a text display command or text editor.

# cat /var/log/boot produces the following:

To see boot messages displayed correctly, use the following command:
sed $'s/\^\[/\E/g;s/\[1G\[/\[27G\[/' /var/log/boot
This produces:

Source: Debian Wiki.

Old boot logs seemed to be archived, so it might be a good idea to delete them from time to time.

No comments:

Post a Comment