dsantamassino
September 28th, 2003, 08:10
Hi guys,

I tryed to install Redhat 8 to the first sector of the MBR and now it won't boot. It just boots directly into Windows XP pro. Someone told me to use rescue but i got an error with that.

grub> setup (hd0)

Error 12: Invalid device requested. That is the error i got. That is too put it back on the MBR. How can i make Redhat boot when it's on the first sector of the hard disk?? Please reply back. Thanks guys.

optyk
September 28th, 2003, 23:07
Not sure I follow here...do you mean you tried installing grub to the MBR during the Red Hat install? If so, boot Red Hat with the boot floppy you made during install (you did make one, right?) and as root run

#grub-install /dev/hd0[/code:1:cfc993c6c0]

reboot, and you *should* be up and running.

IF you decided not skip the boot floppy creation at install time(shame on you!never miss the opportunity to make a diagnostic tool), then you should boot the first install disk, and enter

[code:1:cfc993c6c0]>linux rescue[/code:1:cfc993c6c0]

at the prompt. The rescue function will search for your Red Hat installation and mount it in a chroot at /mount/sysimage and you cd in and run the grub-install command there, reboot, and you *should* be up and running.

rob897
October 8th, 2003, 12:59
Also I remember reading, that with any Windows OS from W2K up, Windows must be installed 1st. Otherwise windows will overwrite the MBR. So you should try and install RH8 after Windows has been installed.

tarballed
October 8th, 2003, 14:23
What partition is RH 8.0 installed on?
When you run grub, you need to do something like this:

[code:1:c1c824b94f]grub> root (hd0,0) (Your boot partition or whatever yours is
grub> setup (hd0)[/code:1:c1c824b94f]

That will setup grub to look to whatever partition you are setting up.

Dont forget, you need to create grub.conf as well (grub.conf is in /boot/grub/grub.conf)

Put your contents in there, reboot and you should be all set.

Tarballed

schotty
October 8th, 2003, 15:04
I didnt know you hopped over here :)

schotty
October 8th, 2003, 15:07
Also I remember reading, that with any Windows OS from W2K up, Windows must be installed 1st. Otherwise windows will overwrite the MBR. So you should try and install RH8 after Windows has been installed.

Actually, if you make a /boot partition as the first partition, and install the grub to the mbr, all oses will not overwite it unless specified. I had :

/boot == /dev/hda1
WIndows2K == /dev/hda2
Linux Swap == /dev/hda3
/ == /dev/hda4

And when I was reinstalling windows (format hda2 and reinstall), After I realized I should have made a boot disc, I was rebooting to ... GRUB !!

rob897
October 8th, 2003, 16:17
Good point. I have not done a dual boot system in years, just remembering back when I did do a dual boot, thats the problem I ran into.

molotov
October 20th, 2003, 20:38
Out of curosity, thats the only thing I can think of I dont know how to do in unix... reformat the MBR... I usually just take a DOS bootdisk and fdisk /mbr, but Id like to know how to do it in bsd or linux, any easy way?

ealwen
October 21st, 2003, 00:28
I have wondered this myself, I usually just do the fdisk /mbr and reinstall my pc. And as far as windows goes previous to 2000 the install had to have a valid dos mbr or it won't install. It reads the mbr to see where the first active partition is to install on. 2000 and XP (especially XP) will re-write the MBR during the install if it can't read it. So that is why windows must be installed first or on its own HD.