How Error: mount: unknown filesystem type ‘ext4’ came up

Debian Distro LogoAfter a power cycle I couldn’t remount my Truecrypt drives on my Debian server. I stopped the server in a clean manner and I hadn’t done any upgrade. I use a script to mount them so I knew I wasn’t using a different command line… Only the password could have been erroneous as I’m not saving it in the script.

Finding the root cause

I searched for the error message Error: mount: unknown filesystem type 'ext4' and I got a list of reasons why I would have an issue on Lenny or lower than kernel 2.6.28 but I use 2.6.32 where ext4 is supported as standard. There are so many articles explaining how to use ext4dev on earlier kernels that it was hiding any potential solution to my problem on a recent kernel.

[email protected]:~# uname -a
Linux bob 2.6.32-5-686 #1 SMP Mon Sep 23 23:00:18 UTC 2013 i686 GNU/Linux

I first tried to understand if my Truecrypt drives were damaged but ext4 was really the one causing the less issues by using alternative mounting parameters… Still not mounting.

TrueCrypt Logo

I then came across Kernel Newbies explaining about a necessary filesystem check after doing the conversion from ext3 to ext4:

After running this command you MUST run fsck. If you don’t do it, Ext4 WILL NOT MOUNT your filesystem. This fsck run is needed to return the filesystem to a consistent state.

Then the penny dropped. Maybe I had an issue preventing me from mounting ext4 altogether and not linked to my Truecrypt drives.

So I forced a fsck at next reboot… and rebooted. As root:

[email protected]:~# touch /forcefsck
[email protected]:~# reboot

After a few minutes, I was back online with SSH and my Truecrypt drives mounted without that Error: mount: unknown filesystem type 'ext4'.

Conclusion

Yes! Now my files are back up, I can look at that Exim4 error.

Reference

  1. Mounting Truecrypt drive specifying a filesystem
  2. Linux Force fsck on the Next Reboot or Boot Sequence
  3. Kernelnewbies – 3.2 Migrate existing Ext3 filesystems to Ext4