HowTo: Raspberry Pi – Display Bootlog

There are a few cases in the life of a RaspberryPi owner when it can be useful to view the RaspberryPi's last bootlog. The bootlog is basically the – much more detailed – diary of your RaspberryPI.
All system-relevant events are entered in the bootlog.

This is particularly useful if you are looking for the cause of a specific problem. Because you can then check in the bootlog whether anything system-relevant happened last (i.e. before the crash/error).

How you can display the bootlog is described in the following article.


Safety instructions

I know the following notes are always kind of annoying and seem unnecessary. Unfortunately, many people who knew "better" have lost eyes, fingers or other things due to carelessness or injured themselves. Data loss is almost negligible in comparison, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Because even the coolest project is not worth injury or other trouble.
https://www.nerdiy.de/sicherheitshinweise/

Affiliate links/advertising links

The links to online shops listed here are so-called affiliate links. If you click on such an affiliate link and make a purchase via this link, Nerdiy.de will receive a commission from the relevant online shop or provider. The price does not change for you. If you make your purchases via these links, you support Nerdiy.de in being able to offer other useful projects in the future. 🙂 


Requirements

Helpful articles:
So that you can view the bootlog of your Raspberry Pi, it should of course be prepared so that you can access it via SSH.

The following three articles describe what needs to be done to prepare the RaspberryPi:
RaspberryPi – setup for nerdiys!
RaspberryPi – The first configuration!
RaspberryPi – Control the RaspberryPi via SSH

Required tool:
-no-

Required material:

In the following list you will find all the parts you need to implement this article.


Log in to the RaspberryPi via SSH

To start, you must first log in to the Rasp Pi with Putty via SSH. How to do this is in the article RaspberryPi - Control the RaspberryPi via SSH described.

After entering your username and password you can enter the first commands.

View complete bootlog

Viewing the complete bootlog is possible without much magic with the following command:

dmesg

Nerdiwssen:

“dmesg” is the shortcut/command for i.edisplay messatge. This program prints the kernel messages on the screen.


Filter bootlog for specific words

Since the “dmesg” command outputs the entire bootlog without any additional parameters, it can sometimes be a bit tedious to search for a specific keyword.
For example, are you looking for clues about an error with a USB. Device you can use the following command to filter the output for lines in which the word “USB” occurs.

dmesg | grep -i usb

The “-i” indicates that the search term “usb” is case-insensitive. So lines in which “usb”, “USB” or other combinations of upper and lower case occur are output.


Have fun with the project

I hope everything worked as described for you. If not or you have questions or suggestions please let me know in the comments. I will then add this to the article if necessary.
Ideas for new projects are always welcome. 🙂

PS Many of these projects - especially the hardware projects - cost a lot of time and money. Of course I do this because I enjoy it, but if you think it's cool that I share the information with you, I would be happy about a small donation to the coffee fund. 🙂

Buy Me a Coffee at ko-fi.com       

Kommentar hinterlassen

Your email address will not be published. Erforderliche Felder sind mit * markiert

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