Topic: Deleting & Recreating Partitions > Is it Data Distructive?

I am looking to better understand how GParted works.

Question 1:
If I have 3 partitions on a GPT partitioned disk with the first one (sda1) being designated as the EFI system partition:
. . . all have data on them.  Can I delete sda2 so that it appears as 'unused' space, and then recreate it with the same size and still be able to access all the data on it, or does the 'unused' space get formatted with the subsequent data that WAS  there being lost?

Back in the day I was able to do that with my old faithful program "Ranish Partition Manager 2.43".
I could edit the DOS based MBR directly, with out touching the actual partition.  Basically if the system didn't know there was a partition there, the OS wouldn't see it.  Re-enter the info into the MBR and it was all accessible again.  You do a similar thing by simply "Hiding" the partition with the 'hidden' flag - that doesn't appear to work anymore with GPT partitioned drives.

Question 2:
If someone can tell me how to "Hide" partitions on GPT partitioned disks, I'd like to know.

Question 3:
If we can't delete and re-create partitions in a non-destructive way to the data that might be located in that area of the disk that we are working on . . . could it be done simply by deleting the partition and then, when you'd like to have access to that area back again, use the "Data Recovery" feature of GParted to put the partition back?
If we did you the data recovery option, how long would it take to restore the partition and the access to the data - (Say it was 100GB partition with 80Gb's on it)?

Thanks for the help.


Re: Deleting & Recreating Partitions > Is it Data Distructive?

Deleting a partition in GParted will delete the partition information from the partition table, but leave the data on the disk.

If you recreate the partition as unformatted with the exact same partition boundaries then you should be able to access the data.  Note that I do not recommend anyone do this without having a backup of the data in case something goes wrong.

If you recreate the partition with a file system, then the file system format will be written to the disk, overwriting portions of the data that previously existed there.

The GParted Device -> Attempt Data Rescue option will try to locate up to four partitions on the disk and permit you to mount and copy data from recognized partitions.  It will not restore the partition table -- try testdisk for partition table restoration.  Note that the GParted uses the gpart utility to recognized file systems, and that this utility has not not been regularly maintained and only recognizes a handful of file systems.

WARNING:  We highly recommend you backup your data before editing partitions with any partition editing tool.  Otherwise data can be lost due to software bugs, hardware failure, or power outage.


Re: Deleting & Recreating Partitions > Is it Data Distructive?

Concerning hidden partitions, I think this is for some special purpose partitions like recovery partition or the microsoft reserved partition in later mswindows versions. They aren't user data partitions. This manner, special partitions don't get drive letters and aren't displayed in the file manager window. However hidden partitions remain visible to the partition manager software like diskpart (microsoft) or GParted.

As for Linux, "hidden" flag could be ignored because how partitions are mounted can be controlled by fstab.

To make a disk space for "secret" content, I think one has to look for encryption solutions. Of course, encryption makes recovery even harder in case of problem.

*** It is highly recommended to backup any important files before doing resize/move operations. ***