I've got this problem:

I have one hdd and use ubuntu 12.10 on this hdd with several partitions(one nfts, two ext4 and one unallocated). today after windows 7 installation, and booting with live usb, i see that the ubuntu partition is gone. No ubuntu boot. testdisk says:

 P HPFS - NTFS             12 223 20  6361 253 36  101998592
 P HPFS - NTFS          15887   1  4 87965 254 59 1157949065 [XYZ]
 L Linux                87966   1  1 91200 254 59   51970208

so any idea how to recover the partition or the data from it?

  • 1
    Have you tried using a Ubuntu live cd/USB to see if Ubuntu recognizes the partitions ? Windows overwrites the Ubuntu booloader, so if the partitions is still there, you will just have to reconfigure GRUB as documented here : help.ubuntu.com/community/… – Steffen Christensen Jan 18 '13 at 16:26

Installing Windows removed the Grub bootloader.

If you boot from a live USB and in a terminal type sudo grub-install /dev/sda where /dev/sda is your hard disk, you should get Grub back and Ubuntu too.

| improve this answer | |
  • 1
    hey, thanks for reply. the thing is, the partition with ubuntu is gone, not the grub. grub you can fix with auto repair tool :boot-repair. but this doesnt help. so, the partition with installed ubuntu should be recovered. gparted shows that partition as : unallocated. so what to do? – user124225 Jan 18 '13 at 16:41
  • PLs add the results of sudo fdisk -l to your question. If the partition is gone, then you might have to use the "recover partition" option in testdisk but stop using the hard disk. In any case, the windows install, will have caused a lot of data loss. – To Do Jan 18 '13 at 16:48
  • You can recover the partition if you stop using the disk right NOW. However as To Do mentioned it will likely have some data loss. You might be better just re-installing Linux. If you know the old partition sizies (which you do) you may be able to set your partition table back like it was and just keep going. – coteyr Jan 18 '13 at 17:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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