1

enter image description hereThe Software Updater app on my system fails. It lists the packages that need to update, but after I click install the app works for a few seconds and then blinks into non-existence.

I use Ubuntu 19.10 with "AMD® A10-5700 apu with radeon(tm) hd graphics × 4 "

When I run apt-get upgrade or apt-get dist-upgrade they fail with an error

dpkg: unrecoverable fatal error, aborting:
 loading files list file for package 'automake': cannot open /var/lib/dpkg/info/automake.list (Input/output error)
E: Sub-process /usr/bin/dpkg returned an error code (2)

I can cd to /var/lib/dpkg/info but if I do ls the command hangs until I ctrl-c.

Here is the full output of "sudo apt-get dist-upgrade" for my system

sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  linux-headers-5.3.0-42 linux-headers-5.3.0-42-generic
  linux-image-5.3.0-42-generic linux-modules-5.3.0-42-generic
  linux-modules-extra-5.3.0-42-generic
The following packages will be upgraded:
  apport apport-gtk bsdutils cpp-7 cpp-8 fdisk firefox firefox-locale-en
  fonts-opensymbol gcc-7 gcc-7-base gcc-8 gcc-8-base gir1.2-mutter-5
  gnome-shell gnome-shell-common libarchive13 libasan4 libblkid1
  libblkid1:i386 libc-bin libc-dev-bin libc6 libc6:i386 libc6-dbg libc6-dev
  libc6-i386 libcilkrts5 libegl-mesa0 libegl1-mesa libfdisk1 libgbm1
  libgcc-7-dev libgcc-8-dev libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa
  libgles2-mesa libglx-mesa0 libicu63 libmount1 libmount1:i386 libmpx2
  libmutter-5-0 libreoffice-avmedia-backend-gstreamer libreoffice-base-core
  libreoffice-calc libreoffice-common libreoffice-core libreoffice-draw
  libreoffice-gnome libreoffice-gtk3 libreoffice-help-common
  libreoffice-help-en-us libreoffice-impress libreoffice-math
  libreoffice-ogltrans libreoffice-pdfimport libreoffice-style-breeze
  libreoffice-style-colibre libreoffice-style-elementary
  libreoffice-style-galaxy libreoffice-style-tango libreoffice-writer
  libsmartcols1 libsqlite3-0 libubsan0 libuuid1 libwayland-egl1-mesa
  libxatracker2 linux-generic linux-headers-generic linux-image-generic
  linux-libc-dev linux-signed-generic locales mesa-va-drivers
  mesa-vdpau-drivers mesa-vulkan-drivers mount mutter mutter-common
  python3-apport python3-problem-report python3-uno rfkill snapd
  unattended-upgrades uno-libs3 ure util-linux uuid-runtime
  yaru-theme-gnome-shell yaru-theme-gtk yaru-theme-icon yaru-theme-sound
96 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 73.4 MB/356 MB of archives.
After this operation, 358 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu eoan-updates/main amd64 linux-modules-5.3.0-42-generic amd64 5.3.0-42.34 [14.2 MB]
Get:2 http://us.archive.ubuntu.com/ubuntu eoan-updates/main amd64 linux-image-5.3.0-42-generic amd64 5.3.0-42.34 [8,651 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu eoan-updates/main amd64 linux-modules-extra-5.3.0-42-generic amd64 5.3.0-42.34 [38.3 MB]
Get:4 http://us.archive.ubuntu.com/ubuntu eoan-updates/main amd64 linux-generic amd64 5.3.0.42.36 [1,860 B]
Get:5 http://us.archive.ubuntu.com/ubuntu eoan-updates/main amd64 linux-image-generic amd64 5.3.0.42.36 [2,428 B]
Get:6 http://us.archive.ubuntu.com/ubuntu eoan-updates/main amd64 linux-headers-5.3.0-42 all 5.3.0-42.34 [11.0 MB]
Get:7 http://us.archive.ubuntu.com/ubuntu eoan-updates/main amd64 linux-headers-5.3.0-42-generic amd64 5.3.0-42.34 [1,250 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu eoan-updates/main amd64 linux-headers-generic amd64 5.3.0.42.36 [2,384 B]
Fetched 73.4 MB in 2min 4s (590 kB/s)                                          
Extracting templates from packages: 100%
Preconfiguring packages ...
dpkg: unrecoverable fatal error, aborting:
 loading files list file for package 'automake': cannot open /var/lib/dpkg/info/automake.list (Input/output error)
E: Sub-process /usr/bin/dpkg returned an error code (2)

Output from "sudo fdisk -l"

Disk /dev/sda: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM001-9YN1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 63B039BF-CCA4-4B17-A312-3CAA5FAFB5F5

Device       Start        End    Sectors  Size Type
/dev/sda1     2048    1050623    1048576  512M EFI System
/dev/sda2  1050624 3907028991 3905978368  1.8T Linux LVM




Disk /dev/mapper/ubuntu--vg-root: 1.83 TiB, 1987009576960 bytes, 3880878080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/ubuntu--vg-swap_1: 11.99 GiB, 12847153152 bytes, 25092096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/sdb: 28.9 GiB, 31010586624 bytes, 60567552 sectors
Disk model: USB DISK 3.0    
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x6132549e

Device     Boot   Start      End  Sectors  Size Id Type
/dev/sdb1  *          0  4812191  4812192  2.3G  0 Empty
/dev/sdb2       4073124  4081059     7936  3.9M ef EFI (FAT-12/16/32)
/dev/sdb3       4812800 60567551 55754752 26.6G 83 Linux
ubuntu@ubuntu:~$ sudo e2fsck -fccky /dev/sda2
e2fsck 1.45.3 (14-Jul-2019)
/dev/sda2 is in use.
e2fsck: Cannot continue, aborting.
21
  • What happens if you cat /var/lib/dpkg/info/automake.list?
    – heynnema
    Mar 17, 2020 at 22:01
  • I get the following response cat: /var/lib/dpkg/info/automake.list: Input/output error Mar 18, 2020 at 2:03
  • Edit your question and show me screenshot(s) of the Disks application SMART Data window. Also assure that you have good backups, as we may do a bad block scan on the disk. Do you have HDD or SSD (we don't bad block a SSD)? Start comments to me with @heynnema and let me know when you have this.
    – heynnema
    Mar 18, 2020 at 3:21
  • @heynnema - I added the screenshot. The drive is mechanical, HDD. Thanks for your help. I will start a backup this evening. This doesn't sound like it is going in a good direction. Mar 18, 2020 at 22:58
  • Yeah, right now it looks like your HDD may be failing. How old is it? I've posted an answer on how to bad block your HDD. Report back.
    – heynnema
    Mar 18, 2020 at 23:09

1 Answer 1

1

fsck

Let's first check out your file system...

  • boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode
  • open a terminal window by pressing Ctrl+Alt+T
  • type sudo fsck -f /dev/mapper/ubuntu--vg-root
  • repeat the fsck command if there were errors

Bad Blocking

After your backup is done...

    Note: do NOT abort a bad block scan!

    Note: do NOT bad block a SSD

    Note: backup your important files FIRST!

    Note: this will take many hours

    Note: you may have a pending HDD failure

Boot to a Ubuntu Live DVD/USB.

In terminal...

sudo e2fsck -fcky /dev/mapper/ubuntu--vg-root # read-only test

or

sudo e2fsck -fccky /dev/mapper/ubuntu--vg-root # (recommended)

The -k is important, because it saves the previous bad block table, and adds any new bad blocks to that table. Without -k, you loose all of the prior bad block information.

The -fccky parameter...

   -f    Force checking even if the file system seems clean.

   -c    This option causes e2fsck to use badblocks(8) program  to  do  a
         read-only  scan  of  the device in order to find any bad blocks.
         If any bad blocks are found, they are added  to  the  bad  block
         inode  to  prevent them from being allocated to a file or direc‐
         tory.  If this option is specified twice,  then  the  bad  block
         scan will be done using a non-destructive read-write test.

   -k    When combined with the -c option, any existing bad blocks in the
         bad blocks list are preserved, and any new bad blocks  found  by
         running  badblocks(8)  will  be added to the existing bad blocks
         list.

   -y    Assume  an answer of `yes' to all questions; allows e2fsck to be
         used non-interactively.  This option may not be specified at the
         same time as the -n or -p options.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .