1

I have an issue with my Raspberry PI running Raspbian 9 hanging on startup - but not always. It will hang every other launch.

When the problem occurs, the launch first hangs with the last message

Starting Show Plymouth Boot Screen

it will hang here for a minute or two (usually it proceeds after like 3 seconds), then proceeds to show splash screen with message

systemd-hostnamed.service

Here it just stops, won't go any further no matter how long I wait. When I unplug the power and plug again, it will always boot properly.

I've seen this question but the author mentions he has changed network interface, which I'm sure I haven't touched. I haven't touched anything actually, aside from installing Maven, NetBeans, BlueZ and some Java libraries. And my Pi eventually boots up properly half the times.

What might be the problem? How to debug this issue further?

mag_zbc
  • 99
  • 9

1 Answers1

3

At first step you can look at

rpi ~$ journalctl

if you see some messages that indicate what could go wrong. The problem is that the systemd Journal isn't stored persistent by default so you don't see messages from a previous boot. You can make the Journal persistent with:

rpi ~$ mkdir -p /var/log/journal
rpi ~$ systemd-tmpfiles --create --prefix /var/log/journal

You will get one or two confusing warnings "...Cannot set file attribute..." This are not error messages, only warnings and doesn't matter in this case. Now you can look at the messages from previous boots with:

rpi ~$ journalctl --boot=-1

or -2 or -3 or ...

Ingo
  • 42,961
  • 20
  • 87
  • 207