1

So, my configuration is with 2 separate physical drives. One with Linux one with Windows. Boot selection I am doing from bios (Linux was installed without the windows SSD plugged in). Everything was sugar and nice until I need it to reinstall windows and from Windows 10 installer by mistake I deleted also the SSD with linux. I immediately realized and did nothing over it hoping that there will be a queue of events that will be triggered by a "apply changes to disk" but this was not the case.

Is there any way how I can recover my partition? thank you!

Vlad
  • 363

1 Answers1

2

You may find some help here under the section titled "Lost Partition" https://help.ubuntu.com/community/DataRecovery

Lost Partition

If you made a mistake while partitioning and the partition no longer appears in the partition table, so long as you have not written data in that space, all your data is still there.

GNU Parted

Run Parted from the command line to recover your partition.

When changing the partition table on your hard drive, you must ensure that no partition on the disk is mounted. This includes swap space. The easiest way to accomplish this is to run the live cd. Parted is installed on the base Ubuntu system. Once at the desktop, open a terminal and run_:

sudo swapoff -a

Next run parted and tell it to use the device in question. For example, if your /dev/sda drive is the drive from which you want to recover, run:

sudo parted /dev/sda

Then, use the rescue option:

rescue START END

where Start is the area of the disk where you believe the partition began and END is its end. If parted finds a potential partition, it will ask you if you want to add it to the partition table.

Testdisk

Alternatively, the testdisk application may recover your partition. Use any method to install the testdisk package.

Run testdisk and it will scan your computer for media and offer you a menu-driven way to recover your partition.

sudo testdisk

Gpart

Another program that can scan drives and re-create a partition table based on "guesses" is Gpart. Use any method to install the package gpart.

To scan the first hard disk using default settings type

sudo gpart /dev/sda

or

sudo gpart /dev/hda

depending on your Ubuntu version.

You can restore the "guessed" partition table, only after checking it very carefully (you're strongly advised to write to another device instead), using

sudo gpart -W /dev/sda /dev/sda
Eliah Kagan
  • 119,640
rkeaing
  • 1,634