8

Can partition images like nandc.img uImage are file system, can this mounted directly in Linux? mount command? Data inside image file can be viewed?

Appreciated Thanks,

1

2 Answers 2

10

If it's a raw partition image like dd then mounting is simple, basically

# mount -t fstype -o loop,ro image.dd /mntpoint

The -t fstype may be optional, it'll be vfat or ext3 or whatever the partition is, sometimes mount can figure it out on it's own so try leaving it out first. And ro means read-only.

If it's a multi-partition disk image that's a little trickier, then use kpartx and it creates mappings for each partition which you then mount.

See http://www.forensicswiki.org/wiki/Mounting_Disk_Images for more info, examples, etc.

But, if you're referring to something like a Das U-Boot bootloader embedded system image, that might need tools like dd and the u-boot-tools package's mkimage to extract the filesystem (if there is one) and then mount it. It's rather involved, see this link for info: http://www.isysop.com/unpacking-and-repacking-u-boot-uimage-files/

2
mount -o ro,loop,offset=32256 nandc.img nandc
1
  • 1
    I suppose this snippet shows how one partition can be mounted when nandc.img is a disk image. The offset= part can be calculated with fdisk: if fdisk -l nandc.img says Units = ... = 512 bytes and Device=nandc.img1 / Start=126, the offset of first partition is then 126*512=32256.
    – Jokester
    Jan 18, 2016 at 7:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .