7

Disclaimer

This post has been marked as a duplicate of this post. It should be noted that @DavidFoerster has update his code to a functional solution - but you must be careful to download the right packages.

The purpose of this post is to explain why his code works. This entry is not a duplicate since it is an attempt to help anyone who is new to linux and is facing the 'metadata_csum' error which is likely due to e2fsck version incompatibilities.

Background

Ubuntu has used e2fsck package 1.42.X for version 14.04 and 16.04. For version 18.04 the e2fsck package has been updated to 1.44.X. This creates a problem when using a ubuntu 16.04 system to apply e2fsck utilities on a HDD that had its filesystem configured on a ubuntu 18.04 system.

If GParted on the ubuntu 16.04 system is used to work on the ubuntu 18.04 HDD, GParted will generate errors since it is relying on the 16.04 default system e2fsck 1.42.X utilities.

The objective of this post is to show how to advance the e2fsck utilities to a higher version so that hard drives removed from a system running a new release of the ubuntu operating system (18.04) can be serviced in an older ubuntu system (16.04). This is usually done when the hard drive is experiencing problems and needs administrative repair.

Note that the live CD version of GParted contains the most up-to-date version of the e2fsck package, however the use of a bootable USB device may not be practical when doing administrative repair work.

What Works

When using ubuntu 16.04 and servicing a HDD from a ubuntu 18.04 system, it is possible to get around the e2fsck "metadata_csum" error that will arise in GParted and command line. The solution is to not advance the e2fsprogs and e2fslibs too far. Ubuntu 18.04 is using e2fsprogs and e2fslibs 1.44.X. The reason that you can't upgrade the default ubuntu 16.04 packages (e2fsprogs 1.42.X and e2fslibs 1.42.X) all the way to the 1.44.X packages is because the 1.44.X packages have additional dependencies that do not exist in the 1.43.X packages.

In other words update e2fsprogs and e2fslibs to 1.43.X - do not go all the way up to 1.44.X.
The 1.43.X packages are sufficient to remove the "metadata_csum" error and allow you to use GParted or e2fsck at the command line in order to service your ubuntu 18.04 HDDs byway of your ubuntu 16.04 system.

Detailed Explanation

e2fslibs_1.44.1-1_amd64.deb
==> this packages requires libext2fs2
==> attempting to install libext2fs2 will break e2fslibs:amd64
==> libext2fs2 breaks e2fslibs (<< 1.43.9-1~) deconfiguration is not permitted
==> e2fslibs:amd64 (version 1.42.13-1ubuntu1) is present and installed.

e2fsprogs_1.44.1-1_amd64.deb
==> this package requires libcomm-err2
==> libcomerr2 (1.42.X) is the default installed in ubuntu 16.04 and is not the same as libcom-err2 (ubuntu 18.04)

Procedure

1) Get the 1.43.X packages: Either from Debian's pool or Ubuntu pool (search the listing for e2fslibs_1.43 and download the file corresponding to your architecture, then repeat, searching for e2fsprogs_1.43)

2) Switch to and check the download directory:

you@computer:~/Downloads$ ls -l
-rw-rw-r-- 1  155908 Jul 29 17:38 e2fslibs_1.43.5-1_amd64.deb
-rw-rw-r-- 1  496598 Jul 29 17:38 e2fsprogs_1.43.5-1_amd64.deb

3) Install the 1.43.X packages (@David Foerester code):

you@computer:~/Downloads$  for f in e2fs{libs,progs}_*_$(dpkg --print-architecture).deb; do sudo dpkg -i "$f"; done

4) Check your installed version:

you@computer:~/Downloads$ e2fsck -V
e2fsck 1.43.5 (04-Aug-2017)
Using EXT2FS Library version 1.43.5, 04-Aug-2017

5) Open a ext4 HDD partition from a ubuntu 18.04 system using GParted and hopefully there will be no "metadata_csum" error:

you@computer:~$ sudo gparted /dev/sdb5

Original Post
@DavidFoerster: I would be very grateful if you could verify the command you provided in this post: https://askubuntu.com/a/868737/847890

Here is the output from my Ubuntu 16.04 system when I downloaded the files that you linked and executed your code.


u16@u16:~/Downloads$ ls -l
total 644
-rw-rw-r-- 1 u16 u16 155908 Jul  8 22:17 e2fslibs_1.43.5-1_amd64.deb
-rw-rw-r-- 1 u16 u16 496598 Jul  8 22:16 e2fsprogs_1.43.5-1_amd64.deb

u16@u16:~/Downloads$ sudo dpkg -i e2fs{libs,progs}_*_$(dpkg --print-architecture).deb
[sudo] password for u16:

(Reading database ... 254722 files and directories currently installed.)
Preparing to unpack e2fslibs_1.43.5-1_amd64.deb ...
De-configuring e2fslibs:i386 (1.42.13-1ubuntu1) ...
Unpacking e2fslibs:amd64 (1.43.5-1) over (1.42.13-1ubuntu1) ...
dpkg: regarding e2fsprogs_1.43.5-1_amd64.deb containing e2fsprogs, pre-dependency problem:
e2fsprogs:i386 pre-depends on e2fslibs (= 1.43.5-1)
e2fslibs:amd64 latest configured version is 1.42.13-1ubuntu1.

dpkg: error processing archive e2fsprogs_1.43.5-1_amd64.deb (--install):
pre-dependency problem - not installing e2fsprogs
dpkg: error processing package e2fslibs:amd64 (--install):
package e2fslibs:amd64 1.43.5-1 cannot be configured because e2fslibs:i386 is at a different version (1.42.13-1ubuntu1)
dpkg: error processing package e2fslibs:i386 (--install):
package e2fslibs:i386 1.42.13-1ubuntu1 cannot be configured because e2fslibs:amd64 is at a different version (1.43.5-1)
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
e2fsprogs_1.43.5-1_amd64.deb
e2fslibs:amd64
e2fslibs:i386

u16@u16:~/Downloads$ e2fsck -V
e2fsck 1.42.13 (17-May-2015)
Using EXT2FS Library version 1.42.13, 17-May-2015

When I attempted to deal with the dependency I created a lot of broken packages. Any help getting this fixed is appreciated.

6
  • It seems that you have both x64 (amd64 - 64 bit) and x86 (i386 - 32 bit) binaries installed, and that leads to dependency conflicts. If you don't need them, try to uninstall e2fslibis86 - and other related i386 packages.
    – Soren A
    Commented Jul 9, 2018 at 8:17
  • P.S.: User notifications don't work in questions or answer posts, only in comments to posts in which the notified user participated (author, commenter or editor) which you can't leave under arbitrary posts until you have 15 reputation unfortunately. Commented Jul 9, 2018 at 9:21
  • 1
    The links to the e2fs .debs are broken, I used this link instead ftp.fau.de/ubuntu/ubuntu/pool/main/e/e2fsprogs
    – user886869
    Commented Apr 4, 2019 at 14:07
  • @user886869 sadly it looks like 1.43 has been purged from there too, now :(
    – Doktor J
    Commented Jul 9, 2019 at 18:56
  • 1
    Debian still seems to host them at ftp.debian.org/debian/pool/main/e/e2fsprogs (search listing for e2fslibs_1.43.4 and e2fsprogs_1.43.4, and download the corresponding files appropriate for your architecture (probably amd64).
    – Doktor J
    Commented Jul 9, 2019 at 18:59

0

Browse other questions tagged .