LinuxQuestions.org
Register a domain and help support LQ
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, 06: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, 06:36 PM   #2
bosewicht
Senior Member
 
Registered: Aug 2003
Location: Honolulu, HI
Distribution: Arch
Posts: 1,380

Rep: Reputation: 47
do u have the redhat discs? boot up with those (disc1)
 
Old 02-07-2006, 06: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 06:50 PM.
 
Old 02-08-2006, 06: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, 12:05 PM   #5
the ytse cem
LQ Newbie
 
Registered: Jan 2006
Posts: 7

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 12:45 PM
BIOS to GRUB/Linux Boot Slow After Disk Transfer donv2 Linux - Newbie 2 04-23-2005 12:48 AM
reinstall grub and make boot floppy hraposo Fedora 1 08-11-2004 10:12 AM
reinstall grub/lilo on MBR without cdrom boot lay_Z Linux - Newbie 5 03-12-2004 06:45 AM
how to wipe disk in best way to reinstall WinXP and Mandrake as dual boot jukebox4joe Linux - Software 3 01-23-2004 05:57 PM


All times are GMT -5. The time now is 09: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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration