LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-07-2004, 12:55 PM   #1
bioinfo
LQ Newbie
 
Registered: Aug 2004
Location: India
Distribution: Fedora Core 1
Posts: 9

Rep: Reputation: 0
How to reaload GRUB after Windows XP re-installation?


Hello all,
I was having windows XP and Fedora Core 1 installed and working properly with GRUB bootloader. Recently I had to reinstall windows. After that the boot loader disappeared. Now when I boot it directly goes to windows XP. What should I do to get the bootloader back without harming both OS?
Thank you..

Last edited by bioinfo; 08-07-2004 at 01:17 PM.
 
Old 08-07-2004, 01:36 PM   #2
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
take your boot-disk/floppy and boot your system with that - then reinstall grub (run the command to write the boot information to disk as you did the first time)
and you are all set again - Windows does this each time you install it - you cannot do anything about that - except: having a boot disk/floppy!

...I suppose, you do not have eigther one? (surely during install you where given the opportunity to create one)

We will have to continue in that case...
 
Old 08-07-2004, 01:40 PM   #3
bioinfo
LQ Newbie
 
Registered: Aug 2004
Location: India
Distribution: Fedora Core 1
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks jomen. Unfortunately I didn't create bootdisk during installation.
Can I do it with the Installation CD?
 
Old 08-07-2004, 01:44 PM   #4
bioinfo
LQ Newbie
 
Registered: Aug 2004
Location: India
Distribution: Fedora Core 1
Posts: 9

Original Poster
Rep: Reputation: 0
If I could get boot floppy what are the things I should do after booting from floppy? I mean, the commands...
 
Old 08-07-2004, 01:50 PM   #5
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi
bot up withur CD

at the boot prompt
type
#linux rescue

whcih will take u too redcue mode

at the recue prompt

#chroot /mnt/sysimage

wikll mount ur linux image to present directory

then
#grub-install /dev/hda

will install grub oin ur MBR

change for hda as hdb hdc hdd which is ur harddisk
regards
 
Old 08-07-2004, 02:23 PM   #6
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
This procedure from masand could work - I do not know, if you can boot your system up by using the Install-CD or if you are booting a rescue system when you are using you CD

Depending on what is the case - it could work. But I would make sure!

If it is a rescue-system:

type "mount" to see if and where _your_ system is mounted - I suppose it is not mounted - and for sure not by typing "chroot ..." !

if it was not mounted - mount it i.e on /mnt/rescue

mount /dev/hda? /mnt/rescue

chroot /mnt/rescue

/usr/bin/env -i HOME=/root PATH=/bin:/usr/bin:/sbin:/usr/sbin
--> to chean the environment and set a path

bash --login
--> to read the environment from _your_ system

grub-install /dev/hda

exit --> log out of bash

exit --> get out of chroot

reboot


If it brings you to your normal system - skip the chroot and only do:

grub-install /dev/hda


all is assuming that your system is on /dev/hda? (the first disk on primary controller) and the ? is the partition-number where your / partition is
 
Old 08-07-2004, 02:33 PM   #7
bioinfo
LQ Newbie
 
Registered: Aug 2004
Location: India
Distribution: Fedora Core 1
Posts: 9

Original Poster
Rep: Reputation: 0
Oh! It seems a little bit complicated... Ya, I'll try to understand it and do...May be an experimentation.....
Thank you for your help. I'll let you know the status.
 
Old 08-07-2004, 04:51 PM   #8
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi there
the procedure i was talking about
it works
i have treied it many a times
also the chroot thing
it is specified when we go into the 'linux rescue'
mode from the 1st CD
that we need to run the chroot command

then at the prompt we need to run lilo or grub,whatever required

regards
gaurav
 
Old 08-07-2004, 05:14 PM   #9
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
Hey masand!

I was just trying to be more specific...

IF the 1st CD does start a rescue-system - and IF the original system (I mean the / partition of the linux-system which can't be booted) is really automatically - and without giving any further commands - mounted on /mnt/sysimage - THEN it will (probably) work.

Since I don't have that CD - I was making sure it would work anyway - and with ANY other rescue-system - too (like a Knoppix-CD for instance...)

But thank you - I'm using lilo and the instructions I gave here, where written for the use of lilo. I took the command you gave (grub-install /dev/hda) and put it where I would have written "lilo -v"

I do not use grub and do not know, how to install it - I just trusted you, that this command would be correct.
 
Old 08-07-2004, 05:33 PM   #10
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
ya jomen
same for grub.
u can use

#grubinstall /dev/hda

in place of

#lilo -v

regards
gaurav
 
Old 08-07-2004, 05:38 PM   #11
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
cool...then he should be all set now!
 
Old 08-07-2004, 05:44 PM   #12
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
A little correction:

boot from the DISK 1

# linux rescue

once in there, follow the info on screen

you will get to the command line. once there:

#chroot /mnt/sysimage
#/sbin/grub-install /dev/hda

#reboot

You will now see GRUB once again
 
Old 08-08-2004, 12:09 AM   #13
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi jomen
it is
#grub-install /dev/hda

instead of
#grubinstall /dev/hda
(i missed the ' - ' there)


regards
 
Old 08-08-2004, 01:04 AM   #14
coasterfreak212
Member
 
Registered: Mar 2004
Distribution: Knoppix, Kubuntu, Gnoppix, Slax, Windows 98 & XP
Posts: 54

Rep: Reputation: Disabled
Had the same prob. But its no prob!Just get a win98 boot disk and wait until you can type fdisk/mbr. Nothing will appear just restart the system and you back on!Don't have a win98 boot disk? Download one off the internet on another computer bys searching google. Don't have another comp, than i can't help you
 
Old 08-08-2004, 01:57 AM   #15
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi coasterfreak212

we are discusing here to reinstall grub bootloader

not to uninstall grub boootloader as u have mentioned in ur post

regards
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
windows xp installation cd doesn't boot after suse installation thearchitect SUSE / openSUSE 8 09-09-2007 03:21 PM
How to reinstall GRUB after WIndows installation Oracbase Linux - Software 9 11-18-2005 08:43 PM
SuSE 9.1 and Windows Xp refuse to live in harmony: error loading windows through GRUB sanctumtacete Linux - Newbie 3 10-19-2004 07:47 AM
new windows installation + old grub Ian_Hawdon Linux - Software 1 10-01-2004 05:39 PM
Boot windows 98,windows XP and linux by GRUB Swift&Smart Linux - General 6 02-22-2003 09:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:59 PM.

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