open image file
Zoltan Gyarmati
mr.zoltan.gyarmati at gmail.com
Mon Feb 4 09:24:26 EST 2013
On 02/04/2013 03:03 PM, Greg Freemyer wrote:
>
> 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
>
Indeed!
I was not accurate enough, thx for the comment.
--
br,
Zoltan Gyarmati
mail: mr.zoltan.gyarmati at gmail.com
freenode nick: zgyarmati
More information about the Kernelnewbies
mailing list