Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: vnconfig for part of a file



On Sun, Apr 12, 2015 at 09:21:45AM -0600, Brook Milligan wrote:
> 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
> 
> as a means to create a virtual disk for the subset of the file bootdisk.img that contains only 114688 sectors beginning at sector 8192.  I feel that this would greatly simplify the task of building disk images for a variety of systems.
> 
> Does this make sense?  Would this be hard to do?  Does anyone have the knowledge (or bandwidth) to do this?

Doesn't this image also contains some kind of partition table ?
I think it would make more sense to use the appropriate partition
from the vnd (eventually adding support to the kernel or using a tool
like mbrlabel)

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index