0

I have just installed Ubuntu 14.04 LTS, but by mistake I deleted all partition. Now I want to recover the lost memory by installing testdisk . But when I try to execute the command sudo apt-get install testdisk in Terminal I get this error message:

Unable to locate package testdisk

Why does this occur and what can I do next?

Bapi Saha
  • 459
  • 3
  • 11
  • 25
  • 1
    Do not use your disk any more, and follow my answer there: http://askubuntu.com/questions/286181/how-do-i-recover-my-accidentally-lost-windows-partitions-after-installing-ubuntu – Takkat Jan 21 '15 at 13:39
  • 1
    Are you positive your partitions were all deleted? Maybe the bootloader was just changed... If you're still running Ubuntu, or running a live dvd/usb, the command sudo parted -l (and maybe fdisk -l if you're using MBR) should list all your local disk partitions & current device names – Xen2050 Jan 21 '15 at 14:12

1 Answers1

0

Probably jsut need to do a

sudo apt-get update

first, and if testdisk's still not available you may need to use the universe, restricted, multiverse "sections" of the repos, see the possible dup. question "Unable to locate package" while trying to install packages with APT or Ubuntu's Repositories help.

But are you positive your partitions were all deleted? Maybe the bootloader was just changed... If you're still running Ubuntu, or running a live dvd/usb, the command
sudo parted -l
(and maybe sudo fdisk -l if you're using MBR only) should list all your local disk partitions & current device names, maybe they're still there.

If they were all deleted, then further writing to the disk could overwrite more data, and doing as Takkat suggests would be the best idea. I don't think you can repair a hard disk with testdisk while it's mounted anyway, and having a backup copy to "play/fix" with would be the safest option.

Xen2050
  • 8,705