5

Recently, after a sudden power failure, my 1tb hard drive (/dev/sda1) failed and will not mount. It says, Error mounting /dev/sda1 at /media/zangar_/4b84d62b-520d-408e-addc-7a2bf52cc4e3: Command-line ``mount -t "ext4" -o "uhelper=udisks2,nodev,nosuid" "/dev/sda1" "/media/zangar_/4b84d62b-520d-408e-addc-7a2bf52cc4e3"' exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error

   `In some cases useful info is found in syslog - try
   dmesg | tail or so.`

I tried e2fsck but it asks me to Get a newer version of e2fsck! Then, I looked at all the other posts about updating e2fsck (here and here.) These answers did not work for me. My problem!

Any help is greatly appreciated, as i have time sensitive documents in the unmountable drive.

Zangar
  • 140

2 Answers2

10

Using a live CD/DVD/USB seems like a workaround that may not be always applicable.

I believe that the correct answer how to have e2fsck updated is to compile latest version from the sources.

  1. Download the latest version (1.44.3) from http://e2fsprogs.sourceforge.net/ and unpack in a directory and cd into it.

  2. According to the INSTALL document:

     mkdir build; cd build
     ../configure
     make
     sudo make install
    
  3. Check that you have new version now:

     $ e2fsck -V
     e2fsck 1.44.3 (10-July-2018)
     Using EXT2FS Library version 1.44.3, 10-July-2018
    

Note: you may need to install compiler and tools with apt get install gcc.

UPDATE 09/2020: Above link is official ext2fs informational microsite (non https protected), lastest sources are securely hosted on https://sourceforge.net/projects/e2fsprogs/. BTW author announced: "All users of e2fsprogs are urged to upgrade to the 1.45.6 version as soon as possible".

VasekCh
  • 221
  • 1
    While this may be an excellent answer otherwise, please note that the SourceForge link to the latest version uses the insecure HTTP protocol and as far as I am concerned it would be highly advisable to replace it with a more secure option (replacing the protocol part of the url doesn't work unfortunately). Partly flagging this up as I'm just humbly looking for the solution while you might have a slightly better looking link at hand :) – brezniczky Sep 23 '20 at 02:55
  • 2
    Thanks @brezniczky for comment, I've added an update to the answer – VasekCh Sep 24 '20 at 21:38
  • Thank you @VasekCh! – brezniczky Sep 25 '20 at 22:03
5

Boot to a Ubuntu Live DVD/USB 16.10 (prefer DVD). It must be 16.10 or higher.

Open a terminal and type sudo fsck -f /dev/sda1.

Now you may be able to mount the drive as normal.

heynnema
  • 70,711