Libparted bug surfaces while attempting to resize partition in an 8GB flash drive

Category:bug report

Starting with a Verbatim 8GB V3 USB flash drive, in a Trisquel 7 installation on a Lenovo T420 laptop with 4GB of RAM, I noticed that Gparted would crash when I attempted to resize the original Fat32 drive partition to 4GB. Then I reformatted the flash drive altogether to the original Fat32 8GB configuration and successfully resized it from 8GB to 4GB, leaving 4GB free space that I formatted to Fat32. Then I found after putting data on the 2nd Fat32 partition and using Startup Disk Creator to install Trisquel 7 on the 1st 4GB partition that the flash drive would not boot, even though USB HDD was at the top of the boot list priority in the BIOS.

Then I tried again, reformatting the entire flash drive back to 8GB and Fat32, then using Startup Disk Creator to install Trisquel 7 with a 2GB persistence file, which then occupied 4GB of space on the 8GB partition of the flash drive. Still the flash drive would not boot.

Figuring that there is nothing to lose, I again tried to resize that 8GB partition so as to create space for data files beyond that 4GB limit. When I started the resizing process, I chose to shrink the 8GB partition to a size just a little larger than the 4GB limit so as not to impinge on the Trisquel plus 2GB persistence file installation.

Now comes the Libparted Bug. Two popups appeared as soon as I started the "apply changes" operation:

1st Popup:
"Libparted Bug Found!

"Attempt to write sectors 15312-15319
outside of partition on (null).
[Cancel] [Ignore]
2nd Popup:

"Libparted Bug Found !

"Assertion (!dev->external_mode) at ../../libparted/
device.c:378 in function ped_device_sync() failed.

Then Gparted closed again. That's where it stands.

Pictures of the Gparted screen at these two stages are attached.

2ndPopup-1206.JPG232.04 KB
1stPopup-1205.JPG181.14 KB
Tue, 02/09/2016 - 17:52

I've done this before without incident. That time I was using a DataStick Pro (Centon) 8GB USB flash drive, which it happens I am using right now to post this comment. That drive has two ca. 4GB partitions, one with a bootable Live USB version of Trisquel and the other with several website clones.

Note that I have not updated Trisquel in some time on this Centon USB drive.

I will now proceed to attempt the same thing with another new Verbatim 8GB USB flash drive, to see if it's a problem with the specific flash drive.

... pause for further research ...

Not OK. Now trying another Verbatim flash drive, identical to the first. Gparted repeatedly crashed several times when I attempted to resize the 8GB Trisquel 7 partition if I left a little white space in the Trisquel installation. Than I attempted resizing so there would be zero free space in the Trisquel partition remaining. The resize proceeded until the 1st popup appeared again, to much the same effect as in the original incident report above; I chose "Ignore" whereupon the 2nd popup appeared, identical to the second popup in the original bug report. I chose "No" (there being no other choice) and Gparted quit.

BTW, the Trisquel 7 installation on the Verbatim 8GB partition in this Verbatim USB flash drive also fails to boot, whereas the Trisquel 7 installation of a couple of months ago on the Centon flash drive mentioned above boots OK without any change in the present boot sequence.

There we stand, with Gparted useless for resizing partitions in 8GB Verbatim flash drives; I have no other manufacturer's flash drive with which I can do further experiments. One additional 8GB Centon flash drive that I have is worn out and unusable. I do have third Verbatim 8GB flash drive, but why play "Lucy & the Football" with that one, too ?

Sat, 02/27/2016 - 15:39

There is a workaround:

Create your primary partitions (in my case, a small one as fat32 for the Trisquel Live USB operating system, and a larger one as ext4 for Data). If the first partition isn't the right size, use Gparted to remove everything and start over. This is much quicker than waiting for the Libparted bug to be fixed.