0

GParted

SMART Data & SelfTests 01

SMART Data & SelfTests 02

Terminal Badblocks

I'm in Ubuntu 18.04, and now I'm dealing with this "fatal error" in dpkg folder, while trying to install some random apps... Some of them are returning this error:

dpkg: unrecoverable fatal error, aborting:
 reading files list for package 'libistack-commons-java': Input/output error
E: Sub-process /usr/bin/dpkg returned an error code (2)

I don't know exactly what this pack "libistack-commons-java" does, but since is something wrong with it, I supposed I could update this pack and get rid of all potencial corrupted archives or something like this.

Then I got the same error, and I don't really know what else I could try!

guialleoni@guialleoni:~$ sudo apt-get update -y
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]
Hit:2 http://br.archive.ubuntu.com/ubuntu bionic InRelease                
Get:3 http://br.archive.ubuntu.com/ubuntu bionic-updates InRelease [88,7 kB]
Get:4 http://br.archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB] 
Fetched 252 kB in 6s (39,2 kB/s)                                               
Reading package lists... Done
guialleoni@guialleoni:~$ sudo apt-get install -y libistack-commons-java
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libistack-commons-java is already the newest version (3.0.6-3~18.04).
libistack-commons-java set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
guialleoni@guialleoni:~$ sudo apt update && sudo apt install libcanberra-gtk-module libgconf-2-4
Hit:1 http://br.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://br.archive.ubuntu.com/ubuntu bionic-updates InRelease [88,7 kB]   
Get:3 http://br.archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB] 
Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]    
Fetched 252 kB in 1s (236 kB/s)     
Reading package lists... Done
Building dependency tree       
Reading state information... Done
5 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libgconf-2-4 is already the newest version (3.2.6-4ubuntu1).
The following NEW packages will be installed:
  libcanberra-gtk-module libcanberra-gtk0
0 upgraded, 2 newly installed, 0 to remove and 5 not upgraded.
Need to get 0 B/17,9 kB of archives.
After this operation, 84,0 kB of additional disk space will be used.
Selecting previously unselected package libcanberra-gtk0:amd64.
dpkg: unrecoverable fatal error, aborting:
 reading files list for package 'libistack-commons-java': Input/output error
E: Sub-process /usr/bin/dpkg returned an error code (2)

Some big heart to help the dummie here? Please!

  • Input/output error means a possible hardware failure, among other (less-likely) possible causes. Look up how to run a SMART test on your hard drive. – user535733 Dec 17 '19 at 18:05
  • See this question on how to run SMART tests, it might be a bit old but the information still looks accurate. – Baa Dec 17 '19 at 18:08
  • 1
    Edit your question and show me screenshot(s) of the Disks application SMART Data & Tests. It may take two screenshots to get all of the data. Also show me grep -i sda /var/log/syslog*. Report back. Start comments to me with @heynnema or I may miss them. – heynnema Dec 17 '19 at 19:46
  • @heynnema

    Hey, guys! Thanks for your availability. I'm running Check for bad blocks right now... I've already edited the question with the SMART Data & Tests prints!

    Im also trying to understand exactly how to proceed with the grep -i sda /var/log/syslog* that @heynnema asked... I think I'll have to wait till the checking finish...

    Thanks a lot!

    – Guilherme Alleoni Dec 17 '19 at 20:41
  • I've reviewed your SMART data... You're probably checking for bad blocks incorrectly. Exactly what command did you use? Is this a laptop or desktop computer? The grep command is run from within the terminal app. – heynnema Dec 17 '19 at 20:56
  • @heynnema I'm checking this way right here:

    sudo badblocks -sv /dev/sda

    then, i'd run this:

    sudo badblocks -sv /dev/sda > bad-blocks-result sudo fsck -t ext4 -l bad-blocks-result /dev/sda1

    I'll print the terminal right now and edit in the question

    – Guilherme Alleoni Dec 17 '19 at 21:29
  • From man badblocks... Important note: If the output of badblocks is going to be fed to the e2fsck or mke2fs programs, it is important that the block size is prop‐ erly specified, since the block numbers which are generated are very dependent on the block size in use by the filesystem. For this reason, it is strongly recommended that users not run badblocks directly, but rather use the -c option of the e2fsck and mke2fs programs. – heynnema Dec 17 '19 at 21:36
  • @heynnema done Pass completed, 52 bad blocks found. (52/0/0 errors)

    That was the output from badblock check... That means my HD is ruinned? Thats chocking considering that the notebook went from dell assistance few weeks ago, and since then I did not use it... I just made a test...

    – Guilherme Alleoni Dec 17 '19 at 21:52
  • Yes, but your test did a read-only test, and bad blocks a normally found on a write cycle, which you didn't do. See my answer for the correct way to do a bad block... and I'll bet you find more bad blocks. Report back. – heynnema Dec 17 '19 at 21:54
  • status please... – heynnema Dec 18 '19 at 19:01

1 Answers1

0

    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 fdisk -l # identify all "Linux Filesystem" partitions

sudo e2fsck -fcky /dev/sdXX # read-only test

or

sudo e2fsck -fccky /dev/sdXX # non-destructive read/write test (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.
heynnema
  • 70,711
  • Ok, then! I'll try that! This could take a while but I'll keep you posted! Thanks! Now I just realize that I get the same error trying to install YUMI...I've gotta do that on windows... hahaha – Guilherme Alleoni Dec 18 '19 at 23:00
  • @GuilhermeAlleoni from Windows, do chkdsk /f c: and chkdsk /r c: from an admin console. – heynnema Dec 18 '19 at 23:20
  • I found out that somehow I lost Windows in this machine... Which were in dual boot with Ubuntu... It might take longer than I thought but i'm going through this!! Hhahaha I'll keep you posted!

    I didnt get this commands: from Windows, do chkdsk /f c: and chkdsk /r c:

    – Guilherme Alleoni Dec 19 '19 at 03:59
  • Show me a screenshot of gparted. – heynnema Dec 19 '19 at 04:28
  • I tried to boot Windows to check it's disk manager, but it forced me to run some kind of HDD check. Anyway I did lost windows (not a problem actually), and then I had to erase the disk completely and install Ubuntu again...

    Since I'm not quiet sure if there is some pending HDD failure, I think it's safer to check for Bad blocks anyway, isn't it?

    ps: I've edited the post with gtparted print

    – Guilherme Alleoni Dec 20 '19 at 22:01
  • @GuilhermeAlleoni yes, since there's no data on the drive now, go ahead and bad block the disk. Report back. – heynnema Dec 20 '19 at 22:02