LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 07-31-2004, 05:51 AM   #1
niteshadw
Member
 
Registered: Sep 2002
Distribution: CentOS
Posts: 170

Rep: Reputation: 15
Reinstalling Grub after Installing XP


I've had to reinstall windows xp so the mbr was rewrittend by windows, I've used the rescuse-cd and the cd1 of the install and tried both:
fdisk -l but all it does is prints the partition table
/sbin/grub-install /dev/hda but it says there is no such directory (sbin/grub-install)

I've done this under FC1 and all was fine, but I'm wondering why is thing happening under FC2...anyone has any suggestions? Thanks...
 
Old 07-31-2004, 06:44 AM   #2
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
fdisc -l does just what you told it to do - the -l parameter tells it to list your partition table...

Do you have more than one disc - then you would need to give the device-name too as an argument like:

fdisc -l /dev/hd?

All you need fdisc for is doing this - seeing, what is actually there - there is (probably) nothing to change here - writing anything here could mean changing your partitions and would end in desaster...

As for grub - I'm sorry but I cannot comment on that since I'm using lilo and am not familiar with setting up grub

If grub-install is really installed properly (and the name is correct), you would not need to give the path to the program like you did - maybe it is in /usr/sbin ?

Try "which grub-install" and if it is there its location will be printed out.

You could also use this - this could take a while - it searches throug your whole filesystem...

find / -name 'grub-install' -print
 
Old 07-31-2004, 06:48 AM   #3
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Try doing the following. Run your installation disk, get into rescue mode. When everything has been loaded or configured and you are dropped to the command prompt, type "cd /mnt/sysimage" and then run "grub-install /dev/hda" and reboot your system. Grub should be reinstalled.

Last edited by reddazz; 07-31-2004 at 06:50 AM.
 
Old 07-31-2004, 07:20 AM   #4
niteshadw
Member
 
Registered: Sep 2002
Distribution: CentOS
Posts: 170

Original Poster
Rep: Reputation: 15
Ok..I just fixed it..burning the ISO images to a cd-rw was a pain, I don't know if its only me but whatever the cd is, cdrw or cdr, half of the times the cd does not boot or there is some error with the boot img..blah....so that took me about 20 minutes to even get into the rescuse mode to try to what I've forgottoen..grub itself....first I forgot to do:
chroot /mnt/sysimage

and then execute:
/sbin/grub-install /dev/hda

but that still gave me an error:
"Cound not find device for /boot: Not fond or not a block device

I was a bit weird, but then I've treid running grub so I did
#grub
root (hd0,2)
setup (hd0)
quit
#reboot

and it boots...well linux..hehe...hopefully windows does to but that's not that bad..can live without windows...blah I'm glad that worked without too much of a hassle

Anyhow, I think doing "root (hd0, 2)" (if I remember correctly that I selected 2 cuz 1 was also available)..fixed it correctly, cuz I might have had to use 1 instead...my fdisk -l looks like this:

Disk /dev/hda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 12764 102526798+ 7 HPFS/NTFS
/dev/hda2 12765 12777 104422+ 83 Linux
/dev/hda3 12778 14339 12546765 83 Linux
/dev/hda4 14340 14593 2040255 f W95 Ext'd (LBA)
/dev/hda5 14340 14593 2040223+ 82 Linux swap

Disk /dev/hdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 262 30401 242099550 f W95 Ext'd (LBA)
/dev/hdb5 262 1080 6578586 b W95 FAT32
/dev/hdb6 1081 30401 235520901 7 HPFS/NTFS

Last edited by niteshadw; 07-31-2004 at 07:23 AM.
 
  


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
reinstalling grub. greythorne Ubuntu 23 12-03-2005 01:51 AM
GRUB not reinstalling jboo Linux - Software 5 10-02-2005 10:55 AM
reinstalling GRUB 0perat0r Linux - Newbie 7 05-02-2005 02:30 PM
reinstalling grub ELconkestador Linux - Software 1 02-12-2005 10:22 PM
Reinstalling GRUB Petelow Linux - Newbie 1 05-24-2004 04:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 10:54 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