3

I have Windows installed on my PC. I have tried to install Ubuntu 14.04, but unfortunately instead of creating a new partition, I chose the first option "Erase everything". I canceled it, but when I restart my PC, no operating system appears.

Could you please help me?

3
  • Please check askubuntu.com/search?q=partition+recovery
    – Achu
    Apr 25, 2014 at 16:15
  • I'm running a live version of ubuntu. Do you suggest that i try to install testdisk?
    – user274203
    Apr 25, 2014 at 16:19
  • testdisk is portable(you don't need to install it) and please consider following this step carefully cgsecurity.org/wiki/TestDisk_Step_By_Step If you are going to use testdisk. There are many partition recovery tools and reading their documentation is easy way out.
    – Achu
    Apr 25, 2014 at 16:24

3 Answers 3

2

You will need to recover your partitions, and then attempt to re-install grub using boot-repair. Hopefully the data within the partitions is still intact.

Steps:

Step #1

Boot an Ubuntu livecd

Step #2 In terminal type

sudo parted /dev/sda 

[This selects drive "sda", if you need a different drive then change appropriately.]

Step #3 In Parted type

rescue

[To exit Parted type "quit".]

Step #4

Install and run boot-repair.

[I won't type all that out as the Ubuntu community already has an excellent set of instructions available here: https://help.ubuntu.com/community/Boot-Repair .]

Notes:

Note #1

Attempting to recover deleted partitions doesn't always work, but it is always a risk. You could make things worse! If you have important data on the drive you are attempting to recover you should always perform a backup first. If you can't access the data use dd to make a sector based backup of the entire drive or partition and save it as a file.

Note #2

If Parted fails to recover your partitions you can always try Gparted which also has a recovery feature. To install Gparted type "sudo apt-get install gparted" though it's often included on Ubuntu livecds.

Note #3

After successfully recovering your partitions instead of running boot-repair you could re-try using your Windows installation disc's repair feature as it might now work.

Sources:

http#s://help.ubuntu.com/community/Boot-Repair

http://postbin.per.red/pages/article24/page.php

1
  • I don't know what values should i insert in start and end
    – user274203
    Apr 26, 2014 at 11:30
1

Try to use ubuntu boot-repair; and, hopefully, your windows loader hasn't messed up. If it doesn't work, you can try to use a recovery tool (usually vendors includes some recovery tools and recovery partition with the sold computer) to restore windows to a previous working state.

2
  • I've used the windows boot repair, but it does not find a restore point.. FML..
    – user274203
    Apr 25, 2014 at 20:23
  • euu @user274203 I said ubuntu boot-repair. have you tried with that tool??
    – Akronix
    Apr 30, 2014 at 23:21
1

Personally I'd suggest using Gparted over Parted since it's way easier, and it will search for all your partitions instead of you having to tell it where to find each one. That said if Gparted fails then Parted would be the next one to try because it allows you to specify where to search and works quite well.

Regarding your comments on Mango's answer for using Parted. Ideally a start and end value would specify the span of the partition you wish to recover. If you have multiple partitions you will need to search multiple times. The value is done using megabytes by default. If you have 1 partition on your hard drive and your hard drive is 40 gigabytes then you'd use a start of "0" and an end of "409600". If you have 2 partitions then the second partition would have a start value matching the end value of the first partition. For example partition one start 0 end 204800 and partition 2 start 204800 and end 409600. Remember these are just approximates it's okay if your off. If you don't know the sizes then use something like start "0" and end "500" as this should at least find the first partition on the drive. However I recommend Gparted as a first try because you don't need to enter size and things.

You can find some other suggestions here: https://help.ubuntu.com/community/DataRecovery

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