Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have downloaded a .img file to use on my Android device.

I have to edit a file in the image in order to use it.

How can I mount the file so I can edit the text file and then re-pack the .img?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Did you try the standard o loop mount?

mount -o loop file.img /mnt/img

then edit and unmount normally

umount /mnt/img/

share|improve this answer
I have now, and I get 'mount: you must specify the filesystem type ' in return. –  Rasmus Dec 7 '11 at 15:38
@Rasmus: it is a partition or disk image? In the second case you need to use an appropriate offset in -o loop,offset=NUMBER. –  enzotib Dec 13 '11 at 8:14

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.