Brook Milligan <[email protected]> writes:

> I find that vnconfig is really useful for building disk images for
> embedded or Xen systems.  However, in some cases the image file must
> contain information (e.g., boot sectors) in addition to the
> filesystem.  It is, of course, possible to extract portions with dd to
> a new file, expose that file as a disk via vnconfig, and then reinsert
> the file back into the original image with dd.  However, it would make
> much more sense (I believe) to be able to use vnconfig with options to
> specify the offset and size of the file subset to treat as a disk
> image.  For example, I'm thinking of something like the following
>
>       vnconfig -c -o 8192 -s 114688 vnd0 bootdisk.img

My reaction is that vnconfig is for making a file look like a disk, and
that the problem you are having with addressing part of the disk is a
disk problem, not a file problem.  So the solution to it should apply
equally to a vnd as to a physcial disk.  Consider what you would do if
you had attached a physical disk to your system to prepare instead.

For vm images, I tend to use bare disklabel and not fdisk, and thus can
address the partitions using vnd0a, vnd0e, etc.

Attachment: pgp89wZ3NCdVY.pgp
Description: PGP signature

Reply via email to