Accidentily turned a 3TB drive into a 3GB live thumb drive.

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
owweeee
Posts: 3
Joined: 28 Jul 2017, 03:53

Accidentily turned a 3TB drive into a 3GB live thumb drive.

#1 Post by owweeee »

Hi

I have a 3TB HDD which had the ext4 file system on the whole thing. I accidentally managed to select it to create a live USB drive so now it has lost the ext4 file system and thinks it now has only a 3gb FAT partition on they system. I'm hoping there is a way I can get rid of the fat partition and to get the remaining ext4 partition back as I don't have a spare drive to copy the files over to.
I'm not sure how to do this however as the ext4 partition is only found when I do a search under no partitioned media, which then doesn't give me the option to write. When I do the search under "Intel" partition it only finds the FAT partitions I want to get rid of.

I've had a look under the documentation and else where and I can't find how to recover the data.
I'm posting as I don't want to FUBAR my drive completely.

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Accidentily turned a 3TB drive into a 3GB live thumb drive.

#2 Post by cgrenier »

It's probably EFI GPT as your disk is over 2 TB, PC Intel is a valid choice only if you have 4096 bytes sectors or disk smaller than 2TB.
Run TestDisk, Analyse, Quick Search, Deeper Search. Set the Linux ext4 partition as P(rimary). On next screen, choose Write, confirm.
In Advanced, select the ext4 filesystem and choose Superblock. After a reboot, use the fsck.ext4 command as root with the superblock location and block size provided by TestDisk.

owweeee
Posts: 3
Joined: 28 Jul 2017, 03:53

Re: Accidentily turned a 3TB drive into a 3GB live thumb drive.

#3 Post by owweeee »

After a deeper search the Ext4 partition doesn't comeup.

Code: Select all

Disk /dev/sdf - 3000 GB / 2794 GiB - CHS 364801 255 63

     Partition                  Start        End    Size in sectors

 1 E extended LBA             0   1  1 364800 254 63 5860528002
 5 L FAT12                  219  72 50   219 147 60       4736 [NO NAME]

Is it hiding as the extended LBA?

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Accidentily turned a 3TB drive into a 3GB live thumb drive.

#4 Post by cgrenier »

It's very strange as ext4 has backup superblocks, they should have been found during Deeper Scan...
You can always try TestDisk, Advanced, select the current Extended LBA, force the type to 83, SuperBlock.
If no superblock is found, press 'a' to manually add a 'virtual' Linux partition starting at "0 32 33" and search for superblock on this partition.

owweeee
Posts: 3
Joined: 28 Jul 2017, 03:53

Re: Accidentily turned a 3TB drive into a 3GB live thumb drive.

#5 Post by owweeee »

Thanks for the help,
I followed your instructions. but it didn't work. Thankfully though I found an old back up with enough of the files that it seemed easier to to just format the drive and start again.

Thank you again for your help.

Locked