resize an image
Hello,
I did create some time ago an 2GB image via dd. Now I have to realize that I on ly ndeed 1,1 GB is there a way to shrink the sizes of my image?
Thanks a lot
Michael
Quoted 9 lines · On Fri, Aug 12, 2005 at 08:56:24AM +0200, [email protected] wrote:
Hello,
I did create some time ago an 2GB image via dd. Now I have to realize that I on ly ndeed 1,1 GB is there a way to shrink the sizes of my image?
Thanks a lot
Michael
This is unusual. Most people ask if they can enlarge them.
The easy way, if you are using raw format, is just to use dd to make the smaller sized file and then fix the partition table. A defrag might be helpful.
The hard way is to make a new blank disk image of the right size, and then to create the partition table and file systems in the new disk image, and then copy everything over.
Signature · 2 lines
Infinite complexity begets infinite beauty. Infinite precision begets infinite perfection.
Quoted 7 lines · Jim C. Brown
Quoted 6 lines · On Fri, Aug 12, 2005 at 08:56:24AM +0200, [email protected] wrote:
Hello,
I did create some time ago an 2GB image via dd. Now I have to realize that I on ly ndeed 1,1 GB is there a way to shrink the sizes of my image?
Quoted 8 lines
Quoted 2 lines
Thanks a lot
MichaelThis is unusual. Most people ask if they can enlarge them.
The easy way, if you are using raw format, is just to use dd to make the smaller sized file and then fix the partition table. A defrag might be helpful.
Probably a good idea to shrink the partition _before_ you shrink the image and discard all the data in that half of the disk :-)
Quoted 3 lines
The hard way is to make a new blank disk image of the right size, and then to create the partition table and file systems in the new disk image, and then copy everything over.
I'd argue this is actually the easy way. It's certainly much safer than trying to resize partitions in place. You can pass both images to qemu (using -hdb), use conventional migration tools within the guest, then just switch the images.
Paul