LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-04-2007, 06:18 PM   #1
puntino
Member
 
Registered: Sep 2006
Location: Italy
Distribution: Suse 10.1
Posts: 78

Rep: Reputation: 15
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
 
Old 05-04-2007, 06:56 PM   #2
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
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.

Last edited by BrianK; 05-04-2007 at 06:59 PM.
 
Old 05-04-2007, 07:10 PM   #3
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
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.

Last edited by saikee; 05-04-2007 at 07:14 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why do I loose Linux when I shutdown or reboot ? wertaylors Linux - General 4 04-06-2007 02:52 AM
My computer seems to loose it's Linux installation every two days ... dvarius Linux - Newbie 18 01-12-2006 05:37 PM
unistall my linux Astrojax Linux - Newbie 5 09-05-2004 05:30 AM
installed linux and all the hell broke loose!! arunshivanandan General 8 08-26-2003 02:53 PM
How to Unistall Linux... MooMooFarm Linux - Newbie 8 08-07-2003 03:15 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration