Raspberry Pi hangs on boot

I have an issue with DietPi(latest version from clean install) because happen that I try to do something after logging via SSH and I can launch htop but I can’t reboot or shutdown. It hangs also if I try to force shutdown. It also happened before clean install. After few days from boot, I have to remove power cord to unlock it.

At boot it hangs on time sync, I don’t know what happens when it hangs on shutdown because in these moments I can’t see anything on my monitor(HDMI).

I don’t know why I have these issues, maybe an hardware problem?

Thank you

P.S.: everytime that happens, I can’t access to one of my HDD connected via USB. I can’t do some tests because it happen around once a month.

Edit: now, I launch dietpi drive manager and it hangs on:

[ SUB2 ] DietPi-Services > stop
[    ..] DietPi-Services | ncc maintenance:mode --on

Maybe inadequate power supply (or cable) or faulty SD card?

Swap things around and see if this fixes.

John

I think that the problem is the external HDD. When it hangs on boot, if I turn off or disconnect that HDD it will continue to boot, reboot, shutdown correctly…
Maybe a power supply issue…

I would test on my computer but it is formatted in EXT4 and I should install several apps for compatibility with Mac.

Comment out the reference to the HD in /etc/fstab, reboot.

If it works then the HD is the problem. Is the HD self powered or does it get its power from the PI?

John

I can’t do anything with the HDD connected. It worked for one year with no issues till the last update(but I have done a clean install). I have this HDD inside a docking station, self powered.