LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-07-2006, 05:29 PM   #1
the ytse cem
LQ Newbie
 
Registered: Jan 2006
Posts: 7

Rep: Reputation: 0
how to reinstall grub with no linux access or boot disk


Hi all,

The story is long but I'll just try to cut to the chase. I used to run Win XP and Red Hat 9 on the same drive. Then something happened and I had to "fixmbr" to access my Windows installation. Now I want to reinstall grub on MBR so that things are the same again. I have no boot diskette.

Also, I cannot write a grub.conf file all by myself, I'll forget the switches and stuff. So I should be able to tell grub to find the grub.conf file which is already on (hd0,2) /boot , when I'm reinstalling it...

Thanks a lot.
 
Old 02-07-2006, 05:36 PM   #2
bosewicht
Senior Member
 
Registered: Aug 2003
Location: Houston, TX
Distribution: Arch
Posts: 1,381

Rep: Reputation: 47
do u have the redhat discs? boot up with those (disc1)
 
Old 02-07-2006, 05:47 PM   #3
accessrichard
Member
 
Registered: Apr 2005
Distribution: Fedora Core (latest version)
Posts: 156

Rep: Reputation: 30
From installation cd's, put in disc 1, enter rescue mode

To re-install grub on the MBR
#chroot /mnt/sysimage
#grub-install /dev/hda

In case your grub.conf file doesnt load windows after you re-install grub, try editing grub.conf to resemble something like the below (this is for a single hard drive with xp and linux)

title Windows XP
rootnoverify (hd0,0) #hd0 is hard drive number and 0 is partition
chainloader +1


Since I do not want to be responsible for anything that goes on with your computer please google.com/linux

add windows XP to grub.conf (your distro name)

and

install grub on mbr (your distro name).

I would feel bad if something went wrong on my account.

Last edited by accessrichard; 02-07-2006 at 05:50 PM.
 
Old 02-08-2006, 05:34 AM   #4
the ytse cem
LQ Newbie
 
Registered: Jan 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Don't worry. If anything goes wrong I'll fixmbr again and revert to my current state. Thanks a lot, I'll try it now.
 
Old 02-08-2006, 11:05 AM   #5
the ytse cem
LQ Newbie
 
Registered: Jan 2006
Posts: 7

Original Poster
Rep: Reputation: 0
OK, I've done it. Thank you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need to access /boot/grub/menu.lst and /boot/grub/device.map neouto Linux - Newbie 8 09-04-2005 11:45 AM
BIOS to GRUB/Linux Boot Slow After Disk Transfer donv2 Linux - Newbie 2 04-22-2005 11:48 PM
reinstall grub and make boot floppy hraposo Fedora 1 08-11-2004 09:12 AM
reinstall grub/lilo on MBR without cdrom boot lay_Z Linux - Newbie 5 03-12-2004 05:45 AM
how to wipe disk in best way to reinstall WinXP and Mandrake as dual boot jukebox4joe Linux - Software 3 01-23-2004 04:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration