Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I made a mistake in logging into my 200 GB Ubuntu partition. I could not access Grub after that. Using a live CD I then ran Boot_Repair and apparently deleted the partition, I guess because I ran it from my 70 GB Windows partition. I can send the results of boot_info before that and of Boot_Repair. Then I ran TestDisk, which apparently only found dev/sda/ -320GB / 298 / GiB - WDC - WD3200BEVT-22A23T0.

Was there any more I could have done with TestDisk? I looked at the TestDisk_Step_By_Step example and found no way forward given that no other partitions turned up

I have run gpart and found this:

/sda1 - 15 GB
/sda2 - system reserved
/sda3 - 70.15 GB
/sda4 - extended 212.84
unallocated - 209.10
/sda5 - unknown 3.74 . 

I have been told I can recover the partition using gparted's Rescue start end command, but I don't know what to enter for start and end.

EDIT: TestDisk Deeper Search stated that "the following partitions can't be recovered" and listed a 220-GB Linux partition 6 times. Then it stated that "The current number of heads per cylinder is 255 but the correct value may be 128" and I could try to change it in the Geometry menu (because apparently these are overlapping partitions) So should I do that?

share|improve this question
    
test disk has options to search for lost partitions - cgsecurity.org/wiki/… –  Karthik T Nov 27 '12 at 6:20

1 Answer 1

Since you have "unallocated" space (and only one chunk of it), as long as you only deleted one partition, I'd suggest using GParted (or your partition editor of choice) to create a new partition consuming all the free space, then mounting it read-only (mount -o ro /dev/sdaX /mnt/). As long as you mount it read-only, you shouldn't lose any more data.

Make sure you don't accidentally format the partition in the process! Namely, choosing a filesystem type in GParted will make it format the partition.

share|improve this answer
    
Thanks. I did reinstall in the linux partition after a previous mistake--but I hope that doesn't matter -- it wasn't deleted. but wouldn't I need to write the recovered data somewhere--i.e. what can be done to recover it once it is mounted read only? –  user110984 Nov 27 '12 at 15:16
    
If you can mount the partition read-only, then you can just mount it read-write. You don't have to do anything to get your data back, if you can mount it read-only, you can just use it however you did before. The only point of mounting it read-only first is so things don't get more messed up if it doesn't work. –  dririan Nov 27 '12 at 22:29
    
I also should note that you may not want to use GParted, and use fdisk instead. GParted has a nasty habit of running mkfs for you if you're not careful, which will format the partition, and make it much harder and/or impossible to get your data back. –  dririan Nov 28 '12 at 1:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.