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 deleted the Ubuntu [ 12.10 ] Partition by accident from Windows 8.

I tried everything I saw on internet, but still I couldn't make it.

Is there a way to rescue Ubuntu from Windows 8 ?

Edit after Eliah's post

Actually my first problem occured when I restarted the system, there was "no such partition grub rescue>" problem, so I tried to fix that. First I tried Ubuntu LiveCD, I wrote necessary commands of Testdisk and Gpart to Terminal, but it didn't work. Then I tried the "Boot-Repair", it worked great. Now I can log into Windows 8, but I just can't figure it out how to rescue my Ubuntu.

Actually, I generally put my documents to Dropbox, but I had some very important Python scripts and large files located in Ubuntu's Home folder, and I customized Ubuntu for very long time, I really want to rescue Ubuntu, my last choice is starting over.

Edit 2 after Eliah's Post

my sudo fdisk -l output:

Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *        2048     3074047     1536000    7  HPFS/NTFS/exFAT

/dev/sda2         3076094   251176274   124050090+   f  W95 Ext'd (LBA)

/dev/sda3       251176960   488408129   118615585    7  HPFS/NTFS/exFAT

/dev/sda5        23551353   116647964    46548306    7  HPFS/NTFS/exFAT

/dev/sda6       149452758   251176274    50861758+   7  HPFS/NTFS/exFAT

output of parted -l

Error: Can't have a partition outside the disk!     `                      
Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only.
Error: Can't have a partition outside the disk!`
share|improve this question
add comment

1 Answer 1

For the General Case of an Ubuntu Partition Accidentally Deleted

If you tried techniques to try to recreate the partition, it's likely you've made it even harder to recover. On the other hand, if you've tried proper techniques for undeleting the partition or trying to recover it, that may be very helpful. Either way, it's important you edit your question to include as many details as possible about what you've done since you deleted the partition.

If you don't have documents or other important files in the Ubuntu system (or you do, but they have at least one good backup somewhere else), then I strongly recommend starting over, installing Ubuntu again. It's faster, easier, and less stressful than attempting data recovery.

If you're going to attempt to recover a lost Ubuntu partition, first, read this Ubuntu community wiki page, it's excellent documentation.

As that says, if you mess up your partition table (including by removing partitions), but you don't write data to the inside of where your partitions used to be, your data are intact. This might be one off those nice scenarios. So try these techniques first.

Depending on what you did after you deleted the partition, this might be very simple. I recommend trying GNU Parted's rescue functionality. But if you've decided to attempt to recover data, you should at least run TestDisk and Gpart, too.

(If you need clarification or are able to give specific information about how the partitions were destroyed or about the other things you've tried, that might make it possible for us to help further.

Good luck!

For the no such partition grub rescue> Scenario

If you deleted a partition and then saw this, that's because you deleted the partition.

But error this does not necessarily mean you deleted a partition! If you don't specifically remember deleting the partition in Windows, then you should:

  • Check if the partition is still there. You can run sudo fdisk -l or sudo parted -l (I usually run both).

  • If it is not, continue attempting to rescue it. (Or give up. But it sounds like you feel comfortable attempting data recovery--having already done so--and you're willing to put more time into it, so just as long as you know it might not succeed, go for it.)

  • If it is still there, try reinstalling GRUB to the master boot record (in this situation, I'd suggest a chroot-based method like this one, but really any method here or here that you haven't unsuccessfully tried yet, should be attempted.

    If that doesn't work, try these methods for totally removing GRUB and then putting it back.

    If that doesn't work, try using a Windows install DVD/USB, Windows rescue disk (which you can make yourself), or Windows trial install DVD/USB (usually freely downloadable from Microsoft's website) to reinstall the Windows boot loader. Boot into Windows and see what it says about the partition table (but don't modify anything in what might be the Ubuntu partition or where it used to be). Since you have Windows 8 and probably a UEFI system, try going through this (again?) and make sure all the settings are correct.

  • If you are not sure if it is there, or you don't understand what you're seeing (for instance, in the output of sudo fdisk -l or sudo parted -l), or you want to be extra cautious, ask for help! You can edit your question to add the output of those commands.

    (People with similar problems where this question doesn't solve it can post a new question, including the output of those commands and any other information that distinguishes it from this question, as well as what makes it similar.)

share|improve this answer
    
I edited Eliah, Thanks. –  forochelian Jan 14 '13 at 18:55
    
@forochelian I've edited my answer to provide information about the situation you've just described. –  Eliah Kagan Jan 14 '13 at 19:13
    
when I check out all partitions in Windows 8, I see "Free Space" where Ubuntu should be. I remember clearly that I was trying to format an another free space, but when I was trying to do that, the Ubuntu partition suddenly deleted too. I know I didn't select the Ubuntu partition, but it just gone. ***I run sudo fdisk -l before, I couldn't see Linux sda. –  forochelian Jan 14 '13 at 19:35
    
Yeah you are right. I think that was extended partition, not the Free Space. I tried your suggestions, none of them worked. I also edited the question, I added an output. –  forochelian Jan 14 '13 at 19:59
    
I edited the question. –  forochelian Jan 14 '13 at 20:26
show 2 more comments

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.