LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-11-2014, 03:05 AM   #16
Sunghost
LQ Newbie
 
Registered: May 2014
Posts: 24

Original Poster
Rep: Reputation: Disabled

Hello,
i now have a copy of sdb, but i dont know which of all these option i have to choose. if i run testdisk it found lot of old partition in quick search and a deep search founds a lot more and at all it cost hours of time and while this iam not sure if i choose the right to recover. while iam looking in the net for a solution i found some people who created new partition with gparted without formating and they could resuce the data, but all the steps are not logical and almost 2 years old. it whould be nice if some one could help quick.
 
Old 07-11-2014, 07:55 AM   #17
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
I wish I knew where those instructions from rodsbooks didn't work for you. I completely obliterated my main GPT and the backup worked for me.

If you wish to keep trying to recover the GPT, you MUST work on the original unfortunately. The backup will have different properties that will cause recovery efforts to fail.

As you mention, you can recreate the partitions yourself, but you would need to know the exact geometry of those partitions. If you have that information, and are successful, yes you can recover that way (I've only done it with MBR however, but was successful - I don't see why it wouldn't work for GPT if you got it right).
 
Old 07-11-2014, 08:03 AM   #18
Sunghost
LQ Newbie
 
Registered: May 2014
Posts: 24

Original Poster
Rep: Reputation: Disabled
Hello,
and thanks for your patience. The Problem is, that i dont know which command in which sequence to run.
 
Old 07-11-2014, 09:14 AM   #19
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
If you are going at this yourself, you are gambling with the data that is left. from the way this sounds, your chances are well below 50%. Is this stuff of interest, or is it "must have"?

We have pointed you at the tools, you have internet access. It's unfair to Goumba or anyone else helping you to ask them to give an exact sequence of commands. That's your gamble, and your responsibility for the consequences.
 
Old 07-11-2014, 01:05 PM   #20
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by Sunghost View Post
Hello,
i now have a copy of sdb, but i dont know which of all these option i have to choose. if i run testdisk it found lot of old partition in quick search and a deep search founds a lot more and at all it cost hours of time and while this iam not sure if i choose the right to recover.
If you would post the output from the quick search (use [CODE]...[/CODE] tags and not QUOTE tags, please), likely candidates could be found.

Before creating any "unformatted" partitions with gparted, please post what version of gparted you are using. Some versions had a bug that wrote a block of garbage to the partition.
 
Old 07-11-2014, 04:08 PM   #21
Sunghost
LQ Newbie
 
Registered: May 2014
Posts: 24

Original Poster
Rep: Reputation: Disabled
Hi,
the output
Code:
TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /media/node01/sdb.img - 3000 GB / 2794 GiB - CHS 364802 255 63
     Partition               Start        End    Size in sectors
>P MS Data                     2048 5860532223 5860530176

Structure: Ok.  Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
                P=Primary  D=Deleted
Keys A: add partition, L: load backup, T: change type, P: list files,
     Enter: to continue
EXT4 Large file Sparse superblock, 3000 GB / 2794 GiB
Thats the partition i created with parted. And gdisk has Version 0.8.5. A deeper search of this shows many partition from installation before. No one of them had a backup partition to restore.
 
Old 07-11-2014, 08:39 PM   #22
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
I would use parted to delete that partition and then let testdisk see what it can find without any "clues" from an existing partition table.

Last edited by rknichols; 07-11-2014 at 08:41 PM. Reason: Misread the response
 
Old 07-11-2014, 10:14 PM   #23
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by Sunghost View Post
Hi,
the output
Code:
TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /media/node01/sdb.img - 3000 GB / 2794 GiB - CHS 364802 255 63
     Partition               Start        End    Size in sectors
>P MS Data                     2048 5860532223 5860530176

Structure: Ok.  Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
                P=Primary  D=Deleted
Keys A: add partition, L: load backup, T: change type, P: list files,
     Enter: to continue
EXT4 Large file Sparse superblock, 3000 GB / 2794 GiB
Thats the partition i created with parted.
When did you create that partition with parted? The sequence of events has been lost here, and it's very important. What I am understanding so far is that just before your error copying the partition table this disk had a single partition formatted ext4, and that a some time in its now irrelevant history it had been used in a RAID array. Did you then try to re-create the original partitioning with parted? If so, what parted command did you use? If it was mkpartfs you are in deep trouble because that builds a new filesystem and overwrites all of the filesystem metadata that was there before.
Quote:
And gdisk has Version 0.8.5.
The problem I mentioned before was specific to certain versions of gparted, not gdisk. (I don't know whether parted itself was affected, or just the GUI version.)
 
Old 07-12-2014, 03:02 AM   #24
Sunghost
LQ Newbie
 
Registered: May 2014
Posts: 24

Original Poster
Rep: Reputation: Disabled
Hello

i now added the partition with testdisk write the table and tried to mount the ext4, but got wront fs type and bad option or superblock. i think we start at the beginning. i make another backup from sdb. ok? And i dont have gparted only parted.
 
Old 07-12-2014, 05:47 AM   #25
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
Quote:
Originally Posted by business_kid View Post
We have pointed you at the tools, you have internet access. It's unfair to Goumba or anyone else helping you to ask them to give an exact sequence of commands. That's your gamble, and your responsibility for the consequences.
As he states, you're taking a gamble. You usually can't damage the data itself unless you get careless and start playing with tools that write data other than the partition table itself, but you have to know exactly what the tool is doing, and I'm guessing you won't.

I pointed you to the document I used, for manually recovering the partition table using the backup. Follow the steps described there, again, on the original drive (I know this is scary, but unfortunately you can't work on a backup with GPT, but at least you can use something like photorec on it as a last resort or write the backup back to the drive). Before you do so, make sure you protect that backup. Read the whole document before starting, it's of great help.
 
Old 07-12-2014, 02:36 PM   #26
Sunghost
LQ Newbie
 
Registered: May 2014
Posts: 24

Original Poster
Rep: Reputation: Disabled
On original drive is very risky. But if i could make a backup with ddrescue and restore it if the recovery failed, it would be ok. I testet photorec on the backupimage and it found in the first 2 minutes a lot of files. the only problem is that the name is not the old one and there are a lot lot files with the same ending. so its no help for me
 
Old 07-13-2014, 02:50 AM   #27
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Doing it yourself, photorec is all you have got, I'm afraid. You were warned, you know. The ĺoads of files with the same name could easily be loads of _bits_of_ a few files if your disk was fragmented.
 
Old 07-13-2014, 05:57 AM   #28
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
Quote:
Originally Posted by Sunghost View Post
On original drive is very risky. But if i could make a backup with ddrescue and restore it if the recovery failed, it would be ok. I testet photorec on the backupimage and it found in the first 2 minutes a lot of files. the only problem is that the name is not the old one and there are a lot lot files with the same ending. so its no help for me
I understand it is risky, and I don't blame you. I just wanted to point it out as the following warning is on the recovery page I linked:

Quote:
Note that if the backup disk is larger than the source, even by a single sector, the GPT backup data structures will be misplaced on the backup disk. This can make GPT data recovery harder, so you may need to work on the original disk rather than the backup.
Not heeding this advice may cause you to waste a lot of time.
 
Old 07-13-2014, 10:50 AM   #29
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Sunghost, let me point out something.

For a customer, I ended up needing to copy an 800k disk written on a 720MB floppy that booted a CP/M machine back in the early 1990s. There followed a tussle with fdutils to determine disk format and many emails to the maintainer of fdutils, who was taken by my challenge. We unearthed an 80 track x 1k disc, and I believe he wrote the incident up as an example of how to use the things, and shoved it in the docs.

The point was, I could see the directory on this disk in a hex editor. It wasn't big. But I couldn't find the files, with only 80 tracks, 2 heads, and 5 sectors per track. What I was able to do was arrive with a laptop, configure the 1.44MB disk as 800k, dd in the last readable disk, and dd it out as often as he wanted.

What chance have you got on a 3 TB disk? Especially with partition data and probably root dir, perhaps even journal overwritten?
 
Old 07-13-2014, 04:03 PM   #30
Sunghost
LQ Newbie
 
Registered: May 2014
Posts: 24

Original Poster
Rep: Reputation: Disabled
Ok you might be right but we are not in the 90s . But of course it is not simple, but i have hope while the data is there. So i now have sdb1 which is the problem disk with single partition ext4 sdb1. The partition table of this disk was overwritten with a disk member of a raid and had sdb1 sdb2 sdb3 and sdb4. After this mistake i take an identical disk, same model and partition (1 ext4 with 3tb) and overwrite the sdb and now i have this situation. Perhaps this make it clearer.

New is that i now have a second disk with 3tb and same model, so i could test with that, instead of an image on disk. What do you think? I will clone sdb to sdc, and test on sdc, ok? Should i special delete sdc before? Thanks so far for helping.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slackware 13.37 - gdisk choices, MBR, GPT or Blank GPT CFet Slackware - Installation 3 04-01-2011 04:46 PM
Dual Boot MBR/PartitionTable issue bkeeper Linux - Laptop and Netbook 5 07-28-2009 09:32 AM
Fdisk can't show my partitiontable... anti.corp Slackware 9 11-12-2005 05:26 PM
messed up partitiontable -help with gpart jackren Linux - General 0 05-22-2004 06:45 AM
partitiontable erased. Linux can still read disk? EyesOnly Linux - Software 8 01-17-2004 04:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration