Blown away partition table and partitions by bad format command

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
DismissedPotato
Posts: 1
Joined: 30 Sep 2021, 22:45

Blown away partition table and partitions by bad format command

#1 Post by DismissedPotato »

Howdy,

I REALLY messed up and am not sure how to proceed...

I have a dev workstation with a 512GB Samsung SSD that multi-boots Windows 10, OpenSuse, and Ubuntu. I was making space for one more testing distro when I blasted everything with a bad format command. After creating the new partition successfully, I ran the following incomplete command by not designating the specific partition to format: mkfs.ext4 /dev/nvme0n1 (should have been /dev/nvme0n1p8). Now there is no partition table and one whole disk ext4file system where I used to have a partition table with the happy little partitions.

I've tried to use TestDisk (via SystemRescueCD) multiple times to recover the table and partition information, but no joy. TestDisk states that there is no partition table and any attempts to scan (normal or deep looking for GPT) only find the new invalid file system and gives nothing to recover.

The only thing I have done is reboot the workstation once into SystemRescueCD in order to run TestDisk and do a few scans. At this point, I'm stumped with this specific situation and quite terrified to do anything so I thought I would reach out and see if anyone could assist. TestDisk is just awesome and has always been able to bail me out, but then again, I've never messed up this badly! ;-)

Thanks much!

recuperation
Posts: 2719
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Blown away partition table and partitions by bad format command

#2 Post by recuperation »

DismissedPotato wrote: 30 Sep 2021, 23:49 I've tried to use TestDisk (via SystemRescueCD) multiple times to recover the table and partition information, but no joy. TestDisk states that there is no partition table and any attempts to scan (normal or deep looking for GPT) only find the new invalid file system and gives nothing to recover.
I have no explanation for this behaviour.

Locked