Sorry, I know this is terribly basic.
I have a Dell laptop with a corrupted hard disk. I am trying to use testdisk with Ubuntu 12.10 to try to recover at least the recovery partition, if not the entire disk.
I succeeded in recovering the very small [dell-diagnostic] (or something like that) partition. To celebrate my success, I booted the computer off that partition. Now I've inserted my Ubuntu boot CD and the thumb drive on which I put testdisk and restarted the PC in Ubuntu.
Alas, I was unable to get testdisk to work again. So I deleted the directory into which I'd extracted it, and re-extracted it. I then renamed the directory into which it had been extracted "tdisk" (without the quotes obviously). I made the name tdisk in case the problem was from having both the executable file and directory named the same. (I had the problem described below several times in a row, and started from scratch each time --- that is, by deleting the files I'd extracted, re--unpacking the archive and then renaming the directory, whose default name was much longer and included the version number)
Then I typed
(pwd now reporting /media/SANDISK/tdisk for the rest of my terminal session both to save on typing and make sure any errors weren't from leaving out the path)
sudo apt-get install testdisk
Unfortunately, it came back with
E: unable to locate package testdisk
So of course sudo testdisk resulted in an error message.
sudo ls -l testdisk *
shows me that the file is indeed in the current folder
I am pretty sure I did it this way the first time when it worked.
So I need to know:
(1) What did I do wrong and how should I be doing this?
(2) Trial and error the first time showed me that 'sudo apt-get install testdisk' is a necessary step to be able to run testdisk. The only part of this command that I understand is the 'sudo' part. A *brief* explanation would be greatly appreciated -- I've had about enough of man pages today to last a lifetime <g>
(3) Note that testdisk is on a thumb drive, as I didn't want to write this to the hard disk, possibly resulting in a lower chance of recovery -- my Ubuntu boot device is a DVD. If I restart the computer after successfully using testdisk, how can I use it again without having to restart with sudo apt get-install testdisk? Not that this is all that hard, but I imagine that the testdisk executable persists if I understood what I was doing.
(4) As a result of reading the instructions and luck, I was able to get back that small [dell-diagnostic] partition. What I'm really interested in is the restore partition. I would like to save that on an external drive, put a new drive in this machine and then use the saved restorre partition data to reinstall Windows and whatever else came with the machine. Is it likely that, if I succeed in recovering the restore partition, that I can use it to make a fresh installation on the new drive? I don't necessarily feel compelled to put a restore partition on the new drive, as the user has never bothered to try this route or create restore disk. (I also have a two month old Windows 8 laptop here to repair that she dropped while it was running. I can't even make that one go into setup, give me the option to boot of an external drive or its built-in optical drive. The current laptop in question is less than a year old.)
I would like to apologize again for the simple question that's been answered 10,000 times already. This is very humbling because I am a Windows and OS X expert; before that I was a DOS expert. That came after CP/M. My unix/linux skills have always been weak at best. I'd really appreciate a good resource for learning basic unix/linux command-line stuff that goes beyond cd, mkdir, rm and chmod, which along witith pico and nn are all I know how to do in this environment. Reading man pages doesn't work well with me, and I think a real dead-tree or kindle book would be the best way for me to learrn in an orderly fashion. (Over 20 years ago, when I subscribed to my current mail and website provider, which also provides access to all the common unix shells via ssh, I inadvertently started a months-long flame war by asking if I should learn emacs or vi. When I later asked for a book recommendation, folks still remembered my emacs vs. vi question and the flame war started again, so I never got a good recommendation. So I am still using pico and generally helpless at a unix command-line.)
Finally, I feel compelled to admit that this isn't my PC. A client is paying me to do this; -- obviously I'm not charging by the hour. Otherwise I wouldn't bemoan the loss of Office and Norton.
Thanks for the help and apologies for the unrelated ranting above!