On 2008/9/30, Mark David Dumlao <[EMAIL PROTECTED]> wrote: > Er, I was talking about fatresize, an actual tool for doing > that.
I was already using fatresize, but I thought it wasn't working. From your explanation however, it now seems FAT just works differently from ext2. When I use resize2fs the ext2 file shrinks, as shown by the "du" command. But when I use "fatresize -s # file.img", the program just exits quietly. However I have now tested by passing it a ridiculous value: /usr/sbin/fatresize -s 1Mi test.img fatresize 1.0.2 (08/11/08) Error: Unable to satisfy all constraints on the partition. Conclusion: something different is happening when I use the correct resize value. > If you're shrinking a partition, just reverse the order: shrink > the FAT filesystem, then truncate the file from the end. I > would > probably go this way > 1) fatresize filesystem (still haven't checked the syntax) to, > say 100M > 2) split -b 100M filename filename. > 3) test mounting filename.a as loopback > - if it works delete filename.b > - try using split with a larger size on your original file Yes, the loop mount shows the filesystem shrank. My problem seems to be that shrinking FAT takes a different approach from shrinking ext2/3 (e2fsck -f --> resize2fs) _________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List http://lists.linux.org.ph/mailman/listinfo/plug Searchable Archives: http://archives.free.net.ph

