SUPPORT THE SITE WITH A CLICK

Subscribe Rss:

SUPPORT THE SITE WITH A CLICK

Sunday, November 18, 2007

HOW TO Restore GRUB -I

You have windows 98 and linux on the same hard disk and you choose GRUB as boot loader.At boot time you see a menu to choose windows or linux.
But one day you reinstall windows 98 and it rewrites your MBR and the menu has gone, now you only can boot windows.

What to do:
Put the redhat boot disk you created on the installation on the floppy drive, boot the system and run grub command

Remember that for grub (hd0,1) means hda (primary controller master), second partition.

Now we need to tell grub where are the grub files:

If you know where they are, type something like:
root (hd0,1)

else if you have no idea, type:
find /boot/grub/stage1
and then the root command with the correct parameters:

setup (hd0)
to install it on hd0, that is MBR of the first HD.

type quit and reboot.
The menu will appear again.
If you want to make some changes to the boot menu, you must edit the file: /boot/grub/menu.lst

A sample menu.lst file is this:

default=0
timeout=5
splashimage=(hd0,1)/boot/grub/splash.xpm.gz

title Red Hat Linux (2.4.18-14)
root (hd0,1)
kernel /boot/vmlinuz-2.4.18-14 ro root=LABEL=/ hdc=ide-scsi
initrd /boot/initrd-2.4.18-14.img
title Red Hat Linux (2.4.18-openmosix3)
root (hd0,1)
kernel /boot/vmlinuz-2.4.18-openmosix3 ro root=/dev/hda2 hdc=ide-scsi
initrd /boot/initrd-2.4.18-openmosix3.img
title WindowsME
rootnoverify (hd0,0)
chainloader +1

No comments :

Post a Comment