Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8609

Raspberry Pi OS • Re: Corrupt /var/lib/dpkg/status on a new install

$
0
0
I have been reading the topic thread a bit better and I am not sure where this issue would come from. It seemed or seems to come from kernel/ext4/SD-card, but I now remember that I had also a text file with the same 0xFF filled (at the end). That was dues to some bug in some text editor I guessed at that time, could not really track it anymore. Also was a file on NAS (NFS via Btrfs), no issues there.
On the other hand, I remember an SPI-flash chip from new SBC contained also all 0xFF, except for the first (few?) kbytes; That seems to be explicitly factory written with zeros so the ROM loader skips it.

Anyway see below, I cannot reproduce it just on 'container' level. I think most likely something in some firmware controller inside SD-card. Maybe something with trim range or so, or the commands. I have no running Windows, no Imager usage and rarely write full image SD-cards as I use Btrfs and that allows updates on blocklevel in running system, SD-cards stay in the SBC normally and so powered on as well. There is no situation like writing in 1 computer taking SD-card out and stick it into Pi and power it again.

Code:

- host is Debian13 aarch64 (VM on RK3588 allocated 4x Cortex-A76 8GB RAM)cd /mnt/HDDtmpwget -O - https://downloads.raspberrypi.com/raspios_arm64/images/raspios_arm64-2025-05-13/2025-05-13-raspios-bookworm-arm64.img.xz | unxz > os.imgtruncate -s12G os.imglosetup --show -fP os.imgmkdir 2mount /dev/loop0p2 2resize2fs /dev/loop0p2cp <patched shadow file for known root password> 2/etc/shadowsystemd-nspawn -bD 2- login as rootroot@raspberrypi:~# apt update && apt full-upgrade -y- all fine, Y for initramfs config questionroot@raspberrypi:~# poweroffumount 2fsck /dev/loop0p2- no errors

Statistics: Posted by redvli — Sat Sep 06, 2025 7:28 am



Viewing all articles
Browse latest Browse all 8609

Trending Articles