Hanging on reboot

If I do sudo reboot I loose access to SSH and the machine doesn’t shutdown and I have to force switch off with power button. How can I find out why it doesn’t reboot?

first share some more details on your system. Are you able to attach a screen to check what happen?

Just type sudo reboot and SSH disconnects but doesn’t reboot just hangs

Using 7.5.2

SBC? Are you able to attach a screen?

No screen just SSH

Attaching a screen and keyboard would be easiest to debug. Else you can enable persistent system logs:

dietpi-software uninstall 103
reboot
# after reboot, or power cicle
mkdir /var/log/journal
systemctl restart systemd-journald

From then on RAM logging is disabled and you instead have persistent system logs. So when you then try another reboot, it hangs, you power circle, afterwards you can run journalctl to check for logs from the shutdown process.