LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (http://www.linuxquestions.org/questions/general-10/)
-   -   How to restore Grub after Win Xp install (http://www.linuxquestions.org/questions/general-10/how-to-restore-grub-after-win-xp-install-446952/)

MRMadhav 05-21-2006 07:38 AM

How to restore Grub after Win Xp install
 
Hi, I have a fedora core 5 installation and a windows xp on my computer. I want to re-install windows xp because of a very serios virus problem. But I am afraid of not being able to boot my fedora core 5 afterwards! I have the fedora core 5 rescue disk, can someone tell me what to do to restore my grub bootloader when i have finished installing windows?

rjwilmsi 05-21-2006 08:48 AM

I suggest you make a grub boot floppy diskette using your current working grub setup. After the XP reinstall, the FC 5 rescue CD should have an option to reinstall grub, but at least with the diskette you have a working backup. There is a command line way at http://www.linuxforums.org/forum/topic-38380.html
but FC's setup utility may be able to make one for you (YaST in SUSE 10 does) automatically.

MRMadhav 05-22-2006 02:01 AM

Thanks for your answer! But yesterday as it was getting late i tried to do it by myself and after installing WinXp i used the FC5 CD1 to boot, then i entered linux rescue and it corrected the error by itself. It was so easily done that i thought that i posted a thread for nothing!

rjwilmsi 05-22-2006 06:13 AM

Glad to help. Some things are easier than you think.

kingbolete 05-29-2006 12:08 AM

What do you do after "linux rescue"
 
What did you do after typing in "linux rescue" after booting off of FC5 CD #1? Mine just mounts the partition as /mnt/sysimage and dumps me at a command line?

corbintechboy 05-29-2006 02:08 AM

Boot with a live cd that has grub. Issue this:
as root
grub (enter)
root (hd0,?) (? being where your controlling distro is)
setup (hd0)
quite

Done!

dantistus 05-30-2006 05:57 AM

Agreed to antimicrosoft, that would certainly help you!

XavierP 05-30-2006 08:54 AM

dantistus - while signatures are pretty unmoderated, a single sig block being bigger than the sum of all of your posts is a bit lame. Could you dial down the size of the font used please - or else I will have to think that your sole reason for being here is to advertise your wares. And that's a bannable offence.

MRMadhav 06-02-2006 07:11 AM

Its much easier than that!
 
Hi Kingbolete, when you get to the command line you just have to type

grub-install /dev/hda

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

astriskmanish 06-04-2006 03:12 PM

grub not installing.. :(
 
hi all,
firstly i got some problem on my WINDOWS so i formatted it then after that my GRUB goes off.. :(
so after that i tried to install it by following procedure..
i booted my PC with a live cd n mounted the linux partation then go to that directory using this command
sudo chroot /x (where /x is the directory in which i had mounted my linux partation)then i issued the command
grub-install /dev/hda6 (hda6 is the partation in which my root is there i dont have any boot partation as at the time of installation i made only two partation root and swap).
So after that command it says that
/boot/grub/stage1 not read correctly
so can any one suggest me what to do??
Ya i m using UBUNTU.

MRMadhav 06-05-2006 07:38 AM

u should not use grub-install on /dev/hda6 but on /dev/hda , thats what i did as my linux was on hda4 and my windows on hda1.

a.adlyy 06-05-2006 08:03 AM

hi astiskmanish :
i think u should install it on hda1
grub is working in boot

diogobaeder 06-30-2006 03:19 PM

Restore GRUB with SATA drive
 
Hi, guys... can anyone help me on this?

Iīve got 3 drives: 1 IDE (hda in linux) and 2 SATA (sda and sdb in linux). I managed to install Fedora 5 in the second partition of the first SATA drive (sda2 and sda3), and I chose to use GRUB with Linux as default, over the Windows XP boot loader.

I tried many commands, but I just canīt get GRUB to work, so that my computer only boots to Windows XP (witch has an internal dual-boot for two Windows instalations).

Iīve tried the "linux rescue" thing, but it didnīt work, itīs not able to recognize something, so, what can I write after "grub-install /dev/"? Is the correct answer "grub-install /dev/sda2"? I want GRUB to be written to the MBR, so, Iīm confused if I have to put the above or "grub-install /dev/hda"...

Well, thanks a lot, in advance!

diogobaeder 06-30-2006 03:47 PM

Additional information
 
Oh, and I forgot to mention:

When I try "grub-install /dev/hda" or "grub-install /dev/sda" (where my Fedora is trully installed), it returns this error message: "...does not have any corresponding BIOS drive". How? I tried twice to install Fedora, and the disc test passed!

Well, just waiting for help... thank you again!!!

MRMadhav 07-01-2006 02:38 PM

Well i don't know much about this but i think that you should try to find out which drive is the Primary Master as the bootloader is usually installed in that drive.
Try to look at the last post of this thread it might help:
http://www.linuxquestions.org/questi...d.php?t=315424


All times are GMT -5. The time now is 12:37 AM.