Recover GRUB after Windows reinstall...

Status
Not open for further replies.

saurabh.sauron

Ambassador of Buzz
The Master Boot Record is erased after a Windows reinstall on a dual-boot. this is the method to recover GRUB in ubuntu and fedora core...

Fedora Core

Boot with a live cd that has grub. Issue these:
logon as root/type su in the terminal/konsole

grub (enter)

root (hd0,?)

(? being where your controlling distro is)
setup (hd0)

Alternative method

login as root/use su

grub-install /dev/hda


and then it will tell you that the installation is completed witout errors and you can reboot your machine

it can be done by any of the above methods.


Ubuntu

1.)Boot from the Live CD.
2.)Open the terminal. Quote:
sudo grub

this opens the grub prompt

find /boot/grub/stage1

this command gives a location (or two)

root (hdx,y)
this will inform u about the partition type

setup (hdx,y)

where x and y refer to the locations returned by the find command
restart and then GRUB should be there.

Source:- In a linux book
 
Last edited:

mak1012

Journeyman
Hi,
My problem is I have two hard drive in one xp and in another fedora, I can boot in both but by setting HD preference in BIOS, I wanna add xp in my grub How do go about this. My grub config look like this
Code:
#boot=/dev/sda
default=0
timeout=10
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
[B][B]title Windows XP
               map (hd0) (hd1)
               map (hd1) (hd0)
               rootnoverify (hd1,0)
               chainloader +1[/B][/B]

title Fedora (2.6.27.5-117.fc10.i686)
	root (hd0,0)
	kernel /boot/vmlinuz-2.6.27.5-117.fc10.i686 ro root=UUID=f26ce451-55a5-4c4d-90b7-c6122bace99f rhgb quiet
	initrd /boot/initrd-2.6.27.5-117.fc10.i686.img
title Other
	rootnoverify (hd0,4)
	chainloader +1

the text in bold I added to do but its not working at all. Please help.
 
Last edited:
Status
Not open for further replies.
Top Bottom