[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] qemu dd sizes
From: |
Kyle Hayes |
Subject: |
Re: [Qemu-devel] qemu dd sizes |
Date: |
Fri, 24 Sep 2004 21:21:36 -0700 |
User-agent: |
KMail/1.5.4 |
On Friday 24 September 2004 19:15, jmf wrote:
> When using dd to create a disk image to boot through qemu, does the
> block size really matter, or can I omit that parameter? If the size of
> the original disk is 20 gb but there is only 2 gb of data on the disk,
> how can I make the image size smaller?
It is a little unclear what you are asking here. dd uses the block size
and a count in order to determine how much to copy. If you are making a
file with holes in it, you can use a block size, offset and then set
count=0. If you omit the count and block size, it will use the default
block size (512 bytes I think) and will simply copy until either the
source runs out of data or the destination runs out of space.
If there is 2GB, it depends what the original filesystem was. Ext2/3
(under Linux) puts data all over the disk in a sparse manner. So, just
copying the first 2GB would not get all the data. If it is a Windows
partition and you are using VFAT, then running the defragmenter program
will push all the data to one end of the disk (beginning?). With NTFS,
I'm not sure what happens.
You could try to resize the 20GB partition down to 2.5GB and then copy that
with dd. What kind of filesystem is it?
Best,
Kyle