2

This is a further question after this one.

I google for it, but most of the search results are about how to grow the partition and the file system at the same time.

I think this question is simpler than that, because I the partition is already larger than the file system, but I want to grow the file system to fill the partition.

The reason why my file system is smaller than the partition is that I didn't format the partition by doing mkfs on it, but rather cating a file system image into it. And the image is smaller than the target partition.

The reason why I have to grow the file system to fully fill the partition is that my embedded SoC won't boot when there's a gap, explained at the end of this wiki.

1

The only way I know is to shrink / grow the partition a little with gparted (or an old version of parted that still did this). Somehow the code for resizing vfat is hidden away in this partitioning program (or libparted for that matter) and there don't seem to be tools like resize2fs that do this directly or offer more options.

Whether such a resize is sufficient for your embedded SoC - I'm not sure how well is vfat able to adapt to arbitrary partition sizes - you linked to a program you can test with. You might have to make your partition slightly smaller so the values match.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.