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.

Yeah, I know I should have backed up my files before proceeding, I completely forgot. Well, the thing is that I had a dual-boot system with Windows 7 and Ubuntu 10.10. Yesterday, I installed Ubuntu 11.04 alpha 3 (through live USB). I chose that 11.04 would install over 10.10 on the installation wizard, where I have no important files. However, it overwrote Windows too, and its data, meaning that I can't find Windows as a grub entry and I can't find the corresponding NTFS partition. Is there some way to recover it? Thanks!

Here is the sudo fdisk -l output.

> > Disk /dev/sda: 160.0 GB, 160041885696
>     > bytes 255 heads, 63 sectors/track,
>     > 19457 cylinders Units = cylinders of
>     > 16065 * 512 = 8225280 bytes Sector
>     > size (logical/physical): 512 bytes /
>     > 512 bytes I/O size (minimum/optimal):
>     > 512 bytes / 512 bytes Disk identifier:
>     > 0x0004f536
>     > 
>     >    Device Boot      Start         End 
>     > Blocks   Id  System /dev/sda1   *     
>     > 1       19327   155241472   83  Linux
>     > /dev/sda2           19327       19458 
>     > 1046529    5  Extended /dev/sda5      
>     > 19327       19458     1046528   82 
>     > Linux swap / Solaris
>     > 
>     > Disk /dev/sdd: 3965 MB, 3965190144
>     > bytes 255 heads, 63 sectors/track, 482
>     > cylinders Units = cylinders of 16065 *
>     > 512 = 8225280 bytes Sector size
>     > (logical/physical): 512 bytes / 512
>     > bytes I/O size (minimum/optimal): 512
>     > bytes / 512 bytes Disk identifier:
>     > 0x00007732
>     > 
>     >    Device Boot      Start         End 
>     > Blocks   Id  System /dev/sdd1   *     
>     > 1         482     3871633+   c  W95
>     > FAT32 (LBA)

And the cat /proc/partitions output too

major minor  #blocks  name

   7        0     676440 loop0
   8        0  156290904 sda
   8        1  155241472 sda1
   8        2          1 sda2
   8        5    1046528 sda5
   8       48    3872256 sdd
   8       49    3871633 sdd1
share|improve this question
2  
Did it really overwrite Windows, or does Windows just not show up at the boot screen? First thing to do is boot off live USB again. If you did overwrite everything, you'll want to use the hard drive as little as possible. Next, I'd use the Disk Utility to see if there's still a NTFS partition. If so, Windows is still hanging around, and you'll want to look up editing the GRUB menu. –  James Mar 17 '11 at 16:33
    
no, i can't find the ntfs partition... –  wifi Mar 17 '11 at 20:36
    
Can you please post the output of sudo fdisk -l (list of partitions)? –  arrange Mar 17 '11 at 20:49
    
also show us cat /proc/partitions - partitions detected by the kernel –  jet Mar 17 '11 at 21:13
    
done, outputs in the description. –  wifi Mar 18 '11 at 16:21
show 4 more comments

2 Answers

up vote 3 down vote accepted

After a partition table has been accidentally overwritten you will need Data Recovery Tools to restore the remainders of your data. Mind that the likelihood for successful recovery decreases with every write access to your harddisk. Therefore best advice is to run these tools after booting from a live disk.

By installing

testdisk Install testdisk

you may be able to recover whole partitions. Included in the TestDisk suite you will also find the tool PhotoRec that helps to recover individual files even in the case a partition can not be restored or the drive itself has a hardware defect.

share|improve this answer
1  
i suppose the partition table type is intel/pc right? (testdisk is asking for it) –  wifi Mar 19 '11 at 14:15
    
Thanks for the help! Anyways, testdisk has found ntfs partitons, but says they cannot be recovered because they're actually bigger than the total disk size. how can that be possible? What should I do? –  wifi Mar 19 '11 at 14:57
1  
I'm not a recovery specialist, sorry. Photorec to recover individual files maybe? –  Takkat Mar 19 '11 at 15:02
    
yes, photorec is doing the job. thank you! –  wifi Mar 19 '11 at 16:22
    
Glad to hear :) –  Takkat Mar 19 '11 at 16:25
add comment

Sounds like the installer decided to butcher your entire drive. (i.e. it was set up to use the entire drive).

If that is what the installer did, then your windows data is, at this point, gone. Having said that, its unlikely you'll be able to recover it.

share|improve this answer
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.