[kwlug-disc] Converting a running Linux box to a Virtual Machine
Chris Frey
cdfrey at foursquare.net
Sat May 15 01:48:27 EDT 2010
On Sat, May 15, 2010 at 01:39:20AM -0400, William Park 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
> >
> > # top up the resulting file
> > dd if=/dev/zero of=finaldisk.img count=1 seek=40000000000 bs=1
>
> Hi Chris,
>
> I don't understand this last 'dd'. Why are you writing 1 byte at the
> end?
It's probably a bit over-precaution, but since the original disk.img was
40000000001 bytes when fdisk ran it, I want it to stay that size when
I feed it to qemu. And after the cp, the result was not 40000000001,
but something less.
- Chris
More information about the kwlug-disc
mailing list