can't mount ext4 .img file

Asked by Shanejennings2

I am wanting to mount a img that is ext4 file system, and this is what happens...

 sudo mount -o loop system.img.ext4 /mnt/system
mount: you must specify the filesystem type

so then i try this...

sudo mount -t system.img.ext4 /mnt/system
mount: wrong fs type, bad option, bad superblock on /dev/loop1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail or so

i know my kernel supports ext4, so why doesn't mount work?

Question information

Language:
English Edit question
Status:
Answered
For:
Wubi Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
bcbc (bcbc) said :
#1

Assuming the file you are trying to mount is "system.img.ext4" and the mountpoint is "/mnt/system" then the command is as you have it: "sudo mount -o loop system.img.ext4 /mnt/system"

If you have to specify the filesystem type then it means that there is a problem with the filesystem:
e.g you could specify
sudo mount -o loop -t ext4 system.img.ext4 /mnt/system
but it's unlikely to make a difference as mount will automatically detect the ext4 filesystem if it is okay.

Instead, try running fsck on the file and it should tell you if there is a valid ext4 filesystem present:
fsck.ext4 system.img.ext4

Can you help with this problem?

Provide an answer of your own, or ask Shanejennings2 for more information if necessary.

To post a message you must log in.