Accidently GPTed wrong drive

I got a new SSD external USB drive.intending it for backup. Formatting it to ext4 kept creating errors. Than I remembered GPT. So going into terninal I Did

parted /dev/sda mklabel gpt

Yes I was a bozzo and picked the wrong drive. As long as I am mounted I can still use it… Rebooting and than trouble really starts.

sda           8:0    0 931.5G  0 disk 
├─sda1        8:1    0  65.2G  0 part /home
├─sda2        8:2    0  57.2G  0 part /Videos
├─sda3        8:3    0 105.6G  0 part /home/****/Partitions/VA
├─sda4        8:4    0 117.3G  0 part /home/****/Partitions/VB
├─sda5        8:5    0 117.3G  0 part /home/****/Partitions/VC
├─sda6        8:6    0 117.3G  0 part /home/*****/Partitions/VD
├─sda7        8:7    0 117.3G  0 part /home/*****/Partitions/VE
├─sda8        8:8    0 117.3G  0 part /home/******/Partitions/VF
└─sda9        8:9    0 117.2G  0 part /home/******/Partitions/VG

/dev/sda1: LABEL=“home” UUID=“ba7cb6b7-a319-4d4a-868f-bdca4fc94f3e” BLOCK_SIZE=“4096” TYPE=“ext4”
/dev/sda2: LABEL=“Videos” UUID=“040e631a-349b-4735-bec8-07df04ff8342” BLOCK_SIZE=“4096” TYPE=“ext4”
/dev/sda3: LABEL=“VA” UUID=“1045fc46-4a83-4180-9150-8c997a230e99” UUID_SUB=“a6729b66-ade9-4ac1-9cfb-f7282e83e7e3” BLOCK_SIZE=“4096” TYPE=“btrfs”
/dev/sda4: LABEL=“VB” UUID=“a52f518e-0fe2-47a2-b313-dfb938dc1c8e” BLOCK_SIZE=“4096” TYPE=“ext4”
/dev/sda5: LABEL=“VC” UUID=“e9c78e78-522b-4a18-ad6e-1192c600cbf9” BLOCK_SIZE=“4096” TYPE=“ext4”
/dev/sda6: LABEL=“VD” UUID=“0d7b716a-dd90-497b-9976-8118372c6cad” BLOCK_SIZE=“4096” TYPE=“ext4”
/dev/sda7: LABEL=“VE” UUID=“67b66f14-cdb8-4c12-94eb-b0eb14a2bb13” BLOCK_SIZE=“4096” TYPE=“ext4”
/dev/sda8: LABEL=“VF” UUID=“75e8521b-f184-403c-819e-6a4916e0007d” BLOCK_SIZE=“4096” TYPE=“ext4”
/dev/sda9: LABEL=“VG” UUID=“637f7c1e-7231-4616-aea4-338d74a9b637” UUID_SUB=“90a022fc-379a-4530-8c5b-e23d2ded0a44” BLOCK_SIZE=“4096” TYPE=“btrfs”

type or paste code here

I believe if I were to recreate the exact partions than I could be back in business? Not sure what the exact block the breaks came… Because I do know I had put in unknowns at the beginning and end. I am running testdisk right now which will give better as regards to block numbers.
Is there a simple way to recover my deleted partitions with everything in it, or is that all lost? As I said as long as I am mounted I can keep going. I just need mind partition atbles.

It is possible, but precarious.

I’ve done it myself (on purpose, to see if it could be done), but that was back on an MBR partition table.

I had the exact positions of the entire layout saved in a notepad text file, in which I used fdisk at the time to re-create the the original partition table/layout on the disk. It worked.

However, some caveats:

  • It was a test that I “messed up on purpose”, and wanted to see if I could theoretically recover from it.

  • It was an MBR layout (not GPT).

  • I had all the relevant information of the original layout saved in a text file. Every single position, size, type, etc.

  • I did not do ANYTHING to the drive AT ALL, except for the one specific thing (create a new partition table on purpose.) I did not do any formatting nor use any recovery software.

While the system is running:

This may be a good time to make a last BACKUP :wink:

Make Backups:

P.S. : everybody has such times :crazy_face:

1 Like