Removing Linux & connected partition

whitehotdawn

Junior Member
Mar 4, 2004
24
0
0
My laptop has dual boot Linux (Fedora) and WinXP. I want to remove Linux and the partition of the hard drive that is associated with it--primarily because I do not us Linux on this computer and I want more hard drive space.

Normally, I would just reinstall WinXP with the CDs--but I am studying in England and do not have the disks. I do have an external hard drive though. Is there anyways that WinXP can get access to the partition associated with Fedora? or can I uninstall Linux without harming my WinXP installation?

Cheers,
sean.
 

nweaver

Diamond Member
Jan 21, 2001
6,813
1
0
you cannot remove Grub (the bootloader) unless you have an XP disk.

You should be able to go into disk management and grab the Linux partitions, and format them. Without third party utilities, you won't be able to just add the space to your current windows partition, but will instead have to mount the free space as another drive.
 

whitehotdawn

Junior Member
Mar 4, 2004
24
0
0
What thrid party utility would work best? I don't mind leaving the grub as long as I can a) remove it when I get back home with the XP disks and b)enlarge my XP partition. Also, is there a way to switch the default OS the grub loads to?

Thanks,
sean.
 

Robor

Elite Member
Oct 9, 1999
16,979
0
76
I believe you can use a Linux LiveCD to edit and resize your partitions. I used an Ubuntu 6.06 LiveCD and GParted to do the opposite of what you're trying to do (I wiped my WinXP partition and made more space for Linux).
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Grub requires configuration stuff in your Linux's /boot directory in order to function properly. So if you just delete the linux partition then it will make your system unbootable.

However it's easy to configure grub to boot XP by default.

The easiest way to fix it is to boot up into a recovery console with your XP cdrom and run the fixmbr command to reinstall NTLDR into the MBR.

But since you don't have cdroms then that won't work.

If you have floppies you can make a floppy boot disk:
http://support.microsoft.com/?kbid=305595

Probably will work with USB flash devices also.

I figure there is a way to restore the NTLDR from XP itself, but I don't know how to do that.
 

whitehotdawn

Junior Member
Mar 4, 2004
24
0
0
I really wish I had brought my WinXP disks with me, I'm going to ask around and see if one of my classmates has their disks, but this is probablly unlikely. My Acer lappy does not have a floppy drive, but I might be able to get my flash drive to do the trick. Thanks for the advice.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Cool. If your having trouble with the flash drive go into your bios and see if there is a'floppy emulation' option for flash drives.

I still expect there is a way to get ntldr reinstalled from inside XP, but I don't know how to do it. Is the recovery console accessable from inside XP, maybe? Donno.
 

wamasters

Member
Jun 30, 2006
26
0
0
OK, this is off topic slightly. If it's easy to set up Grub to boot XP by default then how do you do it? I would prefer it do this as the rest of my family has no real use for Linux (and I only use it to keep myself amused).
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Check out your /boot/grub/menu.lst configuration file.

In there there is a entry for the default menu selection. Something like "default=0" They are numbered starting with 0. So 0 would be the first menu selection, 1 would be the second, etc etc. Just change it to select the windows menu choice.
 

wamasters

Member
Jun 30, 2006
26
0
0
Bless you for the info (may you live a thousand years)! That one's been bugging me. BTW, good luck,WHD!
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Originally posted by: postmortemIA
fdisk /mbr will do the trick once linux is gone.

Are you sure that will work fine with Windows XP?

I thought that it required the NTLDR to be reinstalled for XP to boot up correctly.
 

postmortemIA

Diamond Member
Jul 11, 2006
7,721
40
91
It will. NTLDR is exe file still stored on first partition. We're talking about Master Boot Record, not 1st partition.
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Originally posted by: postmortemIA
It will. NTLDR is exe file still stored on first partition. We're talking about Master Boot Record, not 1st partition.
That is my understanding as well. AFAIK, there are some very minor changes between the 9x MBR code and the 2K/XP MBR code, but they shouldn't prevent the system from booting in the vast majority of cases. Both the MBR's are very simple - they pass boot control to the partition boot record of the active partition. That's where NTLDR lives. So the boot process looks like this:

BIOS-->MBR(looks for active partition)-->Active PBR(finds NTLDR)-->kernel

When you install Linux (or wipe it later), you're not touching NTLDR, you're just installing an MBR that bypasses it. Assuming your Linux installation didn't play with the active (or "bootable") partition flags (and most don't, since only Windows uses them), then it should be enough to do an fdisk /mbr.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Are you sure that will work fine with Windows XP?

Yea, all that does is reset the MBR back to MS' default which just looks for the first active partition and chainloads it. So as long as his Windows partition is active it'll work.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Ok, sorry for the misunderstanding.

Still though make sure that backup boot media works before trying it.