Dietpi doesn't update

I’m running 6.32.2 on a RPi-4 and after a successful update to 6.35.0 and then to 7, rebooting my diet-pi will bring me back to 6.32.2

I’ve run this a couple of times now, using apt-get and mostly the diepti-update (with sudo naturally).

Any tips on why this is happening and how to get round this?

Hi,

can you share following file as attachment

/var/tmp/dietpi/logs/dietpi-update.log

That log file doesn’t exist. I only have the following in /var/tmp/dietpi/logs/

G_BACKUP_FP.db 
dietpi-firstboot.log
dietpi-preboot.log
dietpi-ramlog_store/       
dietpi-boot.log
dietpi-firstrun-setup.log 
dietpi-ramlog.log 
fs_partition_resize.log

ok stupid question, your system is writable? And not in some kind of r/o mode?

I think it’s ok,

I’ve used this system for several months and installed a couple of items using dietpi-software

Just now I used

touch tmp.txt

as the dietpi user and this successfully created the file.

can you share output of mount

/dev/mmcblk0p2 on / type ext4 (rw,noatime,lazytime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=1786692k,nr_inodes=446673,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=25,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
systemd-1 on /mnt/Synology type autofs (rw,relatime,fd=32,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime,lazytime,size=1970176k)
tmpfs on /var/log type tmpfs (rw,nosuid,nodev,noatime,lazytime,size=51200k)
/dev/mmcblk0p1 on /boot type vfat (rw,noatime,lazytime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
overlay on /mnt/dietpi_userdata/docker-data/overlay2/13cf50d4146618904765ee64950aafde5c0a51b7b33be1aba063760605bdc32e/merged type overlay (rw,relatime,lowerdir=/mnt/dietpi_userdata/docker-data/overlay2/l/QMXKVH2SNSSMUYXZIVNKE6J4FO:/mnt/dietpi_userdata/docker-data/overlay2/l/IN3P7ZXN3S47ZO7AFLZSEQ7VK4:/mnt/dietpi_userdata/docker-data/overlay2/l/JTQBLHU7BK4SCK4VIGMXDSRZ3S:/mnt/dietpi_userdata/docker-data/overlay2/l/2LTSKQ2DIVL3TXF7EM7LW57BNF:/mnt/dietpi_userdata/docker-data/overlay2/l/SPD5XCLPU474UXZ2WB5BCIRCAZ:/mnt/dietpi_userdata/docker-data/overlay2/l/T6S6OFRWC2BK5NZN3WHXU4SE4O:/mnt/dietpi_userdata/docker-data/overlay2/l/MKOXAQITIFDSD22DXFVVQSKOAQ,upperdir=/mnt/dietpi_userdata/docker-data/overlay2/13cf50d4146618904765ee64950aafde5c0a51b7b33be1aba063760605bdc32e/diff,workdir=/mnt/dietpi_userdata/docker-data/overlay2/13cf50d4146618904765ee64950aafde5c0a51b7b33be1aba063760605bdc32e/work)
nsfs on /run/docker/netns/default type nsfs (rw)
shm on /mnt/dietpi_userdata/docker-data/containers/ea78de9c8bfe091cb7a7bfc858a5af6148c8d89681994ba4c3e1e7605f50f3bb/mounts/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)
192.168.1.87:/volume1/video on /mnt/Synology type nfs (rw,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.1.87,mountvers=3,mountport=892,mountproto=udp,local_lock=none,addr=192.168.1.87,_netdev)

ok can you do the update once again and before doing a reboot, check for the availability of /var/tmp/dietpi/logs/dietpi-update.log

I’ll kick that off now, it does take about 20 minutes though, it seems very slow, but I’m not too familiar with debian systems.

it depends on the amount of apt packages that will be updated before. as you are on 6.32.2, there might be a lot

however this could be done manually as well

apt update
apt upgrade
reboot

and check apt update again

OK done!

This seems to be the only output in the log though…

[ SUB2 ] DietPi-Update > Applying pre-patches
[  OK  ] DietPi-Update | Downloading pre-patches
[  OK  ] DietPi-Update | Applying execute permission
[ INFO ] Pre-patch 25 | Running DietPi v7 pre-patches
[  OK  ] DietPi-Update | Successfully applied pre-patches
[ SUB2 ] DietPi-Update > Upgrading APT packages
[ INFO ] DietPi-Update | APT update, please wait...
Hit:1 https://download.docker.com/linux/debian buster InRelease
Get:2 http://packages.microsoft.com/repos/code stable InRelease [10.4 kB]
Hit:3 https://archive.raspberrypi.org/debian buster InRelease
Hit:4 https://deb.debian.org/debian buster InRelease
Hit:5 https://deb.debian.org/debian buster-updates InRelease
Get:6 https://deb.debian.org/debian-security buster/updates InRelease [65.4 kB]
Hit:7 https://deb.debian.org/debian buster-backports InRelease
Get:8 https://repo.jellyfin.org/debian buster InRelease [6637 B]
Get:9 http://packages.microsoft.com/repos/code stable/main arm64 Packages [15.8 kB]
Get:10 http://packages.microsoft.com/repos/code stable/main amd64 Packages [15.2 kB]
Get:11 http://packages.microsoft.com/repos/code stable/main armhf Packages [15.6 kB]
Fetched 129 kB in 2s (58.7 kB/s)
Reading package lists...
[  OK  ] DietPi-Update | APT update
[ INFO ] DietPi-Update | APT upgrade, please wait...
[  OK  ] DietPi-Update | APT upgrade
[ SUB2 ] DietPi-Update > Installing new DietPi code
[  OK  ] DietPi-Update | Downloading update archive
[  OK  ] DietPi-Update | Unpacking update archive
[  OK  ] DietPi-Update | Installing new DietPi scripts
[  OK  ] DietPi-Update | Installing new DietPi system files
[  OK  ] DietPi-Update | Setting execute permissions for DietPi scripts
[ SUB3 ] DietPi-Set_software > verify_dietpi.txt ()
[  OK  ] DietPi-Set_software | Checking URL: https://raw.githubusercontent.com/MichaIng/DietPi/master/dietpi.txt
[  OK  ] DietPi-Set_software | Downloading current dietpi.txt
[  OK  ] DietPi-Set_software | dietpi.txt verification completed
[  OK  ] verify_dietpi.txt  | Completed
[ SUB2 ] DietPi-Update > Applying incremental patches
[ INFO ] DietPi-Update | Current version : v6.32.2
[ INFO ] DietPi-Update | Latest version  : v7.0.2
[ INFO ] DietPi-Patch | Patching 6.32 to 6.33
[ INFO ] DietPi-Patch | Patching 6.33 to 6.34
[ INFO ] DietPi-Patch | Patching 6.34 to 6.35
[  OK  ] DietPi-Patch | rm -f /etc/apt/sources.list.d/vscode.list /etc/apt/trusted.gpg.d/microsoft.gpg /etc/apt/preferences.d/3rd_parties.pref
[  OK  ] DietPi-Patch | rmdir --ignore-fail-on-non-empty /var/lib/dietpi/dietpi-software/services
[  OK  ] DietPi-Software | Initialised database
[  OK  ] DietPi-Software | Reading database
[ SUB4 ] DietPi-Software > Automated reinstall
[ INFO ] DietPi-Software | 108: Amiberry is not currently installed
[ INFO ] DietPi-Software | Use "dietpi-software install 108" to install Amiberry.
[  OK  ] DietPi-Software | No changes applied for: Amiberry
[ INFO ] DietPi-Software | 123: Mosquitto is not currently installed
[ INFO ] DietPi-Software | Use "dietpi-software install 123" to install Mosquitto.
[  OK  ] DietPi-Software | No changes applied for: Mosquitto
removed '/etc/udev/rules.d/10-wifi-disable-powermanagement.rules'
[ INFO ] DietPi-Update | APT autopurge, please wait...
[  OK  ] DietPi-Update | APT autopurge
[  OK  ] DietPi-Update | Incremental patching to v7.0.2 completed
[ SUB2 ] DietPi-Update > Applying pre-patches
[  OK  ] DietPi-Update | Downloading pre-patches
[  OK  ] DietPi-Update | Applying execute permission
[ INFO ] Pre-patch 25 | Running DietPi v7 pre-patches
[  OK  ] DietPi-Update | Successfully applied pre-patches
[ SUB2 ] DietPi-Update > Upgrading APT packages
[ INFO ] DietPi-Update | APT update, please wait...
Hit:1 https://download.docker.com/linux/debian buster InRelease
Get:2 http://packages.microsoft.com/repos/code stable InRelease [10.4 kB]
Hit:3 https://archive.raspberrypi.org/debian buster InRelease
Hit:4 https://deb.debian.org/debian buster InRelease
Hit:5 https://deb.debian.org/debian buster-updates InRelease
Get:6 https://deb.debian.org/debian-security buster/updates InRelease [65.4 kB]
Hit:7 https://deb.debian.org/debian buster-backports InRelease
Get:8 https://repo.jellyfin.org/debian buster InRelease [6637 B]
Get:9 http://packages.microsoft.com/repos/code stable/main arm64 Packages [15.8 kB]
Get:10 http://packages.microsoft.com/repos/code stable/main amd64 Packages [15.2 kB]
Get:11 http://packages.microsoft.com/repos/code stable/main armhf Packages [15.6 kB]
Fetched 129 kB in 2s (58.7 kB/s)
Reading package lists...
[  OK  ] DietPi-Update | APT update
[ INFO ] DietPi-Update | APT upgrade, please wait...
[  OK  ] DietPi-Update | APT upgrade
[ SUB2 ] DietPi-Update > Installing new DietPi code
[  OK  ] DietPi-Update | Downloading update archive
[  OK  ] DietPi-Update | Unpacking update archive
[  OK  ] DietPi-Update | Installing new DietPi scripts
[  OK  ] DietPi-Update | Installing new DietPi system files
[  OK  ] DietPi-Update | Setting execute permissions for DietPi scripts
[ SUB3 ] DietPi-Set_software > verify_dietpi.txt ()
[  OK  ] DietPi-Set_software | Checking URL: https://raw.githubusercontent.com/MichaIng/DietPi/master/dietpi.txt
[  OK  ] DietPi-Set_software | Downloading current dietpi.txt
[  OK  ] DietPi-Set_software | dietpi.txt verification completed
[  OK  ] verify_dietpi.txt  | Completed
[ SUB2 ] DietPi-Update > Applying incremental patches
[ INFO ] DietPi-Update | Current version : v6.32.2
[ INFO ] DietPi-Update | Latest version  : v7.0.2
[ INFO ] DietPi-Patch | Patching 6.32 to 6.33
[ INFO ] DietPi-Patch | Patching 6.33 to 6.34
[ INFO ] DietPi-Patch | Patching 6.34 to 6.35
[  OK  ] DietPi-Patch | rm -f /etc/apt/sources.list.d/vscode.list /etc/apt/trusted.gpg.d/microsoft.gpg /etc/apt/preferences.d/3rd_parties.pref
[  OK  ] DietPi-Patch | rmdir --ignore-fail-on-non-empty /var/lib/dietpi/dietpi-software/services
[  OK  ] DietPi-Software | Initialised database
[  OK  ] DietPi-Software | Reading database
[ SUB4 ] DietPi-Software > Automated reinstall
[ INFO ] DietPi-Software | 108: Amiberry is not currently installed
[ INFO ] DietPi-Software | Use "dietpi-software install 108" to install Amiberry.
[  OK  ] DietPi-Software | No changes applied for: Amiberry
[ INFO ] DietPi-Software | 123: Mosquitto is not currently installed
[ INFO ] DietPi-Software | Use "dietpi-software install 123" to install Mosquitto.
[  OK  ] DietPi-Software | No changes applied for: Mosquitto
removed '/etc/udev/rules.d/10-wifi-disable-powermanagement.rules'
[ INFO ] DietPi-Update | APT autopurge, please wait...
[  OK  ] DietPi-Update | APT autopurge
[  OK  ] DietPi-Update | Incremental patching to v7.0.2 completed
[ SUB2 ] DietPi-Update > Completed
[ INFO ] DietPi-Update | Current version : v7.0.2
[ INFO ] DietPi-Update | Latest version  : v7.0.2
[  OK  ] DietPi-Survey | Purging survey data
[ SUB3 ] DietPi-Services > restart 
[  OK  ] DietPi-Services | restart : php7.3-fpm
[  OK  ] DietPi-Services | restart : nginx
[  OK  ] DietPi-Services | restart : jellyfin
[  OK  ] DietPi-Services | restart : docker
[  OK  ] DietPi-Services | restart : cron
[  OK  ] DietPi-Patch | Everything done! Terminating the obsolete DietPi-Update parent instance...

honestly I don’t know how this could happen. Looks like, changes done on the system are not persistent. It’s like an overlay file system that is going to be reset on reboot. :open_mouth:

Can you do a test

apt update
apt list --upgradable

note down the number of packages. Once done update all apt packages

apt upgrade
reboot

Once system is back online, check it again

apt update
apt list --upgradable

Does it display same packages as before? Usually it should state that there is nothing to update.

I have a weird error right now, any command I type in gives me segmentation fault, I may have to pull the plug because reboot does the same thing.

this may have been why it reverted back the first time, I had to pull the plug to restart and dietpi must have used a backup?

well there is a feature introduced in v7 to allow automatic restore of backups during first initial boot. But this would need to be set activity in dietpi.txt. As well you are not running a first initial boot process and the setting will have no impact. Means, during normal operation, DietPi will not restore any backup.

https://github.com/MichaIng/DietPi/blob/master/dietpi.txt#L70-L72

Maybe you have some corruption preventing the system from writing down the data? Would be interesting to see how the apt upgrade test goes.

MichaIng
Any ideas how this could happen?

OK so I couldn’t reboot in any way, all commands as root would return segmentation fault my only option was to unplug the power and wait a little before plugging in again.

Once I rebooted I am back on v6.

I checked the journalctl but didn’t see any errors only a warning about efi not finding uefi, but I don’t think that’s the issue.

I’ve run apt update I have 70 packages, and I’m currently running upgrade, this will probably take an hour. I’ll report back then.

hmm the segmentation fault doesn’t seems healthy. Probably there is more broken or corrupted.

Indeed, looks like a file system corruption or the SD card (?) itself has bad blocks.

Just to assure, it’s the 64-bit image for RPi, right?

Let’s check for kernel errors: dmesg -l emerg,alert,crit,err

Oh, no I’m using the 32-bit version. What would be recommended, I’m about to download a new image from the frontpage and start all over…

running the dmesg command I get the following

    0.558448] bcm2708_fb soc:fb: Unable to determine number of FBs. Disabling driver.

are you sure you are running the 32bit image? because you have apt source list configured pointing to 64bit

Hit:4 https://deb.debian.org/debian buster InRelease
Hit:5 https://deb.debian.org/debian buster-updates InRelease
Get:6 https://deb.debian.org/debian-security buster/updates InRelease 
Hit:7 https://deb.debian.org/debian buster-backports InRelease

For the question 32bit vs 64bit, well it doesn’t matter much. There is no real benefit of the 64bit version for most use cases, except you have some special software which require 64bit. As well still some software implementations are outstanding from Raspberry Foundation side. That’s why Raspberry OS has still a Beta flag and was not official released by the Foundation.

You’re right I am using the 64-bit version, this is from my welcome screen

Image           : DietPi Core Team (pre-image: Raspberry Pi OS (64-bit))

I guess I should try the 32-bit image then, and install everything from scratch, I’m really only using this for Jellyfin.