user-avatar
Today is Wednesday
May 8, 2024

Tag: windows

August 16, 2009

After windows reinstallation, Linux no longer boots!, How do I restore GRUB?, I have lost my GRUB, how do I find it again?, I have reinstalled Windows

by viggy — Categories: Uncategorized — Tags: , , Leave a comment

This solution is helpful when you have a LIVE CD.
Courtsey: Thinkdigit forum.
1. Boot from a Live CD, like Ubuntu Live CD or similar.

2. Open a Terminal. Go SuperUser (that is, type “su”). Enter root passwords as necessary. (in kanotix you need to set the passwd for root yourself. Use:
$ passwd root

3. Type “grub” which makes a GRUB prompt appear.

4. Type “find /boot/grub/stage1”. You’ll get a response like “(hd0)” or in my case “(hd0,3)”. Use whatever your computer spits out for the following lines.

5. Type “root (hd0,3)”.

6. Type “setup (hd0,3)”. This is key. Other instructions say to use “(hd0)”, and that’s fine if you want to write GRUB to the MBR. If you want to write it to your linux root partition, then you want the number after the comma, such as “(hd0,3)”.

7. Type “quit”.

8. Restart the system. Remove the bootable CD.

Source: http://ubuntuforums.org/showthread.php?t=42030

If the Step 3 doesn’t work, then instead of typing “su” and then “grub” type “sudo grub”. Then continue with Step 4.

Also if GRUB was your main boot loader then use (hd0) in Step 6, otherwise (hd0,x), where ‘x’ is your Linux Boot Partition (in case you are using some other boot loader, like Vista’s Boot Loader for e.g.).

But if you dont have a LIVE CD, then SUPERGRUB is a perfect solution. I have not used it myself, so cant give any good review about it. However you can find more details for your solution here.