1

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.

Mikke Mus
  • 195
  • 1
  • 13

3 Answers3

2

I finally solved my problem after months. It was suggested in the comments to put the solution into an answer. The issue was that I have the /boot-directory on a removable USB-drive that I unplug after I have booted. When I tried to repeat the process with the USB-drive plugged in, it all worked. So this is an example of where the input/output-error came as a result of a hardware issue.

Mikke Mus
  • 195
  • 1
  • 13
1

You could prepend LC_ALL=C before your commands to set the locale to C and so display the output in English. The actual error in English would be something like this:

dpkg: error processing archive /var/cache/apt/archives/linux-image-5.10.0-25-amd64_5.10.191-1_amd64.deb (--unpack):
  unable to stat './boot/System.map-5.10.0-25-amd64' (which I was about to install): Input/output error
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
W: Last kernel image has been removed, so removing the default symlinks
Errors were encountered 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)

This means that apt could not read from the deb archive of the downloaded package located at /var/cache/apt/archives/linux-image-5.10.0-25-amd64_5.10.191-1_amd64.deb, in particular the file System.map-5.10.0-25-amd64 from the boot directory. It could be due to the archive of the package linux-image-5.10.0-25-amd64 written to disk or downloaded incorrectly when fetched from the repository. The I/O error here would be due to the inability of the output of the unpacking subprocess to be passed as input for further processing.

I would try cleaning the whole apt cache, including the downloaded archive, then proceed with upgrading once again.

$ sudo apt clean
$ sudo apt update
$ sudo apt upgrade

The default apt sources list for Devuan Chimaera 4.0, which is based on Debian Bullseye 11.1 and has Linux kernel 5.10, is:

$ cat /etc/apt/sources.list
# deb cdrom:[Devuan GNU/Linux 4.0 chimaera amd64 - netinstall 20211012]/ chimaera contrib main non-free

#deb cdrom:[Devuan GNU/Linux 4.0 chimaera amd64 - netinstall 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 contrib non-free deb-src http://pkgmaster.devuan.org/merged chimaera-security main contrib non-free

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 contrib non-free deb-src http://deb.devuan.org/merged chimaera-updates main contrib non-free

This system was installed using small removable media

(e.g. netinst, live or single CD). The matching "deb cdrom"

entries were disabled at the end of the installation process.

For information about how to configure apt package sources,

see the sources.list(5) manual.

Every line that is commented out with # can be skipped because it is just a comment that is not used. You might want to add contrib non-free after main if you are using software from those repositories, for example non-free Wi-Fi firmware which is typical for a laptop. The lines starting with deb-src are for sources and are not used in the ordinary installation and upgrade of packages.

Additional sources entries might be hiding in the sources.list.d directory, which is empty by default:

$ ls /etc/apt/sources.list.d
$
0

This could be a few things, disk error itself could be one, try a fsck and see if it helps. sudo fsck -f /dev/{device}

Second I would try to clean apt cache entirely entirely "sudo apt clean"

Then try to reconfigure/reinstall

sudo dpkg --configure -a
and
sudo apt-get install --reinstall {affected package}

Past that, this could become some brain surgery and end up no being worth it of the system can simply be nuked/reloaded.

Rohit Gupta
  • 5,096