In the following case I wished to resize a 512MiB FAT16 filesystem to a 4GiB one but forgot about the 2GiB limit. This is a log:
# fatresize -s 3700Mi -i /dev/sda1
fatresize 1.0.2 (06/16/18)
FAT: fat16
Size: 512451072
Min size: 489846784
Max size: 4000317440
# fatresize -s 3700Mi /dev/sda1
fatresize 1.0.2 (06/16/18)
Warning: The file system can only be resized to this size by converting to FAT32.
If you convert to FAT32, and MS Windows is installed on this partition, then you
must re-install the MS Windows boot loader. If you want to do this, you should
consult the Parted manual (or your distribution's manual). Also, converting to
FAT32 will make the file system unreadable by MS DOS, MS Windows 95a, and
MS Windows NT.
# fatresize -i /dev/sda1
fatresize 1.0.2 (06/16/18)
FAT: fat32
Size: 3879977472
Min size: 536870912
Max size: 4000317440
fatresize provided a warning but did not ask me to confirm that I wanted to proceed before converting the filesystem to FAT32, which (1) is surprising behavior, (2) is not something I asked the tool to do, (3) left the filesystem in a useless state since this was being used for a DOS machine.
My suggestion is to implement one of the following:
Prompt the user to type the word "yes" to confirm that filesystem conversion is wanted.
Change the warning to an error and force the user to supply a command line argument like "--allow-filesystem-conversion".
In the following case I wished to resize a 512MiB FAT16 filesystem to a 4GiB one but forgot about the 2GiB limit. This is a log:
fatresize provided a warning but did not ask me to confirm that I wanted to proceed before converting the filesystem to FAT32, which (1) is surprising behavior, (2) is not something I asked the tool to do, (3) left the filesystem in a useless state since this was being used for a DOS machine.
My suggestion is to implement one of the following:
--allow-filesystem-conversion
".