Looks like the PATH is broken in /etc/profile. Please backup the current file
/bin/mv /etc/profile /etc/profile.bak
Then select all, copy and paste the following code over SSH:
/bin/cat << _EOF_ > /etc/profile
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
if [ "`id -u`" -eq 0 ]; then
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games"
fi
export PATH
if [ "\$PS1" ]; then
if [ "\$BASH" ] && [ "\$BASH" != "/bin/sh" ]; then
# The file bash.bashrc already sets the default PS1.
# PS1='\h:\w\\$ '
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='\$ '
fi
fi
fi
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r \$i ]; then
. \$i
fi
done
unset i
fi
_EOF_
Reboot the system and let me know if the issue still occurs.
Very strange. It could be a filesystem corruption (PSU/SD issue).
Yes, worth trying a new card and stable PSU if possible. If you dont have one already, the official RPI PSU’s are extremely good, I use them for all microUSB powered boards and i’ve never had an issue with them. Worth every penny for that peice of mind and stability.
Did you manually install/config any programs on the device? Or solely using dietpi-software?
The XU4 has been going for several weeks but I can’t remember what version I started on. The Pi2 started on v120 and then auto upgraded. Both now on v125.
The XU4 will be fine as FStrim doesn’t work on the device, so running the command had no effect.
RPi will be fine also as it updated during 1st run and disabled the daily FStrim.
Everything should be stable now, if you get any issues, please let me know