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 have extremely important stuff on my windows partition which during the ubuntu 10.10 installation,when it said that I should create something called swap space, I selected it to be a swap space (without even knowing what it actually meant)

The Grub2 doesn't show up so I don't get a choice to boot Ubuntu or Windows. I don't get my windows partition as a removable device in Ubuntu either. When I go to disk utility and select the sda2 (i.e.. my windows partition) and click edit partition and select HPFS/NTFS for the type and tick bootable and click OK the small processing sign keep on rotating on the bottom right of the sda2 in the chart and after about 10 to 15 minutes it gives an unknown error and thus, I am still unable to use my windows.

I am even worse than a beginner who doesn't know a thing about Ubuntu so please be patient and help me out.

share|improve this question
    
Sorry, but I am guessing you lost the data on your Windows partition if you formatted it to a Swap partition. Also you might have lost your chance to recover data if you were trying to format the same partition again and again. Ofcourse I might be wrong, so until a pro comes along and gives you a suggestion to come out of this, sit tight and brace for impact. –  nitstorm Jan 26 '12 at 18:41
    
@nitstorm Yes, you might be wrong. Most probably, he has only overwrited the headers of the partition to create a SWAP space and changed its type in the partition table. But its contents may be safe. –  jmendeth Feb 6 '12 at 18:26
add comment

2 Answers

Don't let the panic invade you. Before trying anything, follow this steps:

Note: to open a program, just press Super to open the dash, and search for its name.

  1. Don't turn your computer on. Instead, go get a Ubuntu live-CD and boot with it.
  2. Immediately after it has booted, open a Terminal and disable the swap partition with:

    sudo swapoff -a
    

    It's very important to do that, or your Ubuntu will overwrite the contents of the partition when it gets out of memory.

  3. (Optional) If have an external disk with enough space, save a full copy of your drive on it:

    sudo apt-get install gddrescue
    cd /media/your-external-disk
    ddrescue -v /dev/sd? backup.dd state.log
    

    Be sure to replace the ? with the letter of the damaged drive.
    Run GParted if you don't know which one is it.

  4. Install testdisk with:

    sudo apt-get install testdisk
    

    and then run it with sudo testdisk.

  5. This is the program that may save your bacon!
    Then, just follow these steps very carefully.
    If you're lucky, you will be able to access your original files and restore your partition back!

share|improve this answer
add comment

Probably you will not be able to access that partition from your ubuntu installation because its being used as swap space and should not be ummounted. You can try using a live cd like parted magic http://partedmagic.com/doku.php?id=start to boot and access your sda2 partition from there. If you didn't use a lot your ubuntu system after the install, probably you still can recover your data in that partition, but also it is very probable that your data was overwritten and lost when the partition was used as swap for your ubuntu system.

You can try using Testdisk from the parted magic live session to recover your ntfs partition

share|improve this answer
1  
Yes, it's swap space, but it can be deactivated with swappoff a and treated like any other partition (see my answer). –  jmendeth Jan 26 '12 at 19:18
    
@jmendeth i didn't know about that, very useful tip :) –  zurdo Jan 26 '12 at 21:34
add comment

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.