MichaIng / DietPi

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

update DietPi from v9.4.2 to v9.8.0 fails #7257

Open klankschap opened 1 week ago

klankschap commented 1 week ago

Creating a bug report/issue

Required Information

G_DIETPI_VERSION_CORE=9 G_DIETPI_VERSION_SUB=4 G_DIETPI_VERSION_RC=2 G_GITBRANCH='master' G_GITOWNER='MichaIng' G_LIVE_PATCH_STATUS[0]='not applicable'

bookworm

Linux npi 6.6.30-current-sunxi64 #1 SMP Thu May 2 14:32:50 UTC 2024 aarch64 GNU/Linux

NanoPi NEO Plus2 (aarch64)

5V

SanDisk ultra

Additional Information (if applicable)

e8265b8a-e9fa-40c7-8de2-dae518b5667a

Steps to reproduce

  1. sudo dietpi-update or sudo apt update

  2. ...

Expected behaviour

Actual behaviour

Extra details

$ sudo apt update
Hit:1 https://dietpi.com/apt bookworm InRelease                          
Hit:2 https://dietpi.com/apt all InRelease                               
Get:3 https://deb.debian.org/debian bookworm InRelease [151 kB]
Get:4 https://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
Get:5 https://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:6 https://deb.debian.org/debian bookworm-backports InRelease [59.0 kB]
Get:7 https://deb.debian.org/debian bookworm/main arm64 Packages [8689 kB]
Ign:7 https://deb.debian.org/debian bookworm/main arm64 Packages                                                                                                                                   
Get:8 https://deb.debian.org/debian bookworm-backports/main arm64 Packages.diff/Index [63.3 kB]
Get:8 https://deb.debian.org/debian bookworm-backports/main arm64 Packages.diff/Index [63.3 kB]
Get:10 https://deb.debian.org/debian bookworm-backports/non-free arm64 Packages T-2024-10-24-0205.40-F-2024-10-24-0205.40.pdiff [5372 B]                                                           
Get:10 https://deb.debian.org/debian bookworm-backports/non-free arm64 Packages T-2024-10-24-0205.40-F-2024-10-24-0205.40.pdiff [5372 B]                                                           
Get:11 https://deb.debian.org/debian bookworm-backports/main arm64 Packages T-2024-10-24-1404.10-F-2024-10-24-1404.10.pdiff [2534 B]                                                               
Get:11 https://deb.debian.org/debian bookworm-backports/main arm64 Packages T-2024-10-24-1404.10-F-2024-10-24-1404.10.pdiff [2534 B]                                                               
Get:12 https://deb.debian.org/debian bookworm/non-free arm64 Packages [75.8 kB]                                                                                                                    
Get:13 https://deb.debian.org/debian bookworm/non-free-firmware arm64 Packages [5832 B]                                                                                                            
Get:14 https://deb.debian.org/debian bookworm/contrib arm64 Packages [45.7 kB]                                                                                                                     
Get:7 https://deb.debian.org/debian bookworm/main arm64 Packages [8689 kB]                                                                                                                         
Ign:7 https://deb.debian.org/debian bookworm/main arm64 Packages                                                                                                                                   
Get:7 https://deb.debian.org/debian bookworm/main arm64 Packages [8689 kB]                                                                                                                         
Ign:7 https://deb.debian.org/debian bookworm/main arm64 Packages                                                                                                                                   
Get:7 https://deb.debian.org/debian bookworm/main arm64 Packages [8689 kB]                                                                                                                         
Ign:7 https://deb.debian.org/debian bookworm/main arm64 Packages                                                                                                                                   
Get:7 https://deb.debian.org/debian bookworm/main arm64 Packages [8689 kB]
Err:7 https://deb.debian.org/debian bookworm/main arm64 Packages                                                                                                                                   
  Connection timed out [IP: 151.101.38.132 443]
Get:7 https://deb.debian.org/debian bookworm/main arm64 Packages [11.9 MB]                                                                                                                         
Ign:7 https://deb.debian.org/debian bookworm/main arm64 Packages                                                                                                                                   
Get:7 https://deb.debian.org/debian bookworm/main arm64 Packages [11.9 MB]
Err:7 https://deb.debian.org/debian bookworm/main arm64 Packages                                                                                                                                   
  Connection timed out [IP: 2a04:4e42:9::644 443]
Ign:7 https://deb.debian.org/debian bookworm/main arm64 Packages
Err:7 https://deb.debian.org/debian bookworm/main arm64 Packages
  Connection timed out [IP: 2a04:4e42:9::644 443]
Fetched 55.5 kB in 19min 17s (47 B/s)
Reading package lists... Done
N: Repository 'https://deb.debian.org/debian bookworm InRelease' changed its 'Version' value from '12.5' to '12.7'
E: Failed to fetch https://deb.debian.org/debian/dists/bookworm/main/binary-arm64/Packages  Connection timed out [IP: 2a04:4e42:9::644 443]
E: Some index files failed to download. They have been ignored, or old ones used instead.
$ ping -6 2a04:4e42:9::644
PING 2a04:4e42:9::644(2a04:4e42:9::644) 56 data bytes
64 bytes from 2a04:4e42:9::644: icmp_seq=1 ttl=59 time=6.66 ms
64 bytes from 2a04:4e42:9::644: icmp_seq=2 ttl=59 time=4.52 ms
64 bytes from 2a04:4e42:9::644: icmp_seq=3 ttl=59 time=6.66 ms
64 bytes from 2a04:4e42:9::644: icmp_seq=4 ttl=59 time=3.90 ms
64 bytes from 2a04:4e42:9::644: icmp_seq=5 ttl=59 time=2.66 ms
64 bytes from 2a04:4e42:9::644: icmp_seq=6 ttl=59 time=4.00 ms
$ ping 151.101.38.132
PING 151.101.38.132 (151.101.38.132) 56(84) bytes of data.
64 bytes from 151.101.38.132: icmp_seq=1 ttl=58 time=6.40 ms
64 bytes from 151.101.38.132: icmp_seq=2 ttl=58 time=4.26 ms
64 bytes from 151.101.38.132: icmp_seq=3 ttl=58 time=3.50 ms
64 bytes from 151.101.38.132: icmp_seq=4 ttl=58 time=4.63 ms
^C
--- 151.101.38.132 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3010ms

also from fresh image:

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Checking for available DietPi update

[  OK  ] DietPi-Update | Checking IPv4 network connectivity
[  OK  ] DietPi-Update | Checking IPv6 network connectivity
[  OK  ] DietPi-Update | Checking DNS resolver
[  OK  ] DietPi-TimeSync | systemctl stop systemd-timesyncd
[  OK  ] DietPi-TimeSync | mkdir -p /run/systemd/timesync
[ INFO ] DietPi-Update | Getting latest version from: https://raw.githubusercontent.com/MichaIng/DietPi/master/.update/version
[  OK  ] DietPi-Update | Got valid latest version: 9.8.0
[  OK  ] DietPi-Update | Update available:
[ INFO ] DietPi-Update | Current version : v9.7.1
[ INFO ] DietPi-Update | Latest version  : v9.8.0

...
Err:21 https://deb.debian.org/debian bookworm/main arm64 Packages
  Connection timed out [IP: 151.101.38.132 443]
Ign:21 https://deb.debian.org/debian bookworm/main arm64 Packages
Err:21 https://deb.debian.org/debian bookworm/main arm64 Packages
  Connection timed out [IP: 151.101.38.132 443]
Fetched 525 kB in 28min 29s (307 B/s)
Reading package lists...
E: Failed to fetch https://deb.debian.org/debian/dists/bookworm/main/binary-arm64/Packages  Connection timed out [IP: 151.101.38.132 443]
E: Some index files failed to download. They have been ignored, or old ones used instead.
[FAILED] DietPi-Update | APT update
 - Command: apt-get -y -eany update
[FAILED] DietPi-Update | Unable to continue, DietPi-Update will now terminate.
Joulinar commented 1 week ago

Do you have a special network security device that could close connections for some reason? This looks pretty strange. At first it works for the first 5-6 connections, but shortly after that it times out 🤔

klankschap commented 1 week ago

nope

MichaIng commented 5 days ago

Does it work doing just a "Retry" from the error handler menu?

Else, can you enter a subshell and check network details:

ip a
ip r
klankschap commented 5 days ago

a retry did not make any difference after a dietpi-update fail neither did apt update

# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 02:01:e2:89:bf:fa brd ff:ff:ff:ff:ff:ff
    altname end0
    inet 192.168.178.46/24 brd 192.168.178.255 scope global dynamic eth0
       valid_lft 719992sec preferred_lft 719992sec
    inet6 2a10:3781:4b93:1:1:e2ff:fe89:bffa/64 scope global dynamic mngtmpaddr 
       valid_lft 7052sec preferred_lft 3452sec
    inet6 fe80::1:e2ff:fe89:bffa/64 scope link 
       valid_lft forever preferred_lft forever
# ip r
default via 192.168.178.1 dev eth0 
192.168.178.0/24 dev eth0 proto kernel scope link src 192.168.178.46 
klankschap commented 5 days ago

Would it be a work around to download the files using a different machine, then place them onto the SD card in a /tmp folder, then point apt to that folder? How would that work in practice?

MichaIng commented 5 days ago

Does it work to download the list manually?

cd /tmp
wget https://deb.debian.org/debian/dists/bookworm/main/binary-arm64/Packages

If it is the list only, and we name and place it correctly, it could even work. But I fear that downloading the packages results in the same connection timeout.

Seems to be some issue between you and the Debian mirror the CDN is choosing or you. Not sure which one it is, as there is no reverse DNS record given. Does the browser change to a different URL when opening this link, or show the mirror near the bottom of the page? https://deb.debian.org/debian/

However, easiest should be when you switch to a different mirror. Can be done from the error handler. dietpi-config > Network Options: Misc > APT mirror.

klankschap commented 5 days ago

changing to a different mirror (de / uk) did not make a difference. i can get the Packages.gz using a different machine in the network wget https://deb.debian.org/debian/dists/bookworm/main/binary-arm64/Packages.gz

but as the dietpi hasn't made it through its first initial setup, there is no way to get it there via scp, or is there?

MichaIng commented 2 days ago

The file alone does not help anyway, as the individual packages would likely fail the same way. So manually downloading via wget or curl does not work either? I mean you can just test to download a package:

cd /tmp
wget https://deb.debian.org/debian/pool/main/d/dash/dash_0.5.12-9_amd64.deb

or a different package from our server:

wget https://dietpi.com/downloads/binaries/sprd-bluetooth.deb

Maybe there is a general network issue. @StephanStS you have a NanoPi NEO Plus2 as well right? Does it still work well for you with APT updates etc with recent kernel?

I'll also update all our images now, maybe the newer kernel helps.

klankschap commented 2 days ago
cd /tmp
wget https://deb.debian.org/debian/pool/main/d/dash/dash_0.5.12-9_amd64.deb
or a different package from our server:
wget https://dietpi.com/downloads/binaries/sprd-bluetooth.deb

this works without issues.

# ls -l
total 156
-rw-r--r-- 1 root root 93152 Jun  6 10:06 dash_0.5.12-9_amd64.deb
-rw-r--r-- 1 root root 64828 Oct 10 23:09 sprd-bluetooth.deb

Maybe there is a general network issue. @StephanStS you have a NanoPi NEO Plus2 as well right? Does it still work well for you with APT updates etc with recent kernel?

Yes, I have a NanoPi NEO Plus2. Updating from a previous version, or starting from a fresh download (which insists on updating) did not work, causing timeouts.

I'll also update all our images now, maybe the newer kernel helps.

OK, please let me know when it is ready to go.

MichaIng commented 2 days ago

Hmm downloading the packages works, but the text file does still not?

cd /tmp
wget https://deb.debian.org/debian/dists/bookworm/main/binary-arm64/Packages

Weird 🤔.

Actually APT should download the xz archive:

cd /tmp
wget https://deb.debian.org/debian/dists/bookworm/main/binary-arm64/Packages.xz
klankschap commented 2 days ago

wget https://deb.debian.org/debian/dists/bookworm/main/binary-arm64/Packages --2024-10-29 15:11:15-- https://deb.debian.org/debian/dists/bookworm/main/binary-arm64/Packages Resolving deb.debian.org (deb.debian.org)... 2a04:4e42:9::644, 151.101.38.132 Connecting to deb.debian.org (deb.debian.org)|2a04:4e42:9::644|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2024-10-29 15:11:16 ERROR 404: Not Found.

I guess the Packages file does not exist. Is there an extension missing? Packages.gz seems to take forever to download

# wget https://deb.debian.org/debian/dists/bookworm/main/binary-arm64/Packages.gz
--2024-10-29 15:14:20--  https://deb.debian.org/debian/dists/bookworm/main/binary-arm64/Packages.gz
Resolving deb.debian.org (deb.debian.org)... 2a04:4e42:9::644, 151.101.38.132
Connecting to deb.debian.org (deb.debian.org)|2a04:4e42:9::644|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11934473 (11M) [application/x-gzip]
Saving to: ‘Packages.gz’

Packages.gz            0%[                     ]  40.74K  --.-KB/s    eta 6h 54m

Weird 🤔.

Magic ;-)

MichaIng commented 2 days ago

Right, Debian provides the archived versions of this file only, as this is what APT downloads by default anyway, the xz archive, if available, with highest priority.

The output btw is confusing, not showing that fact:

root@NanoPiR5S:/tmp# apt update
Get:1 https://deb.debian.org/debian bookworm InRelease [151 kB]
Get:2 https://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
Get:3 https://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:4 https://deb.debian.org/debian bookworm-backports InRelease [59.0 kB]
Get:5 https://dietpi.com/apt bookworm InRelease [3529 B]
Get:6 https://dietpi.com/apt all InRelease [26.2 kB]
Get:7 https://deb.debian.org/debian bookworm/non-free-firmware arm64 Packages [5832 B]
Get:8 https://deb.debian.org/debian bookworm/non-free arm64 Packages [75.8 kB]
Get:9 https://deb.debian.org/debian bookworm/contrib arm64 Packages [45.7 kB]
Get:10 https://deb.debian.org/debian bookworm/main arm64 Packages [8689 kB]
Get:11 https://deb.debian.org/debian bookworm-updates/contrib arm64 Packages [768 B]
Get:12 https://deb.debian.org/debian bookworm-updates/non-free-firmware arm64 Packages [616 B]
Get:13 https://deb.debian.org/debian bookworm-updates/non-free arm64 Packages [12.0 kB]
Get:14 https://deb.debian.org/debian bookworm-updates/main arm64 Packages [2468 B]
Get:15 https://deb.debian.org/debian-security bookworm-security/main arm64 Packages [187 kB]
Get:16 https://deb.debian.org/debian bookworm-backports/non-free-firmware arm64 Packages [3852 B]
Get:17 https://deb.debian.org/debian bookworm-backports/contrib arm64 Packages [4964 B]
Get:18 https://deb.debian.org/debian bookworm-backports/non-free arm64 Packages [10.1 kB]
Get:19 https://deb.debian.org/debian bookworm-backports/main arm64 Packages [250 kB]
Get:20 https://dietpi.com/apt bookworm/main arm64 Packages [2172 B]
Get:21 https://dietpi.com/apt all/nanopir5s arm64 Packages [2288 B]
Get:22 https://dietpi.com/apt all/nanopir5s all Packages [528 B]
Fetched 9637 kB in 4s (2520 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
root@NanoPiR5S:/tmp#

Also from the file size 8689 kB (matching your log) you can see that it is in fact the xz archive: https://deb.debian.org/debian/dists/bookworm/main/binary-arm64/ The gz archive would be 11 MiB already, the plain text file 49 MiB.

That it hangs seems to be the issue, probably the same with the xz archive. Just weird that this happens with different mirrors, while downloading a package from the same mirror works fine. Can you try a really different one from here? https://www.debian.org/mirror/list

klankschap commented 2 days ago

Can you try a really different one from here? https://www.debian.org/mirror/list

i tried different mirrors without success. then i connected the neopi to a different switch in the local network. then there is a difference. it will download the package lists and start an APT update, but it fails with an error.

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Upgrading APT packages

[ INFO ] DietPi-Update | APT update, please wait...
Hit:1 https://deb.debian.org/debian bookworm InRelease
Hit:2 https://deb.debian.org/debian bookworm-updates InRelease
Hit:3 https://deb.debian.org/debian-security bookworm-security InRelease
Hit:4 https://deb.debian.org/debian bookworm-backports InRelease
Hit:5 https://dietpi.com/apt bookworm InRelease
Hit:6 https://dietpi.com/apt all InRelease
Reading package lists...
[  OK  ] DietPi-Update | APT update
[ INFO ] DietPi-Update | APT upgrade, please wait...
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
The following packages will be upgraded:
  armbian-firmware linux-image-current-sunxi64
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
14 not fully installed or removed.
Need to get 123 MB of archives.
After this operation, 2234 kB of additional disk space will be used.
Get:1 https://dietpi.com/apt all/nanopineoplus2 all armbian-firmware all 24.11.0-trunk-dietpi1 [91.6 MB]
Get:2 https://dietpi.com/apt all/nanopineoplus2 arm64 linux-image-current-sunxi64 arm64 24.11.0-trunk-dietpi1 [31.3 MB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 123 MB in 15s (8208 kB/s)
(Reading database ... 16724 files and directories currently installed.)
Preparing to unpack .../armbian-firmware_24.11.0-trunk-dietpi1_all.deb ...
Unpacking armbian-firmware (24.11.0-trunk-dietpi1) over (24.8.0-trunk-dietpi2) ...
dpkg-deb (subprocess): decompressing archive '/var/cache/apt/archives/armbian-firmware_24.11.0-trunk-dietpi1_all.deb' (size=91604592) member 'data.tar': lzma error: compressed data is corrupt
dpkg-deb: error: <decompress> subprocess returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/armbian-firmware_24.11.0-trunk-dietpi1_all.deb (--unpack):
 cannot copy extracted data for './lib/firmware/ath12k/WCN7850/hw2.0/amss.bin' to '/lib/firmware/ath12k/WCN7850/hw2.0/amss.bin.dpkg-new': unexpected end of file or stream
Preparing to unpack .../linux-image-current-sunxi64_24.11.0-trunk-dietpi1_arm64.deb ...
Armbian 'linux-image-current-sunxi64' for '6.6.31-current-sunxi64': 'prerm' starting.
Armbian 'linux-image-current-sunxi64' for '6.6.31-current-sunxi64': 'prerm' finishing.
Armbian 'linux-image-current-sunxi64' for '6.6.44-current-sunxi64': 'preinst' starting.
Armbian 'linux-image-current-sunxi64' for '6.6.44-current-sunxi64': 'preinst' finishing.

Unpacking linux-image-current-sunxi64 (24.11.0-trunk-dietpi1) over (24.8.0-trunk-dietpi2) ...
dpkg-deb (subprocess): decompressing archive '/var/cache/apt/archives/linux-image-current-sunxi64_24.11.0-trunk-dietpi1_arm64.deb' (size=31346892) member 'data.tar': lzma error: compressed data is corrupt
dpkg-deb: error: <decompress> subprocess returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/linux-image-current-sunxi64_24.11.0-trunk-dietpi1_arm64.deb (--unpack):
 cannot copy extracted data for './lib/modules/6.6.44-current-sunxi64/kernel/drivers/media/common/cx2341x.ko' to '/lib/modules/6.6.44-current-sunxi64/kernel/drivers/media/common/cx2341x.ko.dpkg-new': unexpected end of file or stream
Armbian 'linux-image-current-sunxi64' for '6.6.44-current-sunxi64': 'postrm' starting.
Removing obsolete initramfs images
Armbian 'linux-image-current-sunxi64' for '6.6.44-current-sunxi64': 'postrm' finishing.
Armbian 'linux-image-current-sunxi64' for '6.6.31-current-sunxi64': 'postinst' starting.
Removing obsolete initramfs images
Armbian: update last-installed kernel symlink to 'Image'...
'/boot/Image' -> 'vmlinuz-6.6.31-current-sunxi64'
Armbian: Debian compat: linux-update-symlinks install 6.6.31-current-sunxi64 boot/vmlinuz-6.6.31-current-sunxi64
Armbian 'linux-image-current-sunxi64' for '6.6.31-current-sunxi64': 'postinst' finishing.
Errors were encountered while processing:
 /var/cache/apt/archives/armbian-firmware_24.11.0-trunk-dietpi1_all.deb
 /var/cache/apt/archives/linux-image-current-sunxi64_24.11.0-trunk-dietpi1_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
[FAILED] DietPi-Update | APT upgrade`

almost there ;-)

klankschap commented 2 days ago

all execpt two packages did upgrade after an apt update command.

# apt upgrade
The following packages will be upgraded:
  armbian-firmware linux-image-current-sunxi64                                            2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
14 not fully installed or removed.                                                        Need to get 0 B/123 MB of archives.
After this operation, 2234 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 16724 files and directories currently installed.)
Preparing to unpack .../armbian-firmware_24.11.0-trunk-dietpi1_all.deb ...
Unpacking armbian-firmware (24.11.0-trunk-dietpi1) over (24.8.0-trunk-dietpi2) ...        dpkg-deb (subprocess): decompressing archive '/var/cache/apt/archives/armbian-firmware_24.11.0-trunk-dietpi1_all.deb' (size=91604592) member 'data.tar': lzma error: compressed data is corrupt
dpkg-deb: error: <decompress> subprocess returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/armbian-firmware_24.11.0-trunk-dietpi1_all.deb (--unpack):
 cannot copy extracted data for './lib/firmware/brcm/brcmfmac4356-sdio-nanopi-m4v2.bin' to '/lib/firmware/brcm/brcmfmac4356-sdio-nanopi-m4v2.bin.dpkg-new': unexpected end of file or stream                                              Preparing to unpack .../linux-image-current-sunxi64_24.11.0-trunk-dietpi1_arm64.deb ...
Armbian 'linux-image-current-sunxi64' for '6.6.31-current-sunxi64': 'prerm' starting.
Armbian 'linux-image-current-sunxi64' for '6.6.31-current-sunxi64': 'prerm' finishing.
Armbian 'linux-image-current-sunxi64' for '6.6.44-current-sunxi64': 'preinst' starting.   Armbian 'linux-image-current-sunxi64' for '6.6.44-current-sunxi64': 'preinst' finishing.
Unpacking linux-image-current-sunxi64 (24.11.0-trunk-dietpi1) over (24.8.0-trunk-dietpi2) ...
dpkg-deb (subprocess): decompressing archive '/var/cache/apt/archives/linux-image-current-sunxi64_24.11.0-trunk-dietpi1_arm64.deb' (size=31346892) member 'data.tar': lzma error: compressed data is corrupt
dpkg-deb: error: <decompress> subprocess returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/linux-image-current-sunxi64_24.11.0-trunk-dietpi1_arm64.deb (--unpack):
 cannot copy extracted data for './boot/vmlinuz-6.6.44-current-sunxi64' to '/boot/vmlinuz-6.6.44-current-sunxi64.dpkg-new': unexpected end of file or stream
Armbian 'linux-image-current-sunxi64' for '6.6.44-current-sunxi64': 'postrm' starting.
Removing obsolete initramfs images
Armbian 'linux-image-current-sunxi64' for '6.6.44-current-sunxi64': 'postrm' finishing.
Armbian 'linux-image-current-sunxi64' for '6.6.31-current-sunxi64': 'postinst' starting.
Removing obsolete initramfs images
Armbian: update last-installed kernel symlink to 'Image'...
'/boot/Image' -> 'vmlinuz-6.6.31-current-sunxi64'
Armbian: Debian compat: linux-update-symlinks install 6.6.31-current-sunxi64 boot/vmlinuz-6.6.31-current-sunxi64
Armbian 'linux-image-current-sunxi64' for '6.6.31-current-sunxi64': 'postinst' finishing.
Errors were encountered while processing:
 /var/cache/apt/archives/armbian-firmware_24.11.0-trunk-dietpi1_all.deb
 /var/cache/apt/archives/linux-image-current-sunxi64_24.11.0-trunk-dietpi1_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
klankschap commented 2 days ago

On 29/10/2024 19:05, StephanStS wrote:

Könnte das eine volle Disk oder eine defekte Disk sein?

Not sure, as it happens on different SD cards. The timing errors seems to be related to the local switch for now. That is, the update works, and the upgrade partially.

MichaIng commented 2 days ago

Weirdly this looks now very different to this report here: #7261 However, you are using a different SBC with different kernel, and I just successfully tested the very same kernel and firmware upgrade (also some previous versions of both packages) on my Odroid N2+. So for now I would say coincidence.

But can you check for kernel errors?

dmesg -l 0,1,2,3
klankschap commented 2 days ago

On 29/10/2024 22:20, MichaIng wrote:

But can you check for kernel errors?

dmesg -l 0,1,2,3

with a fresh download from https://dietpi.com/downloads/images/DietPi_NanoPiNEOPlus2-ARMv8-Bookworm.img.xz

it passed the initial setup (almost)

[ INFO ] DietPi-Update | APT upgrade, please wait... Reading package lists... Building dependency tree... Reading state information... Calculating upgrade... The following packages will be upgraded: armbian-firmware linux-image-current-sunxi64 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 14 not fully installed or removed. Need to get 123 MB of archives. After this operation, 2234 kB of additional disk space will be used. Get:1 https://dietpi.com/apt all/nanopineoplus2 all armbian-firmware all 24.11.0-trunk-dietpi1 [91.6 MB] Get:2 https://dietpi.com/apt all/nanopineoplus2 arm64 linux-image-current-sunxi64 arm64 24.11.0-trunk-dietpi1 [31.3 MB] debconf: delaying package configuration, since apt-utils is not installed Fetched 123 MB in 15s (8262 kB/s) (Reading database ... 16724 files and directories currently installed.) Preparing to unpack .../armbian-firmware_24.11.0-trunk-dietpi1_all.deb ... Unpacking armbian-firmware (24.11.0-trunk-dietpi1) over (24.8.0-trunk-dietpi2) ... dpkg-deb (subprocess): decompressing archive '/var/cache/apt/archives/armbian-firmware_24.11.0-trunk-dietpi1_all.deb' (size=91604592) member 'data.tar': lzma error: compressed data is corrupt dpkg-deb: error: subprocess returned error exit status 2 dpkg: error processing archive /var/cache/apt/archives/armbian-firmware_24.11.0-trunk-dietpi1_all.deb (--unpack): cannot copy extracted data for './lib/firmware/brcm/brcmfmac4356-sdio-nanopi-m4v2.bin' to '/lib/firmware/brcm/brcmfmac4356-sdio-nanopi-m4v2.bin.dpkg-new': unexpected end of file or stream Preparing to unpack .../linux-image-current-sunxi64_24.11.0-trunk-dietpi1_arm64.deb ... Armbian 'linux-image-current-sunxi64' for '6.6.31-current-sunxi64': 'prerm' starting. Armbian 'linux-image-current-sunxi64' for '6.6.31-current-sunxi64': 'prerm' finishing. Armbian 'linux-image-current-sunxi64' for '6.6.44-current-sunxi64': 'preinst' starting. Armbian 'linux-image-current-sunxi64' for '6.6.44-current-sunxi64': 'preinst' finishing. Unpacking linux-image-current-sunxi64 (24.11.0-trunk-dietpi1) over (24.8.0-trunk-dietpi2) ... dpkg-deb: error: subprocess was killed by signal (Segmentation fault) dpkg: error processing archive /var/cache/apt/archives/linux-image-current-sunxi64_24.11.0-trunk-dietpi1_arm64.deb (--unpack): cannot copy extracted data for './boot/vmlinuz-6.6.44-current-sunxi64' to '/boot/vmlinuz-6.6.44-current-sunxi64.dpkg-new': unexpected end of file or stream Armbian 'linux-image-current-sunxi64' for '6.6.44-current-sunxi64': 'postrm' starting. Removing obsolete initramfs images Armbian 'linux-image-current-sunxi64' for '6.6.44-current-sunxi64': 'postrm' finishing. Armbian 'linux-image-current-sunxi64' for '6.6.31-current-sunxi64': 'postinst' starting. Removing obsolete initramfs images Armbian: update last-installed kernel symlink to 'Image'... '/boot/Image' -> 'vmlinuz-6.6.31-current-sunxi64' Armbian: Debian compat: linux-update-symlinks install 6.6.31-current-sunxi64 boot/vmlinuz-6.6.31-current-sunxi64 Armbian 'linux-image-current-sunxi64' for '6.6.31-current-sunxi64': 'postinst' finishing. Errors were encountered while processing: /var/cache/apt/archives/armbian-firmware_24.11.0-trunk-dietpi1_all.deb /var/cache/apt/archives/linux-image-current-sunxi64_24.11.0-trunk-dietpi1_arm64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) [FAILED] DietPi-Update | APT upgrade

then the dmesg

@.:~# dmesg -l 0,1,2,3 @.:~#

klankschap commented 2 days ago

starting with a fresh installer download, unmodified, it passes the initial setup, almost.

i remove the two packages that fail

/var/cache/apt/archives/armbian-firmware_24.11.0-trunk-dietpi1_all.deb
/var/cache/apt/archives/linux-image-current-sunxi64_24.11.0-trunk-dietpi1_arm64.deb

then relauch the upgrade

root@DietPi:~# rm /var/cache/apt/archives/armbian-firmware_24.11.0-trunk-dietpi1_all.deb

root@DietPi:~# apt-get -y --with-new-pkgs upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  armbian-firmware
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
15 not fully installed or removed.
Need to get 91.6 MB of archives.
After this operation, 820 kB of additional disk space will be used.
Get:1 https://dietpi.com/apt all/nanopineoplus2 all armbian-firmware all 24.11.0-trunk-dietpi1 [91.6 MB]
Fetched 91.6 MB in 7s (12.3 MB/s)                                                                       
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 16735 files and directories currently installed.)
Preparing to unpack .../armbian-firmware_24.11.0-trunk-dietpi1_all.deb ...
Unpacking armbian-firmware (24.11.0-trunk-dietpi1) over (24.8.0-trunk-dietpi2) ...
dpkg-deb: error: <decompress> subprocess was killed by signal (Segmentation fault)
dpkg: error processing archive /var/cache/apt/archives/armbian-firmware_24.11.0-trunk-dietpi1_all.deb (--unpack):
 cannot copy extracted data for './lib/firmware/ath12k/WCN7850/hw2.0/amss.bin' to '/lib/firmware/ath12k/WCN7850/hw2.0/amss.bin.dpkg-new': unexpected end of file or stream
Errors were encountered while processing:
 /var/cache/apt/archives/armbian-firmware_24.11.0-trunk-dietpi1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@DietPi:~# 
root@DietPi:~# apt update
Hit:1 https://deb.debian.org/debian bookworm InRelease
Hit:2 https://deb.debian.org/debian bookworm-updates InRelease
Hit:3 https://deb.debian.org/debian-security bookworm-security InRelease
Hit:4 https://deb.debian.org/debian bookworm-backports InRelease
Hit:5 https://dietpi.com/apt bookworm InRelease
Hit:6 https://dietpi.com/apt all InRelease     
Reading package lists... Done                  
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
root@DietPi:~# apt list --upgradable
Listing... Done
armbian-firmware/all 24.11.0-trunk-dietpi1 all [upgradable from: 24.8.0-trunk-dietpi2]
N: There are 3 additional versions. Please use the '-a' switch to see them.
root@DietPi:~# apt list --upgradable -a
Listing... Done
armbian-firmware/all 24.11.0-trunk-dietpi1 all [upgradable from: 24.8.0-trunk-dietpi2]
armbian-firmware/all,now 24.8.0-trunk-dietpi2 all [installed,upgradable to: 24.11.0-trunk-dietpi1]
armbian-firmware/all 24.8.0-trunk-dietpi1 all
armbian-firmware/all 24.5.0-trunk all
 Linux version 6.6.31-current-sunxi64 (armbian@next) (aarch64-linux-gnu-gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #1 SMP Fri May 17 10:02:40 UTC 2024

magic for sure...

MichaIng commented 2 days ago

Is it the same for you when you try to manually download and install that package:

cd /tmp
wget https://dietpi.com/apt/dists/all/nanopineoplus2/binary-all/armbian-firmware_24.11.0-trunk-dietpi1.deb
sha256sum armbian-firmware_24.11.0-trunk-dietpi1.deb
dpkg -i armbian-firmware_24.11.0-trunk-dietpi1.deb

The sha256sum should return 5ef8c82df7222b2a792f5f366f2d2dfda7b047c868b101a60334da4f8fd00531.

klankschap commented 2 days ago

5ef8c82df7222b2a792f5f366f2d2dfda7b047c868b101a60334da4f8fd00531 armbian-firmware_24.11.0-trunk-dietpi1.deb

/tmp# dpkg -i armbian-firmware_24.11.0-trunk-dietpi1.deb
(Reading database ... 16735 files and directories currently installed.)
Preparing to unpack armbian-firmware_24.11.0-trunk-dietpi1.deb ...
Unpacking armbian-firmware (24.11.0-trunk-dietpi1) over (24.8.0-trunk-dietpi2) ...
dpkg-deb (subprocess): decompressing archive 'armbian-firmware_24.11.0-trunk-dietpi1.deb' (size=91604592) member 'data.tar': lzma error: compressed data is corrupt
dpkg-deb: error: <decompress> subprocess returned error exit status 2
dpkg: error processing archive armbian-firmware_24.11.0-trunk-dietpi1.deb (--install):
 cannot copy extracted data for './lib/firmware/qcom/sm8550/ayn/odin2/adsp.mbn' to '/lib/firmware/qcom/sm8550/ayn/odin2/adsp.mbn.dpkg-new': unexpected end of file or stream
Errors were encountered while processing:
 armbian-firmware_24.11.0-trunk-dietpi1.deb
klankschap commented 2 days ago

what is the difference between eg updating dietpi1 over dietpi22 ?

(24.11.0-trunk-dietpi1) over (24.8.0-trunk-dietpi2)

MichaIng commented 10 hours ago

So it is definitely something wrong with the dpkg extractor, and I guess it is the same with the other issue I linked above.

what is the difference between eg updating dietpi1 over dietpi22 ?

(24.11.0-trunk-dietpi1) over (24.8.0-trunk-dietpi2)

24.11.0 is the Armbian build system version. We append an on suffix for every rebuild, usually implying a newer kernel version or updated firmware like in this case.

MichaIng commented 5 hours ago

Tested it on the Orange Pi Zero 3, which uses the same kernel, and the initial update from our image works well. If you have a spare SD card, could you check whether a current fresh DietPi image does the initial update fine for you?

And anther thing, does reinstalling other packages work, like dpkg itself?

apt install --reinstall dpkg
klankschap commented 4 hours ago

On 31/10/2024 21:42, MichaIng wrote:

Tested it on the Orange Pi Zero 3, which uses the same kernel, and the initial update from our image works well. If you have a spare SD card, could you check whether a current fresh DietPi image does the initial update fine for you?

just downloadded a fresh copy and it passed all the ways through the initial setup

Building dependency tree... Reading state information... 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. [ OK ] DietPi-Update | APT autopurge [ OK ] DietPi-Update | systemctl daemon-reload [ OK ] DietPi-Update | Incremental patching to v9.8.0 completed [ INFO ] DietPi-Update | Checking for new available live patches [ OK ] DietPi-Update | eval echo 1 > /boot/dietpi/.install_stage

DietPi-Update ───────────────────────────────────────────────────── Phase: Completed

[ INFO ] DietPi-Update | Current version : v9.8.0 [ INFO ] DietPi-Update | Latest version : v9.8.0 [ OK ] DietPi-Update | sync [ INFO ] DietPi-Update | A reboot is done to finalise the kernel upgrade

whatever you did, it made the difference. Much appreciated indeed!

And anther thing, does reinstalling other packages work, like |dpkg| itself?

apt install --reinstall dpkg

yes. I also managed to switch dropbear to openssh :-)

Now i'll try to flash the emmc with the recent image.

.F

MichaIng commented 3 hours ago

And does reinstalling a larger package work?

apt install --reinstall armbian-firmware
klankschap commented 3 hours ago

On 31/10/2024 23:47, MichaIng wrote:

And does reinstalling a larger package work?

apt install --reinstall armbian-firmware

nope, but first flashed the img into /dev/mmcblk2 and boot from there. That works. Installed python3

@.***:~# python3 Python 3.11.2 (main, Aug 26 2024, 07:20:54) [GCC 12.2.0] on linux Type "help", "copyright", "credits" or "license" for more information.

@.***:~# apt install --reinstall armbian-firmware Reading package lists... Done Building dependency tree... Done Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded. Need to get 91.6 MB of archives. After this operation, 0 B of additional disk space will be used. Get:1 https://dietpi.com/apt all/nanopineoplus2 all armbian-firmware all 24.11.0-trunk-dietpi1 [91.6 MB] Fetched 91.6 MB in 12s (7331 kB/s)

debconf: delaying package configuration, since apt-utils is not installed (Reading database ... 16884 files and directories currently installed.) Preparing to unpack .../armbian-firmware_24.11.0-trunk-dietpi1_all.deb ... Unpacking armbian-firmware (24.11.0-trunk-dietpi1) over (24.11.0-trunk-dietpi1) ... dpkg-deb (subprocess): decompressing archive '/var/cache/apt/archives/armbian-firmware_24.11.0-trunk-dietpi1_all.deb' (size=91604592) member 'data.tar': lzma error: compressed data is corrupt dpkg-deb: error: subprocess returned error exit status 2 dpkg: error processing archive /var/cache/apt/archives/armbian-firmware_24.11.0-trunk-dietpi1_all.deb (--unpack): cannot copy extracted data for './lib/firmware/qcom/sc8180x/SAMSUNG/W767/qcmpss8180_XEF.mbn' to '/lib/firmware/qcom/sc8180x/SAMSUNG/W767/qcmpss8180_XEF.mbn.dpkg-new': unexpected end of file or stream Errors were encountered while processing: /var/cache/apt/archives/armbian-firmware_24.11.0-trunk-dietpi1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

did a reboot and tried again:

(Reading database ... 16965 files and directories currently installed.) Preparing to unpack .../armbian-firmware_24.11.0-trunk-dietpi1_all.deb ... Unpacking armbian-firmware (24.11.0-trunk-dietpi1) over (24.11.0-trunk-dietpi1) ... dpkg-deb (subprocess): decompressing archive '/var/cache/apt/archives/armbian-firmware_24.11.0-trunk-dietpi1_all.deb' (size=91604592) member 'data.tar': lzma error: compressed data is corrupt dpkg-deb: error: subprocess returned error exit status 2 dpkg: error processing archive /var/cache/apt/archives/armbian-firmware_24.11.0-trunk-dietpi1_all.deb (--unpack): cannot copy extracted data for './lib/firmware/rtl_bt/rtl8822cs_fw.bin' to '/lib/firmware/rtl_bt/rtl8822cs_fw.bin.dpkg-new': unexpected end of file or stream Errors were encountered while processing: /var/cache/apt/archives/armbian-firmware_24.11.0-trunk-dietpi1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

.F