Removing GRUB

I have a Windows/Linux dual-booting computer that I don’t want to be dual boot anymore– the Linux part needs to go. Thus, the GRUB bootloader needs to be removed so that Windows boots normally. I found lots of tips around the internet about how to do this. Of course, none of them worked. So I must add to the general body of knowledge.

I found tips that described how to manually remove GRUB via Linux– by using 'dd' to overwrite no more than 446 sectors of the boot disk with zeros. This strikes me as a dangerous and unstable proposition. It also wasn’t an option since I had already opted to reformat the formerly Linux partition via the Windows CD-ROM before I endeavored to remove the bootloader.

Other forums and sites mentioned a combination of utilities found on the Windows CD-ROM including FIXBOOT, FIXMBR, and BOOTCFG. While these programs performed some functions, they didn’t achieve the desired effect– to make Windows boot automatically.

New idea: Repartition the disk such that there is a (relatively) tiny extra partition. Then, well… reinstall Linux. I used a 4 GB partition and Ubuntu 10.10 and let it run its course which ended with installing GRUB… again.

Seems roundabout– installing Linux specifically to boot into Windows. But it works.

9 thoughts on “Removing GRUB

  1. Z.T.

    I don’t think grub needs more than 1MB to just boot Windows from another partition, without having any Linux installed.

    Many professionals fix Windows machines by booting into Linux from a cdrom or usb thumb drive. That should let you overwrite the MBR and the primary partition’s boot sector to whatever Windows needs.

    The tools on the Windows CD really should be able to make the computer automatically boot into Windows. Could you elaborate on what they have achieved and what they could cope with?

    http://technet.microsoft.com/en-us/library/bb457123.aspx

  2. Fowl

    What problems did you have with the on disk tools? The one thing I can think of that isn’t handled automatically, or by the tools you mentioned is setting the “active” flag on the boot partition. Diskpart (on disk) will do that with the “active” command”.

    “Startup repair” often works, if slowly.

    @Z.T The boot process changed significantly in NT6 so XP links aren’t much help. So did the install process, so you actually get a almost server core like preinstall/livecd experience. You can plug in a usb mass storage device and run autoruns or move files for example.

  3. Anonymous

    If you’re not using XP, you could try using EasyBCD to fix up your bootloader issues- it handles all of them, including setting up extra ones and modifying/deleting them.

  4. Multimedia Mike Post author

    Thanks for the comments. For the record, this is a Windows XP installation I was attempting to salvage.

    @Fowl: Thanks especially for the tip regarding DISKPART’s active switch. I was looking all around for that as I had a feeling I needed to set the Windows partition as active. I may take another go at this. But for now, the Ubuntu bootstrap is working okay and it’s only costing me 4 GB of disk space. :-)

  5. Fruit

    IIRC, for windows XP and earlier versions, “fdisk /mbr” can be used to install the basic bootloader into HDD’s mbr – the simple one that jsut boots the active partition. If the c:\ windows partition (the one that has the NT bootloader) isn’t set as active, set it active. This is usually enough to make windows boot again without grub. (Disclaimer – I’m not sure if this is completely safe – only the MBR – 512B gets wiped, but maybe taht can screw thigns if you messed with the drive’s geometry things? It will be safe though if you backup the mbr before the action.) I never had trouble with this method (windows 2000, windows XP 32b).

    I don’t recall exactly how do you specify the drive to be used for fdisk /mbr, dunno if it took drive letter as argument or if it asked for which drive to use…

    (fdisk is naturaly included on the boot cd — at least on the install disks of win98 which I was using for these linux cleanups back in the days…)

  6. Mark

    Bit late, but fixmbr and fixboot (from windows recovery console) usually do the job just fine :)

  7. Anon

    Sometimes you can find that installing Linux distros backs up the original mbr (can’t remember where for the life of me). However, if you’ve done installs since or formatted the Linux partition…

Comments are closed.