Windows, Linux (dual boot) and Grub

There are 2 issues I want to put light on in this doubt.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ISSUE 1: The general issue:
Mr. x has dual boot windows + linux, with say grub loader loading the MBR. His windows goes corrupt and he decides to reformat Windows.
Due to that the windows installtn takes over grub and he can't boot linux via grub (has to use boot disk made during installation)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
ISSUE 2:
I am facing this problem and its a bit weird one. (very eager to know wht exactly has happened)

Somehow there was problem with my grub loader, when I started to boot the box...a DISK FAILURE error occured. Luckily I could boot into linux using the boot disk but cudnt boot into windows xp coz i hadnt made any boot disk.

I decided to get XP repaired using boot disk. So I got XP installtn bootable CD and put it inside after making the 1st boot device as CDROM....
Verfying DMI pool data...
Booting from ATAPI CDROM
Press any key to boot from CD......

If I press enter it boots frm cd and xp cd installtn starts...but if I don't do anything...
auto boots from my hdd and GRUB LOADS!!!!!...howzzzzat?..this happens only when I put in xp cd only, otherwise it gives a disk boot faailure or i hv to boot from floppy.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Pls tell the general way to address issue 1, will the configurtn of grub.conf help? if yes how?

Pls explain the issue2, I am confused, is it that all grub files are fine, MBR needs just some trigger using xp bootable cd rom...???

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1) All that needs to be done it to use the floppy to boot into GNU/Linux and then reinstall the grub boot loader with:
# grub-install /dev/hda

2) If a key isn't pressed when "Press any key to boot from CD...." appears then it will then go on to boot from the next device listed in your BIOS, probably it will try the floppy and failing that eventually the hard drive. This is completely normal behaviour. If you needs to repair you XP install, try running "fixmbr" and "fixboot" from the recovery console which you can get to when booting off the xp CD. This should fix windoze for you. If it doesn't reinstall wundoze over thetop of itself. Oce youhve a working xp install, boot GNU/Linux with the floppy and reinstall grub with the command given above.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The issue2 was solved on running grub-install...

I have one more doubt now...
1. Will grub-install work if lilo is the current bootloader and that i am not bothered about keeping lilo??
2. Also is there any parallel command to restore lilo if restoring lilo is a concern?...Are there any changes that are to be made to grub.conf then?  Or it just takes directly the current dual boot configuration from lilo.conf?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1) Installing grub will automatically overwrite lilo or any other bootloader that you may have in your MBR.

2) You can restore lilo with the lilo command...and it will just overwrite grub. You will have to make sure that your grub.conf file is correct as it wont take any settings from lilo.conf. Safest way would be to install it to a floppy (grub-install /dev/fd0) and try that first before writing it to your MBR.

Have a Linux Problem
Linux Forum - Do you have a Linux Question?

Linux Books
Linux Certification, System Administration, Programming, Networking Books

Linux Home: Linux System Administration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.
The site www.gotothings.com is in no way affiliated with or endorsed by any company listed at this site.
Any unauthorised copying or mirroring is prohibited.