Apt Update/Upgrade Problem Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
DarrenHill
Posts: 42
Joined: Wed May 08, 2019 3:00 pm

Apt Update/Upgrade Problem

Post by DarrenHill »

I'm trying to update my Pi using the normal apt update / upgrade route, but it's giving errors.

From what I can see it's trying to do a kernel update, but there seems to be some issues with the files it is downloading and some segmentation faults. The full transcript of the sequence is pasted on pastebin:

https://pastebin.com/BQzJdUku

The first error I can see in it is on line 459, which seems to be some sort of corrupt data when it's decompressing the new kernel file.

Can anyone shed any light on what's going wrong? Is it an SD card that's dying, or is there something else here that can be fixed?

After it fails, anything tried using sudo just gives a segmentation fault, but generally the device is working fine otherwise and if I just pull the power on it and restart it then it also seems to run fine.

It's running dietpi 6.33.3, with installs of WireGuard, PiHole and RPi-Monitor. it used to also host Home Assistant, but that was removed and migrated onto its own Pi4 under Hass.io (or whatever it's now called).
User avatar
Joulinar
Posts: 4823
Joined: Sat Nov 16, 2019 12:49 am

Re: Apt Update/Upgrade Problem

Post by Joulinar »

Hi,

this is the normal Debain apt update process and not DietPi specific. Some downloaded files seems to be corrupted. Can you verify you have enough free space? As well you could try to clean apt cache

Code: Select all

/boot/dietpi/func/dietpi-set_software apt-cache clean
apt update
apt upgrade
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
DarrenHill
Posts: 42
Joined: Wed May 08, 2019 3:00 pm

Re: Apt Update/Upgrade Problem

Post by DarrenHill »

Thanks - tried that and after initially looking hopeful it's still giving a similar error when it tried to update the kernel (looks very similar to the stuff I pastebin'd before overall, the main error is below):

Code: Select all

Unpacking raspberrypi-kernel (1.20201201-1) over (1.20201022-1) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: <decompress> subprocess returned error exit status 2
dpkg: error processing archive /tmp/apt-dpkg-install-KDaQRK/10-raspberrypi-kernel_1.20201201-1_armhf.deb (--unpack):
 cannot copy extracted data for './lib/modules/5.4.79-v7l+/kernel/drivers/net/usb/cdc_ncm.ko' to '/lib/modules/5.4.79-v7l+/kernel/drivers/net/usb/cdc_ncm.ko.dpkg-new': unexpected end of file or stream
Plenty of space available according to df - about 25.5GB free on /dev/root and 197MB on /boot.

Any thoughts, or would it be one to just go to a back-up and restore to the card?
DarrenHill
Posts: 42
Joined: Wed May 08, 2019 3:00 pm

Re: Apt Update/Upgrade Problem

Post by DarrenHill »

I've restored the backup onto a new card and that's updating fine, so it's either something corrupted on the previous set-up somewhere or that original SD card is dying.

Anyway I'll check the card out later for issues, but for now I'm back up and running again without further issues so this one can be closed off.
User avatar
Joulinar
Posts: 4823
Joined: Sat Nov 16, 2019 12:49 am

Re: Apt Update/Upgrade Problem

Post by Joulinar »

it's always good to have a backup available. probably there are physical issues on the original SD card preventing files to be download correctly. Good that you are back online now
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply