[kwlug-disc] Converting a running Linux box to a Virtual Machine

Chris Frey cdfrey at foursquare.net
Sat May 15 14:03:12 EDT 2010


On Sat, May 15, 2010 at 01:08:56PM -0400, Khalid Baheyeldin wrote:
> > 9) Insert filesystem into a single disk
> >
> >        # this will take a while, but preserves sparseness
> >        cp --sparse=always <(head -c 32256 disk.img ; cat fs.img)
> > finaldisk.img
> >
> 
> Where did the number 32256 come from?

It is the first sector, since partitions begin at sector offset 63,
so 63 * 512 = 32256 bytes.

The plain number was documented in examples on QEMU wiki pages,
and it took me a little while to figure out what it meant too. :-)

- Chris





More information about the kwlug-disc mailing list