LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   What will happen to GRUB if i reinstall windows? (https://www.linuxquestions.org/questions/linux-software-2/what-will-happen-to-grub-if-i-reinstall-windows-141423/)

ksoma 02-02-2004 12:48 PM

What will happen to GRUB if i reinstall windows?
 
The setup I have right now is Windows is on C: and i have a separate drive on D:...I have my C: drive backed up on linux and am going to delete the C: partition and install windows to that drive. Will that cause problems with GRUB recognizing the DOS partition even though I have re-installed windows in the same place? Thanks.

-Keerthan

ilikejam 02-02-2004 12:54 PM

Hi.

Windows *will* overwrite your MBR, so you'll have to re-install grub after. Better keep a boot disc handy...

Dave

ksoma 02-02-2004 01:21 PM

Ahh...ok..thanks. Just to make sure, after reinstalling, and then putting in the GRUB boot disk....there should be no problems when GRUB is identifying all the linux drives.. Is that correct?

-Keerthan

ilikejam 02-02-2004 01:35 PM

When you install windows, you won't be able to get into Linux without either a boot floppy, or a rescue CD and you'll have to boot Linux to re-install grub

Once you've booted Linux, make a copy of your grub.conf file (just to be sure), then re-install grub (see 'info grub' for details). After that copy your old grub.conf file back to where it should be (if it was overwritten by re-installing grub), and you should be all set.

Basically, all you have to do is get grub back onto the MBR, and use the same grub.conf that you're using now.

Dave

P.S. There is an easier way to do this:
Once you've installed windows, put the first redhat cd in, and go through the motions of reinstalling Linux. Don't repartition or install anything except the kernel, then the installer will detect the windows installation, and your Linux installation, and install grub and grub.conf for you.

Be extremely careful with this, though - one wrong move could nuke everything. I accept no responsibility if this goes titsup.

ksoma 02-02-2004 03:30 PM

Im using the cd, and it's at the point where it says to skip the media test and start the installation. This should take me to a page where it asks which packages to install right? Which one exactly should I install....I'm scared to go ahead with pushing the OK until I'm assured it's not going to just start doing a clean install ....

-Keerthan

ilikejam 02-02-2004 04:07 PM

OK, you should opt for the upgrade option, and keep your current partitions.

Select a minimum install, and select 'Select individual packages' (or similar). Then deselect ALL packages except the kernel (a single package called kernel-2.4.20-8, i believe).

The install should then go as usual and at some point you'll get the grub installer part, which should detect your windows installs.

Dave

P.S. I say again, this can be dangerous.

ksoma 02-04-2004 01:20 PM

Thanks ilikejam :cool: Everything worked out like you said. I was just wondering what the reason was for installing the kernel for GRUB to reinstall itself. I tried doing it w/o any packages at first and it said I needed to choose a kernel package for it to work. Was just curious to why it did that...thanks again.

-Keerthan

ilikejam 02-04-2004 02:53 PM

I'm not too sure. I would have thought it was because it needed to know exactly which kernel to tell Grub to boot (so installing the kernel from the CD would be ideal).

Having thought about it, though, the installer can recognise other Linux installations as well as windows installations (or so I'm led to believe), so I actually can't think of any reason for it.

Dave

P.S. Glad it's working!


All times are GMT -5. The time now is 02:34 PM.