Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I downloaded an raw SD card image that has two partitions.

It caused some file system errors when I tried to dd it directly into an SD card. I am not sure if the card is defective or the image.

Is there a way to examine this image without writing it to a physical card? Like trying to mount the partitions separately or checking the tables?

share|improve this question
up vote 2 down vote accepted
sudo kpartx -v -a file.iso
mount /dev/mapper/loop0p1 ./mnt_point
share|improve this answer

This answer on ServerFault suggests:

use losetup to get a /dev/loop? device, then use kpartx on it to create dev mappings for the partitions in the image file.

share|improve this answer

You could try:

mount -t type -o loop ./image /mnt

where "type" = fs type and "image" is the name of your downloaded file

share|improve this answer
Thinking about it, that may not work with an image containing multiple partitions. – Tog Nov 16 '10 at 9:53
you'll have to specify the offset of the single partition to mount with something like "mount -o loop,ro,offset=XXXXXXXX imagefile /mnt" – Mr Shunz Nov 16 '10 at 10:02
Wouldn't losetup work to specify an offset? – Tog Nov 16 '10 at 11:47
you're right... with losetup you can set an offset to the partition to create a loopback device that can be simply mounted with mount /dev/loopX /mnt – Mr Shunz Nov 18 '10 at 11:55

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.