1

Topic: Error using libparted

I was extending a partition that was only using 3gb. i had 55gb of unallocated space so i resized the sdb2 and use the check partition tool, now i have an error and i can't tell if i succeeded in extending the partition or not, im running kali linux off a live usb

GParted 0.25.0 --enable-libparted-dmraid --enable-online-resize

Libparted 3.2
Check and repair file system (fat16) on /dev/sdb2  00:00:01    ( ERROR )
         
calibrate /dev/sdb2  00:00:00    ( SUCCESS )
         
path: /dev/sdb2 (partition)
start: 5456224
end: 120795135
size: 115338912 (55.00 GiB)
check file system on /dev/sdb2 for errors and (if possible) fix them  00:00:01    ( SUCCESS )
         
fsck.fat -a -w -v /dev/sdb2  00:00:01    ( SUCCESS )
         
fsck.fat 4.1 (2017-01-24)
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "mkfs.fat"
Media byte 0xf8 (hard disk)
512 bytes per logical sector
2048 bytes per cluster
1 reserved sector
First FAT starts at byte 512 (sector 1)
2 FATs, 12 bit entries
1024 bytes per FAT (= 2 sectors)
Root directory starts at byte 2560 (sector 5)
512 root directory entries
Data area starts at byte 18944 (sector 37)
342 data clusters (700416 bytes)
32 sectors/track, 64 heads
0 hidden sectors
1408 sectors total
Reclaiming unconnected clusters.
/dev/sdb2: 4 files, 329/342 clusters
grow file system to fill the partition  00:00:00    ( ERROR )
         
using libparted
libparted messages    ( INFO )
         
File system is FAT12, which is unsupported.

========================================

2

Re: Error using libparted

As far as I know, the fat16 size limit is 2 GiB (for 32 kiB cluster size) or 4 GiB (for 64 kiB cluster size). I can't see how this would become 55 GiB. There were some extensions under windows NT, using 128 kiB or 256 kiB cluster size, but this is valid for a sector size of 1024 or 2048 bytes, that was much less common (and largely unsupported by the application software). For a file system bigger than 1 GiB it was better to use fat32. Under the various ms windows versions, the cluster size was automatically selected according to the file system size.

GNU Parted (the software tool that peforms resize operations under GParted) can't grow the cluster size, so the max size available is what the actual cluster size allows. This was true in older Parted versions. I'm not sure about the latest versions but I wouldn't think this did change.

The partition size can grow without problem but the file system in it can't be bigger than its specific limits (it is anyway possible to shrink the fat16 file system).

In order to make a 55 GiB partition you need to use some other file system like fat32 (if you want to remain in the fat family, for compatibility or other reasons) or any other from the ext2/3/4 family, according to what your O.S. supports. Converting fat16 into fat32 was possible by using some microsoft utilities in windows 98 opr perhaps windows me, as well as by some commercial tools from that era (20 years ago). I'm not aware or any linux tool for this. So, you can backup the files contained in the partition, reformat the partition as fat32 or any else and restore files from backup.

*** It is highly recommended to backup any important files before doing resize/move operations. ***