MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.79k stars 494 forks source link

unable to update dietpi to latest version #7157

Open hcr2020 opened 2 months ago

hcr2020 commented 2 months ago

Details:

dpkg: error processing package exim4-base (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of exim4-daemon-light: exim4-daemon-light depends on exim4-base (>= 4.94.2); however: Package exim4-base is not configured yet.

dpkg: error processing package exim4-daemon-light (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: exim4-config exim4-base exim4-daemon-light E: Sub-process /usr/bin/dpkg returned an error code (1)



I am unable to update dietpi to latest version, due to exim4-config; exim4-base; exim-daemon-light upgrade error and 
/usr/bin/apt-key: 57: cannot create /dev/null: Permission denied

Thank you in advance
MichaIng commented 1 month ago

This is not a solution. We need to find out what exactly is removing/replacing the node, and fix it.

I btw found the reason for the issue on my servers: https://github.com/MichaIng/hacks/blob/main/rootfs/etc/mysql/mariadb.conf.d/99-micha.cnf#L3 pid_file=/dev/null in MariaDB now leads to the removal of the node, when the service is stopped. I tried to find a way to disable the unnecessary PID file with a drop-in config, and this worked, but obviously broke with the latest MariaDB update on Debian Trixie. However this is not the reason in your case: You do not use MariaDB, service stops/restarts do not trigger the issue, reboots do (in my case not), and this config was never built into DietPi, but just my personal one.

This however means it really is a individual problem, not a general one, and it was a coincidence that we both have it, with a very different culprit.

I have one idea how to probably find out what is causing it:

cat << '_EOF_' > /var/lib/dietpi/postboot.d/devnull.sh
#!/bin/bash
while [[ $(stat -c '%a' /dev/null) == '666' ]]; do :; done
lsof /dev/null > /root/devnull.log
_EOF_

I hope postboot scripts run early enough and lsof runs fast enough to catch it. This is causing a constant CPU load of ~15% (on two of my systems) since the mode of the node is checked very frequently, but I currently have no better idea. Check the log after reboot:

cat /root/devnull.log