From: Daniel R. S. <dan...@ya...> - 2004-04-16 18:59:29
|
If your file is not sparse, you can try my mkSparse.exe executable to turn it into a sparse file. How much space you actually save will depend on how much of your disk image is composed of 64K or larger blocks of zero data. You can find the tools at: http://www.geocities.com/dan_slater/colinux/file-utils.tgz ( sources ) http://www.geocities.com/dan_slater/colinux/file-utils-cygwin-bin.tgz (cygwin binaries) http://www.geocities.com/dan_slater/colinux/file-utils-mingw-bin.tgz ( MinGW binaries). Another option you have is to create another disk image file of the size you want, add a new line to your xml file to mount it. Boot your colinux, use mkfs to create a file system on it, then use dump/restore to transfer tour existing root drive to the new image. To do this use this command from your root directory: dump -0f - / | (cd /mnt/tmp ; restore rf -) This is assuming you have mounted your new disk image on /mnt/tmp. You will probably have to use apt-get to get the dump/restore programs. Hope this helps Dan -----Original Message----- From: col...@li... [mailto:col...@li...] On Behalf Of ch...@to... Sent: Friday, April 16, 2004 1:00 PM To: Mathias Walter Cc: col...@li... Subject: Re: [coLinux-devel] Mounting Partitions > BTW: Is there a way to shrink an root image, because I don't need two GB > for the CoLinux root system? > > -- > Regards, > Mathias If you are using a sparce file image it probably dosn't really take up the 2 gig in windows. Sparce files do not store zero's. if not I don't know if there are any tools capable of doing this. resize2fs is capable of shrinking the filesystem size within the image. But I have no idea of how you would truncate the space allocated to the file. I have written a gui wrapper for resize2fs.exe, e2fsck.exe and mke2fs.exe that can expand an image And would like to know how to shrink it as well so I can add this ability to the tool. If anyone has any ideas of how to write such a program let me know. chris > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > coLinux-devel mailing list > coL...@li... > https://lists.sourceforge.net/lists/listinfo/colinux-devel > ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ coLinux-devel mailing list coL...@li... https://lists.sourceforge.net/lists/listinfo/colinux-devel |