LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Unistall Win without loose Linux (https://www.linuxquestions.org/questions/linux-newbie-8/unistall-win-without-loose-linux-551370/)

puntino 05-04-2007 06:18 PM

Unistall Win without loose Linux
 
Hi
I have one hard disk splitted beetwen WinXP (professional) and Suse 10.1 and I use Grub as boot loader.
Now I want to unistall WinXP (is not run well) without loose the Suse partition and I want to install again WinXP (I always want to protect my Suse partition).
How to do it ?
How do I update grub afther the installation of WinXP?
Plese explain me step by step.
Thank you in advance

BrianK 05-04-2007 06:56 PM

Quote:

Originally Posted by puntino
Hi
I have one hard disk splitted beetwen WinXP (professional) and Suse 10.1 and I use Grub as boot loader.
Now I want to unistall WinXP (is not run well) without loose the Suse partition and I want to install again WinXP (I always want to protect my Suse partition).
How to do it ?
How do I update grub afther the installation of WinXP?
Plese explain me step by step.
Thank you in advance

uninstalling windows will have no affect on the suse partition. Reinstalling will.

once you reinstall windows, it will overwrite grub, so you'll have to rebuild it.

Do yourself a favor & print out the file /boot/grub/menu.lst - keep it for reference
Also, before you start, download and burn a live linux CD distro - Knoppix or Ubuntu or something similar - something that will load up linux without installing to the HD.

Go ahead and install windows completely. After you do this, when you boot up, there will be no grub & you'll just go straight to Windows. This is ok.

Now boot off the live CD. Open a terminal. type "grub" - this will give you a grub prompt

now get that printout & look for a line that looks something like:

root (hd0,0)

type that in at the grub prompt (whatever yours is - it may not be hd0,0 - just type in what's on your printout)

now all you need to do is install grub to the MBR of your boot drive. I'll assume that the drive Linux is installed on is also the drive Windows is installed on which is also the drive that the BIOS is set to boot from. If this is the case, then install the boot loader by typing:

setup (hd0)

the hd0 comes from the root(hd0,0) - if it was root (hd1,0), then you would do "setup (hd1)". If those assumptions I made earlier are incorrect, well... reply here & I'll give further instructions. It's a lot to type & I don't want to do it if I don't have to. ;)

Now you're done. Just type:

quit

to save everything. Remove the live CD, reboot, and you should have your grub back.

saikee 05-04-2007 07:10 PM

How about duplicating Grub onto a floppy?

Say the /boot of you Suse is in the 2nd partition of the first disk. This is known to Grub as (hd0,1) as it counts from 0. Just slip a floppy in and type in root console
Code:

Grub
root (hd0,1)
setup (fd0)
quit

The re-installation of XP will nuke Grub away but Suse will boot whenever you slip in the floppy.

When XP is certified working properly you can type in root console of Suse to restore Grub back to the MBR by
Code:

Grub
root (hd0,1)
setup (hd0)
quit

The full set of Grub files is in always in /boot/grub directory. You simply tell Grub where to fetch the information with the "root" statement and "setup" Grub in whatever media that you fancy.


All times are GMT -5. The time now is 04:04 AM.