Can I Recover Data from an Accidental Creation of a New GPT Table

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
Resistor
Level 4
Level 4
Posts: 208
Joined: Wed Nov 03, 2010 12:04 am
Location: Western Ozarks

Can I Recover Data from an Accidental Creation of a New GPT Table

Post by Resistor » Tue May 08, 2018 3:28 am

I intended to work on an empty partition on the first part of /sda and somehow initiated a new GPT Table on top of an EFI system. I expected Gparted to offer a confirmation click for this action, but did not get it.

As soon as I selected 'Create a New Partition', it was executed.
The entire hard drive is now showing 'unallocated - 465 GiB.

I tried this, which I saw in a post by WharfRat.

Code: Select all

$ sudo tune2fs -l /dev/sda
tune2fs 1.42.9 (4-Feb-2014)
tune2fs: Bad magic number in super-block while trying to open /dev/sda
Couldn't find valid file system superblock.
This is my configuration:

Code: Select all

LM 17.3 Qiana v2, Cinnamon. Windows 8 is gone.
Dell Inspiron 15z 5523, 6 GB RAM, Intel i3-3217U. 32GB SSD
Is there a way to recover the data stored in the back half of the drive.?

I've looked at a couple of recovery applications, but they seem to have a steep learning curve.
I'm not too interested in things like 'boot-repair'.

Windows does not exist outside of the bios/uEFI.

Will be busy the next day or so and will be back later in the day on Wednesday, the 9th.
Dell Inspiron 15-7567 Gaming Laptop i5, 8GB Ram, 256GB SSD. Win 10 reduced partition. Nvidia GeForce GTX 1050 Ti. LM 19.1 + 19.2 Cinnamon
Dell Inspiron 15Z, i3, 6 GB RAM. Win 8 is gone. LM 19.1 + 19.2 Cinnamon

User avatar
catweazel
Level 19
Level 19
Posts: 9514
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Can I Recover Data from an Accidental Creation of a New GPT Table

Post by catweazel » Tue May 08, 2018 3:38 am

Resistor wrote:
Tue May 08, 2018 3:28 am
I expected Gparted to offer a confirmation click for this action, but did not get it.
When you deliberately click Apply, that's your confirmation.

https://www.linux.com/learn/get-your-da ... very-tools
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

User avatar
Miejer_Alied
Level 1
Level 1
Posts: 18
Joined: Sat Sep 30, 2017 1:57 am
Location: Tõrva, Estonia

Re: Can I Recover Data from an Accidental Creation of a New GPT Table

Post by Miejer_Alied » Tue May 08, 2018 3:52 am

Hi, have you tried TestDisk, it has a really easy command-line interface.
TestDisk Step By Step

Also, there's PhotoRec, its kde version has gui.
PhotoRec Step By Step

Regards!

Mute Ant
Level 14
Level 14
Posts: 5135
Joined: Tue Sep 03, 2013 7:45 pm
Location: Norfolk UK

Re: Can I Recover Data from an Accidental Creation of a New GPT Table

Post by Mute Ant » Tue May 08, 2018 5:19 am

"Can I Recover Data from an Accidental Creation of a New GPT Table" Yes. A new partition table would not affect the data stored in the old partitions.

I would use a gparted-live boot CD...
https://gparted.org/livecd.php
315MB
Downloads: 27,069 This Week (!)

Under gparted: Devices: Attempt Data Recovery each file system it finds on the drive can be 'viewed' == mounted read-only on a folder under /tmp/ and you can copy the data out.

You could try the gparted built in to a Mint Live Session if that's closer to hand.
While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named "manual".

Resistor
Level 4
Level 4
Posts: 208
Joined: Wed Nov 03, 2010 12:04 am
Location: Western Ozarks

Re: Can I Recover Data from an Accidental Creation of a New GPT Table

Post by Resistor » Wed May 09, 2018 5:43 pm

catweazel wrote:
Tue May 08, 2018 3:38 am
Resistor wrote:
Tue May 08, 2018 3:28 am
I expected Gparted to offer a confirmation click for this action, but did not get it.
When you deliberately click Apply, that's your confirmation.

https://www.linux.com/learn/get-your-da ... very-tools
I did not click apply. Or, at least not that I'm aware of and not intentionally.
As soon as I selected the option to Create a Partition table from the menu, it was executed. I do like to review my actions before doing something that could be dangerous.

Thank you for replying and for that link. We'll see how it goes.
Dell Inspiron 15-7567 Gaming Laptop i5, 8GB Ram, 256GB SSD. Win 10 reduced partition. Nvidia GeForce GTX 1050 Ti. LM 19.1 + 19.2 Cinnamon
Dell Inspiron 15Z, i3, 6 GB RAM. Win 8 is gone. LM 19.1 + 19.2 Cinnamon

Resistor
Level 4
Level 4
Posts: 208
Joined: Wed Nov 03, 2010 12:04 am
Location: Western Ozarks

Re: Can I Recover Data from an Accidental Creation of a New GPT Table

Post by Resistor » Wed May 09, 2018 5:50 pm

Miejer_Alied wrote:
Tue May 08, 2018 3:52 am
Hi, have you tried TestDisk, it has a really easy command-line interface.
TestDisk Step By Step

Also, there's PhotoRec, its kde version has gui.
PhotoRec Step By Step

Regards!
I did try TestDisk but could not figure out how and where to save any result. I thought I save an image.dd file but can't seem to locate it. I wound up borking the computer and had to reinstall.

A quick look at PhotoRec looks promising.

Thank you.
Dell Inspiron 15-7567 Gaming Laptop i5, 8GB Ram, 256GB SSD. Win 10 reduced partition. Nvidia GeForce GTX 1050 Ti. LM 19.1 + 19.2 Cinnamon
Dell Inspiron 15Z, i3, 6 GB RAM. Win 8 is gone. LM 19.1 + 19.2 Cinnamon

Resistor
Level 4
Level 4
Posts: 208
Joined: Wed Nov 03, 2010 12:04 am
Location: Western Ozarks

Re: Can I Recover Data from an Accidental Creation of a New GPT Table

Post by Resistor » Wed May 09, 2018 6:02 pm

Mute Ant wrote:
Tue May 08, 2018 5:19 am
"Can I Recover Data from an Accidental Creation of a New GPT Table" Yes. A new partition table would not affect the data stored in the old partitions.

I would use a gparted-live boot CD...
https://gparted.org/livecd.php
315MB
Downloads: 27,069 This Week (!)

Under gparted: Devices: Attempt Data Recovery each file system it finds on the drive can be 'viewed' == mounted read-only on a folder under /tmp/ and you can copy the data out.

You could try the gparted built in to a Mint Live Session if that's closer to hand.
Hi, Mute Ant. I can't tell you how encouraging that is...

I will have to try to run an Attempt Data Recovery in gparted, again.
It looks like it will take a good long while, even though the device is less than half full.

I'm running off of the sdb and saving things to removable media, then backing that up to sda. I presume that will work, but I can also run a Live Session from a USB stick.

Thank you.
-- If this were any other forum, I don't think I would be near as capable as I've become with Linux. Nowhere close to being expert, but very comfortable with partitions, booting, etc.
Dell Inspiron 15-7567 Gaming Laptop i5, 8GB Ram, 256GB SSD. Win 10 reduced partition. Nvidia GeForce GTX 1050 Ti. LM 19.1 + 19.2 Cinnamon
Dell Inspiron 15Z, i3, 6 GB RAM. Win 8 is gone. LM 19.1 + 19.2 Cinnamon

User avatar
Miejer_Alied
Level 1
Level 1
Posts: 18
Joined: Sat Sep 30, 2017 1:57 am
Location: Tõrva, Estonia

Re: Can I Recover Data from an Accidental Creation of a New GPT Table

Post by Miejer_Alied » Thu May 10, 2018 1:33 am

Well, Photorec is pretty straightforward.

- Choose the partition you want to recover, then select the file types

-Select destination drive (should be other than the being processes by photorec)

-Then , the program would scan for files & move them to selected destination

All recoverable files are automatically written to the target location. (file names would be different, though)

Get the latest package from here, https://www.cgsecurity.org/wiki/TestDisk_Download
You have to compile it. It would have 'QPhotoRec', gui for photorec.

Don't want to compile, then get the installable .deb from the link below : -
https://sourceforge.net/projects/crunch ... QPhotoRec/

Post Reply

Return to “Installation & Boot”