Saturday, July 3, 2010

Recover the lost Linux installation

Most common scenario I have found is when you have dual boot system (Linux/wndows) and you have to install windows again. Then the usual boot loader (grub) is overwritten by the windows boot loader (ntldr).In order to recover the lost Linux installation and re enable the Linux boot loader (grub), try the following steps. I have been following these steps for long time and works fine always..
1) boot the computer using Linux live CD
2)Open a terminal when you are in desktop and try enter following commands
sudo grub
grub> find /boot/grub/stage1
(hdx,y) # this will be the output
grub> root (hdx,y)
grub> setup (hdx)