All files erased after installing Ubuntu

6,741

Solution 1

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.

Solution 2

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:
6,741

Related videos on Youtube

wifi
Author by

wifi

Updated on September 17, 2022

Comments

  • wifi
    wifi over 1 year

    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
    
    • James
      James about 13 years
      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.
    • wifi
      wifi about 13 years
      no, i can't find the ntfs partition...
    • samme4life
      samme4life about 13 years
      Can you please post the output of sudo fdisk -l (list of partitions)?
    • jet
      jet about 13 years
      also show us cat /proc/partitions - partitions detected by the kernel
    • wifi
      wifi about 13 years
      done, outputs in the description.
    • jet
      jet about 13 years
      I think your Windows passed away
    • Oxwivi
      Oxwivi about 13 years
      Hey, hey, I did the same yesterday with the same frickin' result!
    • wifi
      wifi about 13 years
      very frustrating... have you found any solution?
    • Oxwivi
      Oxwivi about 13 years
      Unfortunately not - since Ubiquity generally formats the hard disk, I did not bother trying to recover Windows data, since the NTFS structure would've been completely overwritten. I wanted to file bug on Ubiquity but Launchpad doesn't take any bugs for it, so I messaged the top contributor about the issue and still awaiting a reply.
  • wifi
    wifi about 13 years
    i suppose the partition table type is intel/pc right? (testdisk is asking for it)
  • wifi
    wifi about 13 years
    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?
  • Takkat
    Takkat about 13 years
    I'm not a recovery specialist, sorry. Photorec to recover individual files maybe?
  • Takkat
    Takkat about 13 years
    Glad to hear :)