Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I create a file of size 10M, format it with ext3 filesystem and then mount it in /media/fuse?

I tried with

mkfs -t ext3 file

then to mount it

mount -t ext3 file /media/fuse

It didn't work because it said that file wasn't a block device. Can anybody help me?

share|improve this question
You just have to add -o loop to the mount command. – enzotib Dec 7 '11 at 19:54
A great tutorial here: – arrange Dec 7 '11 at 20:07
To loop-mount a ISO file, I do this mount -o loop file.iso /media/iso. – Anonymous Dec 7 '11 at 20:50
@enzotib Can you post that as an answer to be upvoted/accepted please? – Tom Brossman Feb 28 '12 at 18:17
@TomBrossman: done – enzotib Feb 28 '12 at 18:47

Your procedure is correct, but when mounting a file image as a filesystem you have to add the -o loop option to the mount command:

mount -t ext3 -o loop file /media/fuse

Also, the -t ext3 option is not strictly required, because mount can automatically determine the filesystem type.

share|improve this answer
he is right but forgot to add the way to create a file dd if=/dev/zero of=file bs=1024 count=10240 this is the way to create a 10Mb file... then you can format it with mkfs.ext3 – maniat1k Feb 28 '12 at 19:20
Now mount does not need the -o loop option anymore, it can understand by itself we it need it. – enzotib Oct 3 '13 at 12:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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