open image file

Greg Freemyer greg.freemyer at gmail.com
Mon Feb 4 09:03:47 EST 2013



Zoltan Gyarmati <mr.zoltan.gyarmati at gmail.com> wrote:


>Hi,
>
>in case of image with multiple partitions, easier to use kpartx, then 
>get the offsets with parted:
>http://ppadala.net/blog/2010/09/kpartx-to-mount-vm-disk-images/
>
>of course with image with one partition, it doesn't matter

I think you meant an image of a drive with no partitions:

Ie.
 mkfs /dev/sdb. Create a filesystem on the entire disk, there is no offset and no partitions (the entire disk is the filesystem, no mbr or gpt).

 mkfs /dev/sdb1.  Create a filesystem on the first partition, there is an offset even if it is the only partition.  You examine the mbr or gpt to determine the offset.

Or possibly you meant an image of a partition:

dd if=/dev/sdb1 of=image_file.  Create the image of a partition, no offset needed for loopback mount.

Greg

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.



More information about the Kernelnewbies mailing list