home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] how to mount a filesystem *inside* an SD card image?

>  if i have a byte-for-byte image file for the SD card, is it possible
> to mount one of those internal filesystems?  i'm well aware of the "-o
> loop" option for mounting image files, but now i want to mount a
> filesystem that's *inside* such an image file, so i can make changes
> to it.
>
>  can i do this?  am i missing something stupidly obvious?
>

You can get the offset of the partition you want access to by running:

parted sd_card.img

Once you know the start offset of the partition you want, you can use
mount with the offset option:

mount -t ext3 -o loop,offset=your_start_offset sd_card.img /mnt/mountpoint

If this method doesn't work for whatever reason, there are other ways
listed here: http://www.andremiller.net/content/mounting-hard-disk-image-including-partitions-using-linux

Good Luck,
Jeremy Carter

Linux+/LPIC-1 Certified Linux Administrator
Algonquin College Certified UNIX Administrator
jeremycarter.ca