Failure to boot - temporarily enable logging on headless? Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
sudrien
Posts: 3
Joined: Thu Feb 06, 2020 5:15 pm

Failure to boot - temporarily enable logging on headless?

Post by sudrien »

Running DietPi_OdroidXU4-ARMv7-Buster.7z on three ODROID HC1s

Bet and Gimel are booting as expected after an apt update/apt upgrade. Alef - the workhorse for rsyncs - isn't.

It pings on the static IP, but no SSH. And with no way to connect a monitor... welp.

Swap SD cards, and Alef boots with Bet's card. So it isn't a bad sata disk. Alef's SD card is readable from another system, and /etc/ is backed up, so I can theoretically re-flash if needed. /var/log/ is empty - as it's logging to ram by default if I recall.

Is there a way to temporarily turn on boot logging if I can't access dietpi-config? Or would I need to buy a UART cable?

User avatar
Joulinar
Posts: 713
Joined: Fri Nov 15, 2019 11:49 pm

Re: Failure to boot - temporarily enable logging on headless?

Post by Joulinar »

well you are missing the apt packages to create log files in /var/log because be default logs are written to ramlog. But as you don't have access to the system, it will be hard to reinstall. Therefore a cable to connect or something to see error messages would be needed. otherwise it's hard to debug.

User avatar
MichaIng
Site Admin
Posts: 2095
Joined: Sat Nov 18, 2017 5:21 pm

Re: Failure to boot - temporarily enable logging on headless?

Post by MichaIng »

You could disable RAMlog by editing /etc/fstab and comment the /var/log entry + remove /etc/systemd/system/multi-user.target.wants/dietpi-ramlog.service + add directory /var/log/journal/ to the SDcard. This will make journald system logs permanent. Boot it once, wait until it does not do any action anymore and is still not reachable via SSH, then unplug and mount the SDcard again to the other system. /var/log/journal/... should contain a *.journal file which can be read from external Debian system via journalctl --file=/mnt/*/var/log/journal/*/*.journal (can be a glob or the complete path to the syslog.journal file).

Post Reply