It's fairly easy now to run headless from scratch with a Raspberry Pi.

One area that might have an issue though is debugging issues with devices that have been added to the Raspberry Pi. Often you get indication of these problems in the messages that scroll through during boot.

Are these messages echoed anywhere - to a log - or are they only available if you connect a monitor during boot?

  • 14
    The title of this question sounds terrifying. – Jivings Jul 5 '12 at 13:00
  • 1
    if you are using raspbrian (you probably are), then installing bootlogd will add boot logs. I did not have any boot logs on my laptop running debian-x86, until I installed this package. – ctrl-alt-delor Jun 28 '14 at 23:07
up vote 26 down vote accepted

Yes, there are logs for everything.

If you connect a new device to the Pi then the module being loaded will show in dmesg. Eg;

$ dmesg | tail 
[16037.102139] Initializing USB Mass Storage driver...
[16037.102299] scsi4 : usb-storage 2-2:1.0
[16037.102422] usbcore: registered new interface driver usb-storage
[16037.102425] USB Mass Storage support registered.

All other logs will have their place in /var/log/. Some important ones include:

  • /var/log/boot - For all boot messages, such as daemons starting.

  • /var/log/Xorg.0.log - All Xorg logs. Including any errors.

  • /var/log/errors.log - Any system error will also be logged here.

  • 1
    If you ssh into the running headless pi, then typing dmesg at the command prompt will do this for you. – Amos Jul 23 '12 at 22:29
  • @Amos yes it will do this for you – Suhaib May 13 '13 at 12:09
  • As mentioned in another answer: you need bootlogd to have boot messages (daemons startup messages) in /var/log/boot.log – Marki555 Jul 29 '15 at 14:04

You can see bootup messages by connecting to the UART on pin 14/15 of the GPIO port

Here is how to connect it to one of the PL2303 UARTs that can be found on ebay for a few dollars.

I didn't need to connect GND because I am powering the RPi from a USB port on the same computer.

If you just want to see the boot messages, you'd only need the orange wire. If you want to log in once it boots, you'll need the purple wire too.

If you need to connect GND, it should go to the pin to the left of the orange wire.

PL2303 UART

Set the serial port to 115200 baud and you are all set

  • I really need to get one of those! My remote headless Pi just failed to start up properly after a full update. Kind of ugly if you cannot ssh into the system any more to check the logs. – Ghanima Apr 20 '15 at 19:26
  • But what software do you use on your other computer to connect? – MikeSchinkel Sep 24 '16 at 2:23
  • 1
    @MikeSchinkel, Any terminal emulator: on linux I usually use minicom or screen. putty on windows – John La Rooy Sep 25 '16 at 10:36

If you're looking for systemd boot messages, you could find them in /var/log/boot.log (I think you have to install bootlogd for that) or in the virtual console /dev/vcs1.

vsc1 is just one line so you could format it with fold or fmt

For me it worked with: # fold -w 148 /dev/vsc1 (each line = 148 columns)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.