[Parted-maintainers] Bug#1029074: fatresize: misleading functionality / messed up with GPT table

Yangfl mmyangfl at gmail.com
Tue Jan 17 13:04:05 GMT 2023


Package: fatresize
Version: 1.1.0-2
Severity: important

This program, unlikely other fs resizing utils like `resize2fs` or
`btrfs filesystem resize`, does not only resize fs, but also alter the
partition table, which is not mentioned in the help text or man page
at all. As the result of messing up with partition tables, this
program may lead to one of the following consequences:

* `-s max` will fail if there is any partitions after the current
partition, showing

  Error: Can't have overlapping partitions.

instead of taking the free space after the current partition.

*  `-s max` will silently failed on GPT disk, resulting an unusable
and un-fsck-able fs. `dosfsck` will give the following error message:

  Seek to <some number here>:Invalid argument

The only way to recover it is to reconstruct the disk with MBR
partition table and create a partition up to the end of disk, to pick
up sectors which is unusable in GPT scheme.

* Once `-i` is specified as one of the options, resizing operation
`-s` will be ignored without any warning, nor is it mentioned in any
help text.



More information about the Parted-maintainers mailing list