LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Recovering GRUB on dual boot XP/RH box (http://www.linuxquestions.org/questions/linux-software-2/recovering-grub-on-dual-boot-xp-rh-box-526528/)

ericcarlson 02-07-2007 06:14 PM

Recovering GRUB on dual boot XP/RH box
 
Heres exactly what I did: I installed W2003 on a 20G disk and told it to use only 10G. Then I installed RH6 in the other 10G and got the nice GRUB menu letting me boot either. Then I got a virus with W2003 and realized I didn't want it as AVG wouldn't work, so I just installed XP from a boot CD and told it to hose the W2003 partition. That worked, but its taken out GRUB! I know I have a fully working RH system on the other partition so just need to get GRUB back. This must be easy without needing a full RH install again - right? Thanks in advance.

pixellany 02-07-2007 06:58 PM

You should be able to boot from the Redhat install disk and get into you Linux from there. Since the grub config file is already setup, all you need to do is get grub back in the mbr.

When the install CD boots up, see if you can get to a terminal using ctrl-alt-F1. If so, then do this:
(assumes IDE disk with Windows on partition 1, and Linux on 2)
Code:

grub   starts the grub shell
root (hd0,1)  tells grub that /boot is here  (note that grub counts from zero)
setup (hd0)  puts grub on the mbr


jot 06-05-2007 08:55 PM

it worked
 
Since Eric didn't reply, I just want to let others know - it perfectly works!

One little hint: be careful when typing the grub commands. It does not tolerate missing or extra spaces. So type exactly as what pixellany has written.


All times are GMT -5. The time now is 09:57 PM.