Raspberry Pi Boot log

Enable boot logging on the Raspberry Pi

When troubleshooting issues on a Raspberry Pi sometimes it is helpful to go back and look at the boot log, especially if you are running a headless (no monitor) Raspberry Pi.

Install bootlogd

 

pi@raspberrypi ~ $ sudo apt-get install bootlogd

 

You will be asked to restart services, select ‘Yes’.  And then reboot your Raspberry Pi

View Boot Log

From now on, if you wish to view the bootlog, you can use the command below to format it correctly;

pi@raspberrypi ~ $ sed 's/\^\[/\o33/g;s/\[1G\[/\[27G\[/' /var/log/boot

You will get the output as shown in the image at the top of this post.

 

 

[wp_ad_camp_3]

4 thoughts on “Enable boot logging on the Raspberry Pi”

  1. Unfortunately it does not work for me.

    #1 During installation I was not asked for a restart! So I did it by sudo reboot now
    #2 after restart I tried this:

    sed ‘s/\^\[/\o33/g;s/\[1G\[/\[27G\[/’ /var/log/boot

    RESULT: (Nothing has been logged yet.)

    What has gone wrong, because I made already several reboots?
    If I try to reinstall it says that the latest version is already installaed.

    1. You have to turn it on with this
      sudo gedit /etc/default/bootlogd
      now you’ll see a line that says
      # Run bootlogd at startup ?
      BOOTLOGD_ENABLE=No
      change no to yes and save and reboot…..
      should now work.

  2. After the first reboot bootlogd to me says:
    pi@raspberrypi:/ $ sed ‘s/\^\[/\o33/g;s/\[1G\[/\[27G\[/’ /var/log/boot
    sed: -e expression #1, char 1: unknown command: `�’
    bash: s/[1G[/[27G[/’: No such file or directory
    and this fiel was totally clean :
    /etc/default/bootlogd
    and I added this line:
    BOOTLOGD_ENABLE=Yes
    and it till get the same answer, but I don’t know what it mean:
    pi@raspberrypi:/ $ sed ‘s/\^\[/\o33/g;s/\[1G\[/\[27G\[/’
    sed: -e expression #1, char 1: unknown command: `�’
    bash: s/[1G[/[27G[/’: No such file or directory

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.