How to loose everything and get it back

Posted on December 29, 2011

0



I had a dualboot laptop with windows XP and Ubuntu 11.10. I had the following partitions for Ubuntu:

  • partition for “/boot”. This was the boot partition
  • root partition “/”
  • swap partition

and an ntfs partition for windows and another one for the data.

After installing XP I have lost the partitions table and the windows boots up every time.

If I start an Ubuntu 11.10 I can see the followings:

1. fdisk sees all partitions:

$ sudo fdisk -l
omitting empty partition (5)Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x516d077aDevice Boot Start End Blocks Id System
/dev/sda1 * 63 81915434 40957686 7 HPFS/NTFS/exFAT
/dev/sda2 81915904 82403327 243712 83 Linux
/dev/sda3 82405374 144695295 31144961 5 Extended
/dev/sda4 86310912 144695295 29192192 83 Linux
/dev/sda5 82405376 86308863 1951744 82 Linux swap / Solaris

2. gparted sees nothing:

and this:

Tested guides:
https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows
https://help.ubuntu.com/community/Boot-Repair

I inserted an ubuntu 11.10 cd and used the following commands:

# sudo add-apt-repository ppa:yannubuntu/boot-repair
# sudo apt-get update
# sudo apt-get install -y boot-repair
# boot-repair

Boot repair repaired grub and created the following link:
http://paste.ubuntu.com/786852/

“Boot successfully repaired.
Please note the following URL:
http://paste.ubuntu.com/786852/
In case you still experience boot problem, indicate this URL to:
boot.repair@gmail.com
or to your favorite support forum.
You can now reboot your computer.”

Link to test:

http://gparted-forum.surf4.info/viewtopic.php?id=14763

Links to read:
http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step
https://help.ubuntu.com/community/Grub2

Advertisements
Tagged:
Posted in: Troubleshooting