2012-04-10

ext2fs_check_if_mount: No such file or directory

My mke2fs suddenly started to print this error:

ext2fs 1.40.2 (12-Jul-2007)
ext2fs_check_if_mount: No such file or directory while determining whether /dev/sda1 is mounted.

(It's a very old binary, see, it's not mke2fs that broke.)

This and similar sounding error messages can have various causes. In my case, it was a missing /etc/mtab.

I fixed it with

    ln -s /proc/mounts /etc/mtab