Thursday, March 4, 2010

Recovering ubuntu 9.10 and XP after formatting

Hi folks everyone facing this problem like
If you are using dual OS say XP and ubuntu 9.10 then if you have an idea of formatting XP just format it and install newly then you can't see Frub2 list to select OS just tit automatically boots to XP.It means you lost your ubuntu 9.10 MBR so to recover ubuntu just follow these steps.Even i got the same problem.After googling i got the solution but not in clearly organized way so i am here explainin you to get over from problem.

1) insert your ubuntu 9.10(Karmic) Live CD

2)open Application->Accesories->Terminal

3)  sudo fdisk -l
      It list all your partitions note down you linux partition
 In my system its at /dev/sda5
sudo grub-install --root-directory=/media/sda5 /dev/sda

5)Now u recovered your ubuntu 9.10 type Exit and restart

6)It Lists both ubuntu and XP,Just Select XP
 It throws some error like device not found or anything

7) No need to suffer boot to ubuntu and open Application->Accessories->Terminal
 sudo update - grub

8)Now you recovered both XP and ubuntu9.10 MBR.

9)So enjoy with dual OS