Open robang74 opened 3 years ago
Congratulations:` you've hit two bugs (in my opinion). Me too.
(The only serious use of FAT in my world is for EFI System Partitions. Too many vendors ship systems with ESPs that are too small. I want to resize them but cannot.)
There seems to be a known bug in the calculation of the maximum size: https://github.com/ya-mouse/fatresize/issues/18#issuecomment-616434852 My guess is that this is a fatresize bug. It is easy to work around: do your own calculation of MAX. fatresize measures to the end of the disk. If the disk is partitioned (usually the case, but not for floppies), it should measure to the end of the partition instead.
Furthermore, libresize seems to be unwilling and unable to handle FAT16 and some cases of FAT32. See https://bugzilla.gnome.org/show_bug.cgi?id=649324 This is a serious limitation of libresize and it would be great if it were fixed. Volunteers? At a very minimum, the diagnostic should be changed to be accurate and useful (should be easy). Out of scope for this (fatresize) project.
I have cloned the 1.1.0 but the binary shows 1.0.3 with the date of compilation
roberto@vm-ubuntu18:~/tinycore-editor$ sudo fatresize -i /dev/loop0p1 fatresize 1.0.3 (20210815) part(start=2048, end=266239, length=264192) FAT: fat16 Cur size: 67108864 Min size: 33728000 Max size: 136314880
roberto@vm-ubuntu18:~/tinycore-editor$ sudo fatresize -s 136314880 /dev/loop0p1 fatresize 1.0.3 (20210815) part(start=2048, end=266239, length=264192) Error: The location 137MB is outside of the device /dev/loop0.
roberto@vm-ubuntu18:~/tinycore-editor$ sudo fatresize -s 129M /dev/loop0p1 fatresize 1.0.3 (20210815) part(start=2048, end=266239, length=264192) No Implementation: GNU Parted cannot resize this partition to this size. We're working on it!