2015-07-30 16:26 GMT-03:00 Grant Edwards <[email protected]>:
> On 2015-07-30, Neil Bothwick <[email protected]> wrote: > > On Thu, 30 Jul 2015 20:32:05 +0200, [email protected] wrote: > > > >> Firstly I want to shrink the first partition and secondly it is a > >> plain FAT32 partition not ext-something. I did not find a > >> "resizefat32" or similiar. > > > > You need fatresize, which doesn't appear to be in portage. The approach > > when reducing a partition's size is to first reduce the size of the > > filesystem, to slightly less than the final partition size for safety. > > Then delete and recreate the partition, with the same starting point. > > Finally resize the filesystem to fill the new partition. > > > >> What tools do I need? > > > > The easiest way is probably to use GParted, which does all the hard work > > for you, just tell it the new size of the partition. It will also create > > the second partition for you, as a bonus. > > I've read good things about Parted Magic: > > https://partedmagic.com/ > > AFAICT, it's a friendly front-end to parted (as is GParted), but also > includes some extra abilities like cloning partitions and disks for > backup purposes. > > >> (beside the way to backup the SDcard, reinitialize it, put 2 > >> partitions on it and copy back the stuff.) > > > > Given that you should backup any important data before resizing any > > filesystem, this may be the easiest method. > > I've had resize operations go pear-shaped on me. I haven't seen it > often, but I wouldn't attempt a resize without a backup copy of the > partition involved. > > -- > Grant Edwards grant.b.edwards Yow! Did YOU find a > at DIGITAL WATCH in YOUR > box > gmail.com of VELVEETA? > > > Flash memory devices are tricky when you try do defrag, as there is extra logic inside them to do the opposite: spread as much data as possible, as to equalize the number of write operations - the main limit for flash memory - for all sectors. Most defrag tools do this by reading files to RAM, reordering them, erasing the originals from the media, then writing them again, using no direct sector access, leaving that to the operating system. And it works on magnetic media, as it creates empty spaces suitable for continuous files. So that extra logic may fool you, making you believe it worked, when it didn't. Considering this, as already said, I would copy everything to another media, set up a new partition layout, format the new partitions as desired, then get all data back to the new layout. Just my 2 cents, of course. Good luck Francisco

