Er, I was talking about fatresize, an actual tool for doing that. Package: fatresize Priority: optional Section: universe/otherosfs Installed-Size: 68 Maintainer: Ubuntu MOTU Developers <[EMAIL PROTECTED]> Original-Maintainer: Philippe Coval <[EMAIL PROTECTED]> Architecture: amd64 Version: 1.0.2-2 Depends: libc6 (>= 2.5-5), libparted1.7-1 (>= 1.7.1-1), libuuid1 Suggests: dosfstools Filename: pool/universe/f/fatresize/fatresize_1.0.2-2_amd64.deb Size: 9916 MD5sum: deeffa0f730b5046d29270fdcee922d0 SHA1: 24cce6cf5cf65e30b8ab23008da5c524422afcfb SHA256: e741cba635a8954b0dece5cc84c19947986aa8d7a00f498ee4ec16688d9b8b6c Description: FAT16/FAT32 filesystem resizer Fatresize is a command line tool for non-destructive resizing of FAT16/FAT32 partitions. . It is based on the GNU Parted library. The main target of the project is to be used with the EVMS FAT plugin. . Homepage: http://sf.net/projects/fatresize
--- 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 On Tue, Sep 30, 2008 at 8:12 PM, Slim Joe <[EMAIL PROTECTED]> wrote: > 2008/9/29, Mark David Dumlao <[EMAIL PROTECTED]>: >> Well, parted resizes the partitions by playing with the partition >> table of the disk itself. It doesn't really do anything to the size of >> the disk, so wouldn't it be sufficient to append zeroes to the end of >> the file, then use resize2fs to grow the partition? >> >> Where normally we do: >> grow physical device -> grow block device -> grow filesystem >> >> and it means >> 1) add disks >> 2) partition / array disks >> 3) use filesystem resize tool >> >> In a file-based partition, (1) would be replaced by growing the file >> (appending zeroes), and (2) isn't necessary because the file is >> already the block device (it has no partition table). So I was >> thinking >> dd if=/dev/zero bs=1M count=100 >> filename >> fatresize filename (dunno how to fatresize) >> >> would grow your disk by 100M. > > Sorry I didn't make my problem clearer. I start my FAT file big and > shrink to fit. I think there's a GNU tool to truncate files, but I'm > sure that would mean cutting off some important data inside the FAT > filesystem. > _________________________________________________ > Philippine Linux Users' Group (PLUG) Mailing List > http://lists.linux.org.ph/mailman/listinfo/plug > Searchable Archives: http://archives.free.net.ph > _________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List http://lists.linux.org.ph/mailman/listinfo/plug Searchable Archives: http://archives.free.net.ph

