1

Topic: Error resizing partition on SD card

Hi all!
After cloning a 4Gb microsd card to a new 16Gb one, I'm trying to resize and move 2 partitions (Fat32 and ext4) but GParted can't complete the process. I'm using a LiveUSB. This is what details file says:

GParted 0.16.1

Libparted 2.3
Move /dev/sdb2 to the right and grow it from 149.04 MiB to 500.00 MiB  00:00:03    ( ERROR )
        
calibrate /dev/sdb2  00:00:01    ( SUCCESS )
        
path: /dev/sdb2
start: 7438095
end: 7743329
size: 305235 (149.04 MiB)
check file system on /dev/sdb2 for errors and (if possible) fix them  00:00:00    ( SUCCESS )
        
dosfsck -a -w -v /dev/sdb2
        
dosfsck 3.0.16 (01 Mar 2013)
dosfsck 3.0.16, 01 Mar 2013, FAT32, LFN
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "MSWIN4.1"
Media byte 0xf8 (hard disk)
512 bytes per logical sector
512 bytes per cluster
32 reserved sectors
First FAT starts at byte 16384 (sector 32)
2 FATs, 32 bit entries
1221120 bytes per FAT (= 2385 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 2458624 (sector 4802)
300433 data clusters (153821696 bytes)
63 sectors/track, 255 heads
7438095 hidden sectors
305235 sectors total
Reclaiming unconnected clusters.
Checking free cluster summary.
/dev/sdb2: 28 files, 222513/300433 clusters
grow partition from 149.04 MiB to 10.82 GiB  00:00:01    ( SUCCESS )
        
old start: 7438095
old end: 7743329
old size: 305235 (149.04 MiB)
new start: 7438095
new end: 30138450
new size: 22700356 (10.82 GiB)
move file system to the right  00:00:00    ( ERROR )
        
using libparted
rollback last change to the partition table  00:00:00    ( SUCCESS )
        
shrink partition from 10.82 GiB to 149.04 MiB  00:00:00    ( SUCCESS )
        
old start: 7438095
old end: 30138450
old size: 22700356 (10.82 GiB)
new start: 7438095
new end: 7743329
new size: 305235 (149.04 MiB)
check file system on /dev/sdb2 for errors and (if possible) fix them  00:00:01    ( SUCCESS )
        
dosfsck -a -w -v /dev/sdb2
        
dosfsck 3.0.16 (01 Mar 2013)
dosfsck 3.0.16, 01 Mar 2013, FAT32, LFN
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "MSWIN4.1"
Media byte 0xf8 (hard disk)
512 bytes per logical sector
512 bytes per cluster
32 reserved sectors
First FAT starts at byte 16384 (sector 32)
2 FATs, 32 bit entries
1221120 bytes per FAT (= 2385 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 2458624 (sector 4802)
300433 data clusters (153821696 bytes)
63 sectors/track, 255 heads
7438095 hidden sectors
305235 sectors total
Reclaiming unconnected clusters.
Checking free cluster summary.
/dev/sdb2: 28 files, 222513/300433 clusters
libparted messages    ( INFO )
        
GNU Parted cannot resize this partition to this size. We're working on it!

========================================
Grow /dev/sdb1 from 3.54 GiB to 14.22 GiB

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

Thanks in advance!

2

Re: Error resizing partition on SD card

It looks like the sdb2 FAT partition is 194 MiB in size.  Unfortunately the libparted library used by GParted only supports resizing FAT partitions larger than 256 MiB.

See Bug 649324 - failure to move / resize fat32 partitions less than 256 MB in size