[Solved] Ubuntu Gparted does not reformat an existing partition

Asked by Julianloui on 2014-09-02

My dual-boot computer had its Linux Mint 11 installed first at /dev/sda1 and then Ubuntu 12.04 at /dev/sda2. Since I no longer need Linux Mint 11, I want to delete it safely by reformatting its partition (to ext4) via gparted from Ubuntu. Even though gparted appears to have reformatted this partition by indicating zero disk-space usage in the partition, I still see Mint 11 in the boot-up menu. When I open gparted again after a reboot , I see Mint 11 still occupying the same amount of disk space before I attempted to reformat its partition. In other words, gparted has not been effective.

Can someone tell me where I have gone wrong? Thank you very much.


Question information

English Edit question
Ubuntu gparted Edit question
No assignee Edit question
Solved by:
Curtis Gedak
Last query:
Last reply:
Thomas Kr├╝ger (thkrueger) said : #1

You have to update the boot manager to reflect the changes:

sudo update-grub

Julianloui (julianloui) said : #2


Thank you so much for the important instruction. This is my first time to use gparted to modify a Linux partition.


Julianloui (julianloui) said : #3



For some strange reason, Linux executed the 'sudo update-grub' command all right but the partition table remained the same as before even after I rebooted. The boot-up table still shows Linux Mint 11.


Manfred Hampl (m-hampl) said : #4

Please copy/paste the output of the commands

sudo fdisk -l
df -h
sudo update-grub

into this question document that we can check.

Julianloui (julianloui) said : #5



Thank you so much for your input. I discovered something very strange when I booted up Ubuntu 12.04. The grub boot menu
no longer listed Linux Mint 11 even though 'sudo gparted' still showed /dev/sda1 as a non-empty partition as before. Does this
implied that it had taken Gparted so long in the past two days to complete the change I ordered? I guess that essentially I've
realized my objective. Should I just ignore the fact that the /dev/sda1 partition is not empty?

Listed below are the various outputs you requested. In the case of 'sudo update-grub', I am supplying only the latest menuentry info as I wasn't able to capture the command's output.


Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0006733e

   Device Boot Start End Blocks Id System
/dev/sda1 2048 44923922 22460937+ 83 Linux
/dev/sda2 * 56643582 156301063 49828741 5 Extended
/dev/sda5 153176064 156301063 1562500 83 Linux
/dev/sda6 58580992 153176063 47297536 83 Linux
/dev/sda7 56643584 58578943 967680 82 Linux swap / Solaris

Partition table entries are not in disk order
Filesystem Size Used Avail Use% Mounted on
/dev/sda6 45G 13G 30G 30% /
udev 743M 12K 743M 1% /dev
tmpfs 150M 928K 150M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 750M 260K 750M 1% /run/shm

menuentry "Ubuntu, with Linux 3.2.0-67-generic-pae" --class ubuntu --class gnu-linux --class gnu --class os {
menuentry "Ubuntu, with Linux 3.2.0-67-generic-pae (recovery mode)" --class ubuntu --class gnu-linux --class gnu --class os {
menuentry "Ubuntu, with Linux 3.2.0-65-generic-pae" --class ubuntu --class gnu-linux --class gnu --class os {
menuentry "Ubuntu, with Linux 3.2.0-65-generic-pae (recovery mode)" --class ubuntu --class gnu-linux --class gnu --class os {
menuentry "Memory test (memtest86+)" {
menuentry "Memory test (memtest86+, serial console 115200)" {
menuentry "Ubuntu, with Linux 3.2.0-64-generic-pae" --class ubuntu --class gnu-linux --class gnu --class os {
menuentry "Ubuntu, with Linux 3.2.0-64-generic-pae (recovery mode)" --class ubuntu --class gnu-linux --class gnu --class os {
menuentry "Ubuntu, with Linux 3.2.0-61-generic-pae" --class ubuntu --class gnu-linux --class gnu --class os {
menuentry "Ubuntu, with Linux 3.2.0-61-generic-pae (recovery mode)" --class ubuntu --class gnu-linux --class gnu --class os {
menuentry "Ubuntu, with Linux 3.2.0-60-generic-pae" --class ubuntu --class gnu-linux --class gnu --class os {
menuentry "Ubuntu, with Linux 3.2.0-60-generic-pae (recovery mode)" --class ubuntu --class gnu-linux --class gnu --class os {
menuentry "Ubuntu, with Linux 3.2.0-59-generic-pae" --class ubuntu --class gnu-linux --class gnu --class os {
menuentry "Ubuntu, with Linux 3.2.0-59-generic-pae (recovery mode)" --class ubuntu --class gnu-linux --class gnu --class os {
menuentry "Ubuntu, with Linux 3.2.0-23-generic-pae" --class ubuntu --class gnu-linux --class gnu --class os {
menuentry "Ubuntu, with Linux 3.2.0-23-generic-pae (recovery mode)" --class ubuntu --class gnu-linux --class gnu --class os {


Curtis Gedak (gedakc) said : #6

For many actions, GParted adds each action to a queue. To make the changes happen, the list of actions in the queue must be applied using the menu option: Edit -> Apply All Operations. If the actions were not applied then that might explain why the partition has not been reformatted.

Julianloui (julianloui) said : #7


Thanks for pointing out an important clue to me. When I try to use Gparted's Edit pull-down menu, all three items are grayed out
and therefore unavailable. Is there a command-line way to tell Gparted to do this job?


Curtis Gedak (gedakc) said : #8

The edit menu items are greyed out until at least one action is queued. Using GParted, the steps to reformat a partition with ext4 are:

1) Start GParted
2) Select the partition to reformat
3) Choose the menu option: Partition -> Format to -> ext4

    Note that this will add a format action to the queue

4) Apply the queued actions by choosing the menu option: Edit -> Apply All Operations
5) Click the Apply button
6) Assuming there are no errors, clickk the Close button.

   Note that if there are errors then Save Details will save the log of actions to a file named gparted_details.htm which can be useful in troubleshooting problems.

'Hope that helps.

Julianloui (julianloui) said : #9


Thanks again. I've just carried out all your 6 steps and seen Gparted's positive on-screen confirmations. However, Gparted immediately re-filled the /dev/sda1 partition to its original size.

I really wish Launchpad would give its users the option to edit all their posts just as all other Linux-support websites do. What a pain! I've complalined many a time only to be rebuffed! They say they don't consider this an urgent or important-enough issue.


Best Curtis Gedak (gedakc) said : #10

When a partition is reformatted, it will write the file system to use the entire partition.

GParted should show that the partition is mostly unused space. Note that some minimal amound of space is used up by the metadata in the file system that keeps track of structure, folders, and file names.

If you wish the space to become unallocated, then the partition must be deleted, not reformatted.

Does that answer your question?

Julianloui (julianloui) said : #11


Thank you very much for an in-depth explanation. I was not observant enough to notice that now /dev/sda1 uses only 1/42 of
its entire allotted space, namely about 500Mb out of 21 GB. You certainly have answered my question completely. Thanks again.


Julianloui (julianloui) said : #12

Thanks Curtis Gedak, that solved my question.

Julianloui (julianloui) said : #13

Thomas, Manfred and Curtis,

I can't thank you all enough for an in-depth lesson on using Gparted. I've one last question: Is it now safe for me to delete the /dev/sda1 partition?


Curtis Gedak (gedakc) said : #14

A freshly formatted partition contains no data. Hence you can safely delete the partition.

Julianloui (julianloui) said : #15


I've just deleted /dev/sda1 successfully. Many thanks again.