23

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?

Quidam
  • 141
  • 13
ubuntuuser
  • 231
  • 1
  • 2
  • 4
  • did you check syslog? as the error states it sometimes has some good info. can you do a filesystem check? – Rinzwind Mar 18 '16 at 23:44
  • 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". – ubuntuuser Mar 18 '16 at 23:48
  • "/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: http://serverfault.com/a/82837/229730 – Rinzwind Mar 18 '16 at 23:51
  • 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 Mar 18 '16 at 23:56
  • 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?? – ubuntuuser Mar 19 '16 at 04:44

3 Answers3

26

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!

David Foerster
  • 36,264
  • 56
  • 94
  • 147
Max
  • 371
  • 4
  • 7
  • 1
    It's possible to install a sufficiently recent e2fsprogs without compilation from source now. See my answer. – David Foerster Jan 06 '17 at 14:45
  • I'll just confirm that I just did this and it worked with problems. Just followed your commands. – Jo-Erlend Schinstad Sep 02 '17 at 03:06
  • This one actually worked on Ubuntu 14.04 (I had no success with the answer by @DavidFoerster) – Wizard79 Feb 09 '18 at 13:09
  • @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. – David Foerster Feb 09 '18 at 13:18
  • 2
    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. – Rochdi Boudjehem Mar 31 '18 at 01:53
  • 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 Jun 10 '20 at 04:37
  • @RochdiBoudjehem Can you explain the steps please? (for instance editing this answer to add them). – Quidam Jun 10 '20 at 04:37
  • Gparted still shows the error about e2fsk. It doesn't let me resize my partition because of that. – Quidam Jun 10 '20 at 04:39
  • 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. – Rochdi Boudjehem Jun 11 '20 at 14:12
15

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.

David Foerster
  • 36,264
  • 56
  • 94
  • 147
  • It's unclear how to download from this site. – Max May 27 '17 at 15:09
  • Thanks, the problem was there is no package for armhf arch. All archs are shown but no files there for some of them. – Max May 28 '17 at 19:41
  • https://packages.ubuntu.com/yakkety/armhf/e2fsprogs/download – Max May 29 '17 at 05:48
  • https://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 May 29 '17 at 10:07
  • Thank you, you could add this link to your answer for the next deb/iot guys. – Max May 29 '17 at 14:03
  • 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. – David Foerster May 29 '17 at 17:55
  • This question is quite dated. Yet, I have the exact same issue with Ubuntu 18.04 (not 14... 4 years later). – will Oct 04 '18 at 14:24
  • @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. – David Foerster Oct 05 '18 at 07:40
  • @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. – will Oct 05 '18 at 13:27
  • I can't read-only file system – brunoais Aug 19 '21 at 07:10
  • @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. – David Foerster Aug 20 '21 at 20:25
  • 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 – brunoais Aug 21 '21 at 07:27
-1

You can compile source code and install latest version of e2fsck.

Clone repository that contains e2fsck source code.

git clone https://github.com/tytso/e2fsprogs.git

Make sure that you have necessary tools install to compile source code.

sudo apt install build-essential 

Create directory for build.

cd e2fsprogs && mkdir build && cd build

Compile source code and install latest e2fsck.

../configure && make && cd e2fsck && sudo make install
KK Patel
  • 19,083
  • 3
    This is a case of outdated file system management utilities, not a broken file system. No need to resort to data recovery tools. -1 – David Foerster Sep 03 '17 at 17:15