So my computer crashed and as of now I am currently running Ubuntu 12.04 on a USB. I'm using the try option because for some reason it won't let me do a full install. I researched and realized that may have to erase my entire hard drive before I can do a reinstall. If this is the case I would like to know if there is anyway I can retrieve the data I had store on my partition. Under the try option I don't have permission to access my own files and am unsure if I can recover them if I do a hard reset. If anyone has any helpful suggestions I would appreciate it.
I tried all the helpful suggestions and none of them worked so instead I just re-installed 12.04 back on my hard-drive. I was able to recover videos I had stored but none of the documents that I had saved. Thanks for the help.
32 Answers
If all fails, there is another option that will work almost for sure if the drive is not broken:
At least one of your partitions (not the data partition) needs to be large enough to contain the system (6GB). If that is the case, start the installer ("Install Ubuntu") and walk through the steps until the window: "installation type". Choose "something else".
In the partition overview (in the next window), select the partition you need to save the data from, and choose "change" (next to the +/-). Choose the same filesystem as the partition already is, set the mount point to /rescue or something.
Assign the swap partition (it is already there) and do not reformat /rescue. Set the mountpoint of one of the other partionos to / and install Ubuntu. After installation is finished, the files will be in /rescue.
If you do not have a "spare" partition, you would have to resize the data partition first to be able to create a partition that can hold the system.
"Crashed" could mean many things. Perhaps you just borked grub, so you can't boot. Maybe the disk drive is truly dead. First thing to do is not write anything to the disk drive you want to salvage until you know a bit more.
Since you're able to boot to a live USB, sudo fdisk -l in a terminal menu should show you all the drives your live USB booted system sees. If the hard drive in question is listed, that's a good sign.
Now you have to decide what that information on the drive is worth to you. If you have a recent backup, you might want to move ahead with a re-format and reinstall, wiping everything and starting over. If you don't have a recent backup, and there's something you really don't think you can lose, you could perhaps use dd to make a bit-by-bit copy of the questionable drive onto a USB drive of larger capacity, then try to recover data from that copy so you don't destroy the original.
Of course, it the live USB Ubuntu you're booting from doesn't see the drive, you're probably hosed.
24