Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Master Boot Record

Status
Not open for further replies.

mlazlo

MIS
Oct 3, 2001
27
0
0
US
I have a machine that is running Redhat 7.2 and Windows 98. The loader is Grub. Do to problems with Windows 98 install, I needed to reinstall Windows 98, because Wine just isn't there yet. Anyway, with this install of Win 98 it overwrote the MBR. Now the Grub boot loader does not come. I can boot Redhat from floppy but this is not the way I want to go. Is there an easy way to get the Grub boot loader to come up again as it did before the reinstall of Win 98?
Thanks in advance.
 
Hi,

Assuming the config (/boot/grub/grub.conf) is the same as before you'd just do :

# /sbin/grub-install /dev/hda

However, presumably the config file doesn't have an entry in there to boot win98 so you'd need to add that at some stage.

Hope this helps
 
This machine was already setup to run as a dual boot. The line for Win98 is already in the grub.conf file. I will try the grub-install /dev/hda
 
ifincham,
The above did not work. When run, it claims that it was installed, but the boot loader does not come up. This machine w/o a linux boot disk inserted into the floppy drive still boots directly into Win98. Am I missing something?
 
Hi,

Thats odd - are you sure you ran it as root and specified /dev/hda (not /dev/hda1) ? (I'm assuming you have normal eide drives not scsi) .

Or is this a multi-drive system and, if so, is the boot sequence in the bios correct - i.e. IDE 1 Master first ?

The redhat reference on grub is here -->
Regards
 
After you get this working again, may I suggest an easy way to backup the MBR to floppy, in case you have to do this again:

1) Get a blank formatted floppy
2) In linux: dd if=/dev/hda of=/dev/fd0 bs=512 count=1

This will save the MBR to floppy. To restore the MBR from floppy:

1) Put the floppy in the drive
2) dd if=/dev/fd0 of=/dev/hda bs=446 count=1

I have also seen references on the restoring of the MBR to specify 512 as the blocksize in the restore dd command. The Lilo howto says to use 446, though. It seems that the last 66 blocks are for the partition table. Bruce Garlock
bruceg@tiac.net
 
My system setup is as so:
2 IDE drives:
hda = Win 98 installed plus linux /usr & /usr/local
hdb = Red Hat 7.2 where root '/' is hdb1

This is the grub.conf file that resides on /boot/grub:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd1,0)
# kernel /boot/vmlinuz-version ro root=/dev/hdb1
# initrd /boot/initrd-version.img
#boot=/dev/hda
default=2
timeout=10
splashimage=(hd1,0)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.9-13)
root (hd1,0)
kernel /boot/vmlinuz-2.4.9-13 ro root=/dev/hdb1
initrd /boot/initrd-2.4.9-13.img
title Windows 98
rootnoverify (hd0,0)
chainloader +1

I have tried "grub-install hda" & as the documentation on Red Hat's site states "grub-install hdb1" in my case. After the run of both of these, the returned message is that "grub is installed" paraphrasing of course. After a restart the grub menu does not come up and up comes the stupid Win 98 splash screen.
The claim in the documentation for grub-install is that this is depreciated.
Anyway, I am still booting from disk into Linux but this is not my chosen path.
Any help would be appreciated.
 
Hi,

If its a grub boot floppy then could should be able to try the 'native' install, i.e. from the grub command line --> (Press ESC to get the command line) .

Other than that you could try doing :

# /sbin/grub-install '(hd0)'

there is also a '--force-lba' option to grub-install that you could try as long as you are certain the drives are in lba mode (see the bios setup) - be careful on that one though !

The only other obvious thing to do is give up on grub and use the tried and tested lilo boot loader instead. You'd need to install the 'lilo' rpm and create a suitable /etc/lilo.conf then install as root with /sbin/lilo -v' . You need to create the conf file first, though.
Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top