Wednesday, July 14, 2010

Recovering ubuntu 10.4 after installing windows

It is my personal experience. I have installed windows after ubuntu and I lost it. Then I got help from ubuntu's site and took lots of time to find a way. However, if you are using ubuntu 10.4, and lost it after installing windows, then you can follow this, because it did work for me :D. However, I can not say correctly about earlier version of ubuntu. This is based on ubuntu's site, www.ubuntu.com


(Before recovering installed ubuntu, you must have a CD of ubuntu. If you do not have this, please collect this and then try. You can also download from the internet if you have high bandwidht.)

1. Log on into your ubuntu with live CD.

2. Open "Terminal" at "Applications"-> "Accessories" -> "Terminal".

3. Write "clear" command

4. Write "grub-install -v"

5. Then go to your drive, where your ubuntu was installed. Remember, Live CD also have "File system" drive. Do not get confused. Try to find out your drive.

6. Go to "boot" folder, then "grub" folder. You can see lots of files are there. If you have selected the right drive, then you can see them. If not, then please check step 5, carefully.

7. You will find "grub.cfg" here. Other version of ubuntu can find "menu.lst" here.

8. Go to "Terminal" again and write "mount | tail -1".

9. You will see output like this "/dev/sda2 on /media/0d104aff-ec8c-44c8-b811-92b993823444 type ext4 (rw,nosuid,nodev,uhelper=devkit)"

10. Now use TAB for completing the path. Hitting TAB can complete automatically. But I frequently used "Enter" for a few moment for getting the names of all files there.

11. Now go to "Terminal" again. Write " ls /media/0d104aff-ec8c-44c8-b811-92b993823444/boot". Here, your you have to copy and paste "0d104aff-ec8c-44c8-b811-92b993823444" which you have got after going to step 8. Only copy this part from there and write here in similar way.

12. You will find many things in output. If this does not come, then try in another partition.

13. Now write in "Terminal" "sudo grub-install --root-directory=/media/0d104aff-ec8c-44c8-b811-92b993823444 /dev/sda". Here you have to just replace "0d104aff-ec8c-44c8-b811-92b993823444" with your number after going to step 8.

14. This should be ok. If any BIOS warning is found, then you will get this message: sudo grub-install --root-directory=/media/0d104aff-ec8c-44c8-b811-92b993823444 /dev/sda --recheck

15. If ok, then comfirmation dialog will appear. Then task is done. You can restart and find your ubuntu back.


No comments:

Post a Comment