I am trying to mount a file image, like this

mount -o loop /tmp/apps.img /media/apps

But I get the following:

mount: you must specify the filesystem type

I try ext3:

mount -o loop /tmp/apps.img /media/apps -t ext3

dmesg says:

error: can't find ext3 filesystem on dev loop6.

I've also tried ext2, vfat etc. How can I detect the filesystem type of apps.img?

link|improve this question
Could you try mount -o loop /tmp/apps.img /media/apps -t auto or does auto not work for filesystem images? – Mokubai Mar 11 '11 at 13:39
Is the image an image of a partition or an entire disk? – Majenko Mar 11 '11 at 13:55
@Matt: I don't know, this is linux embeded device firmware files, like : 100AEO6C0-1001H-apps.img, 100AEO6C0-1001H-loader.img, 100AEO6C0-1001H-rootfs1.img, 100AEO6C0-1001H-splash.img, 100AEO6C0-1001H-kernel.img – halorty Mar 16 '11 at 12:07
@Mokubai , I tried, It doesn't work. – halorty Mar 16 '11 at 12:08
feedback

2 Answers

I would use the file command combined with dd.

Full disk with MBR (change file.img to your file name):

$ dd if=file.img | file -
/dev/stdin: x86 boot sector; partition 1: ID=0x7, [.........snip.........]

So it is a full disk image and you want info on the first partition?

$ seq 100 | while read i ; do dd if=file.img bs=512 skip=$i | file - ; done | grep -v '/dev/stdin: data'
....garbage lines with perhaps useful informations,
if it's the case, give more info here.....

Perhaps it is compressed.

$ dd if=file.img | file -
/dev/stdin: gzip compressed data, from Unix, last modified: Wed Feb 23 19:26:14 2011

No problem, uncompress it on the fly:

$ dd if=file.img | gunzip | file -
/dev/stdin: ASCII cpio archive (SVR4 with no CRC)
link|improve this answer
I try $ dd if=file.img | file - output is: /dev/stdin: data – halorty Mar 16 '11 at 6:29
/dev/stdin: SysEx File - /dev/stdin: SysEx File - /dev/stdin: DOS executable (COM) /dev/stdin: DBase 3 data file /dev/stdin: DBase 3 data file with memo(s) /dev/stdin: MPEG-4 LOAS, 4 or more streams, 8 or more streams /dev/stdin: DBase 3 data file with memo(s) – halorty Mar 16 '11 at 12:02
@halorty: mostly unusable garbage... let's try dd if=file.img | strings | head -20 and see if there are readable things. – shellholic Mar 16 '11 at 14:10
I try, output : Linux-2.6.17.14_stm22_0041-STB10, 1.00(AEO.6), kernel and messy strings. – halorty Mar 17 '11 at 7:01
feedback

blkid -o value -s TYPE /tmp/apps.img

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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