Delete file partitions

So yes I am a noob i was formatting a drive and selected the wrong drive and now my windows drive does not boot. I am running ubuntu on an external drive when this happened.
The command i used was “sudo parted /dev/sdb --script – mklabel msdos” but the sdb drive is my windows drive. HELP!! I think that the rescue command will fix the partition. but I don’t want to destroy my drive.

Not much to do there, You can use fdisk to see if you can restore the previous partition table but even then, you may not be able to recover any data.

If you have another drive to attempt recovery to, you can use ddrescue to clone to that disk and see if you can recover the data that way. If you don’t have a spare disk but have enough space on the GNU/Linux disk, you can have ddrescue try to recover to a file.

Pro-Tip: when performing forensics or recovery, make a copy of the original disk and work on that copy.

4 Likes

I echo that sentiment exactly! even on drives I’m recovering files on before i wipe them.

1 Like