I am using Debian bullseye without systemd (devuan) and today I wanted to upgrade my packages. So I typed
sudo apt upgrade
It didn't work because I got the following error (note that this error was translated from Swedish language os to English using google-translate):
dpkg: error processing archive /var/cache/apt/archives/linux-image-5.10.0-25-amd64_5.10.191-1_amd64.deb (--unpack):
could not read status of "./boot/System.map-5.10.0-25-amd64" (which was just about to install): Input/output error
dpkg-deb: error: subprocess paste was killed by signal (The pipe was broken)
W: Last kernel image has been removed, so removing the default symlinks
An error occurred while processing:
/var/cache/apt/archives/linux-image-5.10.0-25-amd64_5.10.191-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
When I tried to use apt --fix-broken install, it still doesn't work.
I tried to search google, but I didn't quite find anything quite like this problem. What does it mean and how will I debug and fix it?
EDIT:
$ cat /etc/apt/sources.list
# deb cdrom:[Devuan GNU/Linux 4.0 chimaera amd64 - desktop 20211012]/ chimaera contrib main non-free
deb http://deb.devuan.org/merged chimaera main
deb-src http://deb.devuan.org/merged chimaera main
deb http://pkgmaster.devuan.org/merged chimaera-security main
deb-src http://pkgmaster.devuan.org/merged chimaera-security main
chimaera-updates, to get updates before a point release is made;
see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
deb http://deb.devuan.org/merged chimaera-updates main
deb-src http://deb.devuan.org/merged chimaera-updates main
EDIT 2: I solved my problem. The issue was that I have the /boot directory on a removable USB-drive that I remove after I have booted. When I tried to repeat the process with the USB-drive plugged in, it all worked.