Deleting a partition (Should know)
Deleting a partition will free up space, enabling you to use the space in other new or existing partitions. This recipe covers the steps to delete a partition and describes a boot problem that might arise.
Getting ready
When you delete a partition you lose all of the data inside the partition. Hence, if you need any of the data, be sure to make a backup before deleting the partition.
How to do it...
Select a partition to delete:
Choose the Partition | Delete menu option.
Choose the Edit | Apply All Operation menu option to apply the queued operations to disk.
Click on Apply to apply operations to disk.
Click on Close to close the apply operations to disk window.
How it works...
Deleting a primary or extended partition removes the partition entry from the partition table.
Deleting a logical partition is different. Logical partitions are a special case because each logical partition has an Extended Boot Record (EBR) associated with the partition. The EBR is used to track the partition boundaries, and also to link to the next logical partition. Due to this linking nature, deleting a logical partition affects the device names of all higher numbered logical partitions. For example, if logical partition sda5 is deleted, then logical partitions sda6 and higher will have their partition number reduced by one (for example, sda6 will become sda5).
Changes in logical partition device names can adversely affect operating system boot process. As Windows can only be installed in a primary partition, the Windows boot process will not be affected. However, for operating systems that do permit booting from a logical partition, such as GNU/Linux, you might need to edit configuration files such as /etc/fstab
, or other specific boot loader configuration files to restore the ability to boot.
There's more...
Deleting a partition that is part of the boot process, such as the C:
drive or a system reserved partition in Windows, might cause a computer to fail to boot. If your intention was to remove only one operating system, such as Windows, you might be surprised to find your other operating systems also fail to boot. If this occurs you should be able to restore the ability to boot using the original operating system install media.
The GParted website contains additional resources to help you restore the operating system boot. See http://gparted.org/faq.php.
Deleting a partition by accident
If you have recently deleted a partition and have not yet used this space, then there is a chance you can recover the data or restore the partition.
Data rescue steps are covered later in the Rescuing data from a lost partition recipe.