Help - ext4 partition deleted, NTFS created, then deleted

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
hidannik
Posts: 3
Joined: 13 Apr 2012, 21:07

Help - ext4 partition deleted, NTFS created, then deleted

#1 Post by hidannik »

I removed a drive from a RAID 1 pair, meaning to use it to install Windows on. So I deleted the ext4 partition, then created a new NTFS one. Then I deleted that as well to have a clean disk to install on.

Sometime later I managed to pretty thoroughly mung the remaining RAID drive, losing /home in the process.

Now I'd like to try to get that /home ext4 partition back on the un-RAIDed drive.

I know there's data still on the un-RAIDed drive, as I ran photorec and it found files and recovered them. Can I make this work? Is there a way to tell TestDisk what kind of filesystem to repair?


Hans

User avatar
Fiona
Posts: 2835
Joined: 18 Feb 2012, 17:19
Location: Ludwigsburg/Stuttgart - Germany

Re: Help - ext4 partition deleted, NTFS created, then delete

#2 Post by Fiona »

TestDisk would be just as long helpful as it finds your Linux (ext4) partition.
Did you already run Analyse, Quick and Deeper Search in TestDisk to see that your partition would be found?

Fiona

hidannik
Posts: 3
Joined: 13 Apr 2012, 21:07

Re: Help - ext4 partition deleted, NTFS created, then delete

#3 Post by hidannik »

Yes, but sadly I ran it searching for Intel partition info rather than EFI GPT. I only got wise to my error after I ran photorec and it reported finding an EFI GPT partition.

So I'll try testdisk again after I get home tonight. I was hoping to get some info on next steps and gotchas before everyone goes home for the weekend. :)

Thanks for the info.

Hans

User avatar
remy
Posts: 457
Joined: 25 Mar 2012, 10:21
Location: Strasbourg, France.
Contact:

Re: Help - ext4 partition deleted, NTFS created, then delete

#4 Post by remy »

ext4 + raid let me think you had a linux raid ?
If yes, probably a software based raid, so why do you thing you may had a GPT table ?

I mean : If the whole disk was raided and the raid was partitionned, i's different than if the disks were partitionned and the parts raided.

So first question is : more precision about your raid, please. Is it from a NAS or manualy made by you ?
Was it software raid, fake raid or full hardware ?

hidannik
Posts: 3
Joined: 13 Apr 2012, 21:07

Re: Help - ext4 partition deleted, NTFS created, then delete

#5 Post by hidannik »

It's RAID of the mdadm variety. The system motherboard has a RAID controller on it, and there's support for RAID in the BIOS.

I wasn't the person who set up the RAID, and while I asked for the RAID to be broken (it wasn't), I wasn't the person who actually removed the secondary drive from the RAID. So I don't know if the drives were partitioned and then RAIDed, or RAIDed and then partitioned. My knowledge of the minutiae of RAID setup and configuration is minimal.

What I can tell you is that when I run a GPartEd live CD on the system, it can see the individual drives (/dev/sda etc) as well as the RAID image (/dev/md127).

This was RAID 1, so one drive is a duplicate of the other. There was only a single partition spanning the entire drive, which was (when in the raid configuration) mounted as /home.

There was another drive entirely holding the Linux filesystem root. System originally had one PATA system drive and two SATA drives, RAID 1, mounted as /home.

What makes me think it's EFI GPT is that that's what photorec reported finding when it started working on the disk.

Hans

User avatar
remy
Posts: 457
Joined: 25 Mar 2012, 10:21
Location: Strasbourg, France.
Contact:

Re: Help - ext4 partition deleted, NTFS created, then delete

#6 Post by remy »

Do you still have one disk in correct condition ? If yes, from linux liveCD and internet connection, try :

Code: Select all

sudo apt-get install mdadm
then, if no error :

Code: Select all

sudo mdadm --examine /dev/sda
(perhaps you'll need to change /dev/sda to /dev/sdb or /dev/sdc depending on your disk that is raided.

Also give feedback about :

Code: Select all

cat /proc/mdstat
and

Code: Select all

sudo sfdisk -luS
We should be able to access your /home without testdisk.

Locked