$ file data   

Linux rev 1.0 ext4 filesystem data, UUID=9f923f9d-2cbd-4a49-8b5c-6a3cece42509 (extents) (64bit) (large files) (huge files)

$ mount -t ext4 data /mnt/
mount: wrong fs type, bad option, bad superblock on /dev/loop2,
   missing codepage or helper program, or other error

   In some cases useful info is found in syslog - try
   dmesg | tail or so.
  • What are the messages in dmesg or /var/log/syslog when you attempt the mount? And do you know how the file data was created? Could it contain an entire disk, with separate partitions?
    – Xen2050
    Nov 3, 2015 at 2:19
  • I think this is a Docker volume. Still not sure how to access it (outside of Docker) though. Mar 24, 2017 at 22:55

2 Answers 2


You cannot directly access the file (which is not a block device), you need to use a loop block device.

Assuming your kernel has loop device support,

losetup /dev/loop0 /path/to/data

mount /dev/loop0 /mnt

or directly

mount -o loop /path/to/data /mnt
  • 1
    From Sato's error "bad superblock on /dev/loop2" it sounds like mount might already be automatically using a loop device, but regardless your answer could only help
    – Xen2050
    Nov 3, 2015 at 2:19
  • You're right. I had not seen the "loop2". Possibly he was then mounting it to an improperly configured loop device.
    – LSerni
    Nov 3, 2015 at 14:08

Definitely see dmesg or /var/log/syslog for more details on the error.

In case it was a problem with the filesystem itself, you may need to fsck it with fsck.ext4, these options should work (verbose, force check, preen or automatically repair). And assuming you've set up a loop device for the file like in lserni's answer with losetup /dev/loop8 /path/to/data )

fsck.ext4 -vfp /dev/loop8

And after it's fixed, try the mount again

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.