resizing partition fails with Gparted when resizing fat32 partition. Ubuntu 14.04
Thanks everyone! I did use Fabby's suggestion and ran chkdsk
and there were errors that windows corrected, but it did not solve the issue I had.
I've decided that it could be that the pen drive itself is the source of the problem so I replaced it with another pen drive and repeated the steps (formatting to FAT32, installing a bootable live Ubuntu with persistent, deleting casper-rw file, re-sizing using GParted live CD and creating a new directory names casper-rw).
This time it worked!
This seems to be a bug with the particular version of gparted
in Ubuntu 14.04. Repeated failures with resizing fat32 partitions using Ubuntu 14.04 is also reported in this Askubuntu question.
The solution (for me) is quite simple. Use Ubuntu 12.04 or earlier versions either on another machine or from a liveusb. I was able to shrink fat32 partitions on thumb-drives without a problem.
Linux's fschk
doesn't reliably fix all FAT errors. If you can lay your hands on a Windows machine, do a chkdsk /f x:
where x
is the drive letter of the USB on that machine and then resize again.
If you do not have access to a Windows machine, download FreeDOS.
If the goal is to have a live ubuntu on flash drive with persistent partition, you do not even need a Gparted Live CD. You can set up partitions first and then install live ubuntu later with usb-creator-gtk.
Just boot from ubuntu cd or even use virtualbox to run ubuntu and all can be done in one session. The version of Gparted available for Ubuntu can create and remove partitions with no problem but always(?) fails in resizing partition.