After a power failure, unable to mount the drive "Get a newer version of e2fsck"

63,089

Solution 1

I had the same problem and it took me some time to fix it, without formatting :)

Just follow this hint:

e2fsck: Get a newer version of e2fsck!

You need to download the latest version of e2fsck, compile it and then use this version.

Here are some steps to follow (use 1.43.1 or newer):

wget http://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v1.43.1/e2fsprogs-1.43.1.tar.gz
tar xzf e2fsprogs-1.43.1.tar.gz
cd e2fsprogs-1.43.1
./configure # <== if this step fail, check the config.log file, it could just be that you are missing the "libc6-dev" package on your system
make
cd e2fsck/
./e2fsck

Voila!

Solution 2

metadata_csum stands for “Metadata Checksums” which is available for Ext4 file systems since Linux 3.6 but isn't supported by the file system tools until v1.43:

Support for checksums is sitting in the e2fsprogs WIP tree, which implies that it might appear in e2fsprogs 1.43.

Since Ubuntu Bionic has e2fsprogs v1.44.1 you don't have to build it from source any longer. Instead, if you have Ubuntu Trusty or Xenial, you can download the Deb packages for e2fsprogs for your architecture and install them with:

arch=$(dpkg --print-architecture)
sudo dpkg -i {e2fslibs,lib{ext2fs2,ss2,com{,-}err2}}_*_$arch.deb
sudo dpkg -i e2fsprogs_*_$arch.deb
sudo dpkg --configure --pending

Unfortunately the packages cannot be installed with a single DPKG invocation since one pre-depends on the other and must be installed and configured before it.


Note for non-x86* architectures: For whatever reason the package repositories behind the links above only have binary packages for the i386 and the amd64 architectures. If you need them for a different architecture you can download them from Launchpad.

Share:
63,089

Related videos on Youtube

ubuntuuser
Author by

ubuntuuser

Updated on September 18, 2022

Comments

  • ubuntuuser
    ubuntuuser over 1 year

    I have a desktop computer with Ubuntu Desktop 14.04.4 LTS 64-bit with an attached HDD USB 3.0 4TB Intenso 1 partition ext4 data drive only (no OS or Apps). After a sudden power failure, I am unable to mount the drive (checked different host Linux machines with no result).

    error message:

    sudo mount /dev/sdd1 /mnt
    mount: wrong fs type, bad option, bad superblock on /dev/sdd1,
           missing codepage or helper program, or other error
           In some cases useful info is found in syslog - try
           dmesg | tail  or so
    

    Tried with fsck, e2fsck with no result. The error message says "Get a newer version of e2fsck".

    Tried with all available superblocks backups with no result.

    Tried offline file/drive Linux checkers on the offline and UNmounted volume with no result.

    Finally, I received the following error message for which I couldn't find any help online:

    "has unsupported feature(s): metadata_csum".
    e2fsck 1.42.9 (4-Feb-2014)
    /dev/sdd1 has unsupported feature(s): metadata_csum
    e2fsck: Get a newer version of e2fsck!
    

    Can anyone help me take my data back?

    • Rinzwind
      Rinzwind about 8 years
      did you check syslog? as the error states it sometimes has some good info. can you do a filesystem check?
    • ubuntuuser
      ubuntuuser about 8 years
      Thank you for your response. The syslogs entries showing only the error messages above. Additionally every time I tried to check the filesystem on the unmounted volume, the same error messages appeared. Tried both terminal commands and offline GUI linux-based tools all returned error message "... try dmesg ... or so".
    • Rinzwind
      Rinzwind about 8 years
      "/dev/sdd1 has unsupported feature(s): metadata_csum" seems the best info on the problem. Are you sure it is ext4? and not 3? This might be helpful: serverfault.com/a/82837/229730
    • ubuntuuser
      ubuntuuser about 8 years
      Thank you. I agree with you that main issue is the "metadata_csum" for which I have no knowledge on how to troubleshoot it. 100% sure about ext4. I personally formated with ext4 and gparted-information showing ext4 (1 partition) 15% in use, 10MB unpartitioned space.
    • ubuntuuser
      ubuntuuser about 8 years
      Run sudo mkfs.ext4 -S /dev/sdd1 and sudo fsck -yf /dev/sdd1. operations completed successfully. Now I can mount the drive but NOTHING shown on the mount point! Any help??
  • David Foerster
    David Foerster over 7 years
    It's possible to install a sufficiently recent e2fsprogs without compilation from source now. See my answer.
  • Max
    Max almost 7 years
    It's unclear how to download from this site.
  • Max
    Max almost 7 years
    Thanks, the problem was there is no package for armhf arch. All archs are shown but no files there for some of them.
  • Max
    Max almost 7 years
  • Max
    Max almost 7 years
    i.imgur.com/4B8YiDe.png I see mirrors for the amd64 image for example, but not for armhf. Can it be that there are no mirrors and the package is only available through the package managers?
  • Max
    Max almost 7 years
    Thank you, you could add this link to your answer for the next deb/iot guys.
  • David Foerster
    David Foerster almost 7 years
    Alright. I wouldn't call you idiotic. I'd call the fact idiotic that the package was built for armhf but isn't available in the package repositories.
  • Jo-Erlend Schinstad
    Jo-Erlend Schinstad over 6 years
    I'll just confirm that I just did this and it worked with problems. Just followed your commands.
  • David Foerster
    David Foerster over 6 years
    This is a case of outdated file system management utilities, not a broken file system. No need to resort to data recovery tools. -1
  • Wizard79
    Wizard79 over 6 years
    This one actually worked on Ubuntu 14.04 (I had no success with the answer by @DavidFoerster)
  • David Foerster
    David Foerster over 6 years
    @Wizard79: At which point did my answer fail? Was it the package download? I updated the links to point to Artful now since Zesty is now EOL and removed from most package mirrors.
  • Rochdi Boudjehem
    Rochdi Boudjehem about 6 years
    If someone wants to use to use this e2fsck version as a default fsck, he needs to overwrite the /sbin/e2fsck after making a backup of course.
  • will
    will over 5 years
    This question is quite dated. Yet, I have the exact same issue with Ubuntu 18.04 (not 14... 4 years later).
  • David Foerster
    David Foerster over 5 years
    @will: Could you please open a new question if you have a new or follow-up question? The comment section is not suitable or meant for new questions or extended discussion. You’re welcome to send me a comment with a notification to draw my attention to it. Thanks.
  • will
    will over 5 years
    @DavidFoerster ... Thanks, my issue is on 16.04. When I took the drive to a fresh 18.04 system the set label works OK-dokey.
  • Quidam
    Quidam almost 4 years
    When I saw this message, I tried to get the newer version, as the message said. But it was impossible. Impossible through synaptics, that shows no newer versions, and impossible through the ppa, that gives errors. This solution with "make" seems to work, as it gives me an output in the console with the command e2fsck. But I typed "./e2fsck -p" and it doesn't work. Probably not the good syntax?
  • Quidam
    Quidam almost 4 years
    @RochdiBoudjehem Can you explain the steps please? (for instance editing this answer to add them).
  • Quidam
    Quidam almost 4 years
    Gparted still shows the error about e2fsk. It doesn't let me resize my partition because of that.
  • Rochdi Boudjehem
    Rochdi Boudjehem almost 4 years
    After downloading and making the file, running the file locally worked for me very well, so each time I need to run the e2fsck I can go to the folder and run ./e2fsck, but still for the system when it want to run the e2fsck, it runs the version in the sbin folder. So you can do this : cd /sbin/ then sudo cp e2fsck e2fsck.bak, just in case, then copy the new file sudo cp ~/e2fsprogs-1.43.1/e2fsck/e2fsck /sbin/, of course it depends where you downloaded and made your new file.
  • brunoais
    brunoais over 2 years
    I can't read-only file system
  • David Foerster
    David Foerster over 2 years
    @brunoais: I’m not sure what that is supposed to mean or what you want. If you have a new or follow-up could you please open a new question question? The comment section is not suited or meant for new questions or extended discussion. You’re welcome to send me a comment with a notification to draw my attention to it. Thanks.
  • brunoais
    brunoais over 2 years
    Sorry. I just mean that I can't perform your method because I was stuck with a read-only file system. However, I was able to overcome that by mounting a tmpfs and using Max's solution