How do I remove Linux from a dual-boot laptop? (XP)

So, I’ve got a Toshiba Satellite L45 laptop set up to dual-boot Windows XP and a couple flavors of Linux (Ubuntu 8.04 and one of the recent flavors of OpenSUSE). It’s fun to play around in Linux, but the simple fact is that most things I need to do, I can do in Windows, sometimes even more easily (unless someone knows how I can get Steam running in Linux so I can get my Peggle on between classes)

A big problem: I’m about to trade laptops with my mom (she has my much nicer Dell Dimension 1400N (IIRC), which I am getting the impression that she just kinda feels overwhelmed by, feature wise. Me? Big computer nerd. My mom? Not so much really. So I need to remove Ubuntu and OpenSUSE, and set it up so that everything boots straight up into Windows.

No, I don’t feel like showing my mom how to use Linux or how to use the bootloader to pick Windows every time, and I don’t think she feels inclined to learn, so Linux on the laptop is pretty much straight up out of the running here as an option. Any help is much appreciated.

Can you put the factory CD in and reinstall windows? It will write over everything.

You can edit the Grub boot menu so Windows is the default, and set the selection time to be 1 second. The only real downside is the hard disk space Linux is taking up.

I’m hoping to avoid having to reinstall XP, because it was a minor pain, due to the lack of SATA support off of the XP install discs. I somehow got it to work using a slipstreamed disc, but I’m not entirely sure how and I lost the first disc I made, so I’ll have to figure that all out again, plus reinstalling all of the drivers and finding XP-compatible ones for the things that came with drivers that would only work in Vista (oi). Plus, in the mean time, I’m still using the laptop at school, and reformatting would be incredibly inconvenient.

The trade isn’t happening until December, so we’ve got some time to figure this out.

Check out the Ubuntu Forums for more specific advice but you can repartition so as to lose the linux partitions, format the recovered space with XP’s partition manager then run your XP disk and restore the boot partition to it’s original settings, losing GRUB in the process.

Booting straight into Windows, if that’s all you want, is easy. Basically, what ZenBeam said.

If you really want to remove Linux, that’s slightly more involved. As Myglaren indicates, there’s deletion of partitions and restoration of the boot partition. I’d say that restoration of the boot partition should be done first (IIRC, there’s a fixmbr command in XP; however, I don’t recall whether that “fixes” the bootloader). Then, you can just use an Ubuntu LiveCD (or any others, such as SystemRescue) to modify the partitions with, say, gparted. (Note that I’m not familiar with XP’s native partition tools; MS may very well supply some, but back before there were alternatives, I was always recommended to use PartitionMagic or some other non-free tool. Which is what gparted replaces.)

Now that I think about it, though, I wonder if you could leave GRUB there as the bootloader, just without any linux partitions. Yes, you’d have to have grub reside somewhere; it just never occurred to me before, so I don’t know the specifics off the top of my head.

Also, in the future, it might be of interest to you to use the Windows bootloader rather than GRUB. Not that I recommend it, but in some cases it’s necessary. For instance, although it pained me to do so, I just did this at work on a Lenovo laptop to preserve their Windows-based backup and rescue system. If you’re interested, I can dig up the links…it’s not information that I need (or want) to keep in mind. :slight_smile:

The easiest and fastest way to do this is:

  1. Boot up your Linux CD and delete the Linux partitions using fdisk

  2. Boot up your Windows XP install disk, go into recovery console, and do an ‘fdisk /mbr’ to restore the MBR to just boot windows, thus removing GRUB
    Now, to reclaim the HD space from the Linux partitions, you have a couple of options.

  3. Create a new partition for windows to utilize to store data, or…

  4. Using a partition manager, resize the current windows partition to fill out the empty space

sweepkick, is it possible to use fdisk from the liveCD to have the windows partition fill in the empty space, leaving only the “fdisk /mbr” step to do?

I’ve found the GPartEd liveCD to be the most painless (free) way of managing disk partitions

  • So that would be pretty similar to sweepkick’s method, ie:

-Boot up gparted and remove all the Linux partitions (it will also enable you to resize/move the Windows one to take advantage of the additional space, or create a new partition which Windows can be made to see as a separate logical drive)

-Boot into the recovery console from your Windows CD and restore the standard Windows boot loader