Removing Linux and grub loader from a Dual boot system


There are a million posts on how to do this, but I’ll still post my experience.

UPDATE: A lot of people have complained in the comments that my story is rambling and irrelevant, so before I go about it, here is the link that will give you the exact steps. You can jump to it and ignore my ramble completely.

If you are still with me, here is my experience.

In the early part of the 2007 I had to make my Dell Latitude 510 a dual boot. It had come with a Win2k3 installation with two HDD partitions. I had ‘re-done’ one partition to install Redhat Linux ES 3.x. Very soon work with the Linux partition got over and I was (happily) back to using Win2K3 server, till ‘Gordon Moore’ struck. The old adage – ‘Data will increase to occupy all space available’ became a reality. Soon I was uninstalling/deleting/compressing ‘things’ on a weekly basis to meet increasing demands of space on the meagre 20GB partition.

The slight risk of losing all data (most of which was already in the source control) had kept me from experimenting, but finally I got fed up. Today I decided I was going to take the risk.

After 5 minutes of googling it was clear that removing the Linux partition wasn’t such a big deal, but the GRUB loader wouldn’t go down easily.

First I tried a method that I had opted ages ago, try removing the linux partitions using the linux ‘fdisk’ utility. Unfortunately I didn’t have the Red Hat installers, but I did have a Fedora 7 ISO. Burnt it on a DVD and booted up with it. Tried all options presented but couldn’t make it to the ‘fdisk’ menu. Kept saying driver ISOes not found. Gave up after 4 attempts.

Fact that I had forgotten the root password of the Linux setup also didn’t help.

Booted up Windows, went to Control Panel->Administrative Tools->Computer Management->Storage Management.

All the partitions (Linux Primary/Swap and of course Windows) partitions were visible. The Linux partitions were ofcourse marked unrecognized. Deleted the linux partitions and created a logical drive on the resulting ‘Unallocated Space’

Still had a “Primary EISA” partition of about 47 MB. This was Sitting in front (to the left in the GUI) of the C partition. Did not mess with it. 47MB was not worth losing all data.

Formatted the new Logical drive.

After contemplating for about 5 minutes of whether to mark the C: partition as “Active Partition” or not I decided to bite the bullet. Windows help only mentioned which partitions can be “Active”. It didn’t say what would happen if you made it active. I did it, under the incorrect assumption that it would fix the MBR and get rid of GRUB, because googling made it clear that fdisk /mbr was NOT the thing to do in a win2k3 setup.

With crossed fingers I rebooted…

SPLAT!!!

GRUB threw up on my face. Instead of the familiar boot menu all I got was

grub>

Now what???

Run to the desktop computer and google again. Someone had mentioned fixmbr from a recovery console. Also dug out the Win2K3 setup disk. Inserted it and booted (boot sequence is CD->HDD1->USb1). Went into the Windows Recovery Console.

It detected the Windows installation correctly and asked me to select which installation to recover. First time around I just hit Enter, only to realize that it will reboot if you don’t provide it with the ‘number’ of the partitions it detected. Next time type 1 and then ‘Enter’.

Reached

C:\Windows

This link gave exact sequence of steps to recover MBR

http://www.ntcompatible.com/How_to_remove_GRUB_loader_t28242.html#154819

The only thing it didn’t mention was the scary messages each of those commands would throw up. Anyway, after wading thru threat of doomsday the last command bootcfg /rebuild took the longest (about 5 minutes). In the end it wanted to know what should the partition be identified, I entered “Windows2003 Server”, next it asked to enter “Boot Options” for which I just hit “Enter” and finally it was supposedly done.

Again crossed fingers and C:\>Exit

Came up with a BootMenu that had two options “Windows2003 Server” and “Windows 2003 Server Standard”. I was expecting this because it is mentioned as a side-effect in one of the posts in the same discussion above.

Couldn’t wait to hit enter for the default option and Windows 2003 server booted up… Phew!!! Still to cleanup the bootconfig file to remove the extra boot option, but otherwise, things are nice an fine now.

All this to recover 14GB of HDD space. Sigh!!!

Advertisements
Tagged , ,

9 thoughts on “Removing Linux and grub loader from a Dual boot system

  1. John Freeman says:

    Question! Someone searching for a procedure to remove the linux op system could care less about the trials and tribulations of your experience – is that what you would prefer to read while frustrated and looking for a solution – do you really think you contributed anything worth a damn with your story – when someone is searching for a solution they want a concise method, not a fairy tale. Of course that would not boost your ego but it would boost your credibility – think about it……..THANKS FOR NOTHING!

  2. Pavan says:

    Assuming you have deleted Linux partitions, and that GRUB is still installed, you can boot into Windows by typing the following commands on GRUB prompt:

    root (hd0,0) #This is Windows Primary Partition, Number starts at 0
    makeactive
    chainloader +1

    After this, you can fix the MBR by using fixmbr utility available at http://www.ambience.sk/fdisk-master-boot-record-windows-linux-lilo-fixmbr.php.

    If you want to install Linux and not GRUB, you can read my blog post http://bkpavan.wordpress.com/2008/04/02/how-to-boot-linux-using-windows-bootloader-xp/

  3. worldhate says:

    @John Freeman, The Ungrateful Retard
    This is HIS blog and he’s writing about HIS experience. If you have a problem with that, read another blog. There’s a billion places where you can see the procedure alone, but this blog gives the story behing it. I, for one, found it helpful because it gives you the “why” side of things.

  4. Sumit says:

    @worldhate

    🙂 Thanks for the appreciation.

    About John, well it’s a free world… and I guess he was really frustrated with his problem!!! :D, didn’t want to compound this agony about ‘my blog’ LoL…

  5. Dhruba says:

    it will b nice if you answer questions to the point.we can both save our time.

  6. just me says:

    reading this is really just waste the time, and like others:
    THANKS FOR THE BIG NOTHING

  7. Doug says:

    Thanks for EVERYTHING.

    So much of the time I get information that requires me to read between the lines. With this post I did not have to do that…you walked me through the anticipation of what I was unsure I would see at the next prompt in the process and I am very appreciative for that.

    I hope that the other frustrated souls will some day find peace in their lives.

    • Matty says:

      I agree. By giving the whole HONEST story with all the details I knew what to expect. Not only did it make me feel better and more confident about the matter i also know I found the scenario which matched my delimma and how to re over… In human terms.

  8. peter g says:

    I found what i consider to be an easy way for a newbie with no recovery disc with my netbook(which seems to be the norm these days) to remove linux after trying it. 1st i opened up windows, searched for EASEUSE PARTITION MANAGER (as this has a fix MBR function), downloaded & installed it. Then run it. You’ll see all your hard drive partitions. The linux come up as (other*). I deleted all of these,Then resized my d (data)drive to use the deleted linux partitions.Then I clicked on my first section of hard drive as this showed where the MBR was & clicked on fix MBR. Then at the top i clicked apply changes, Then restarted my computer,& that was it. In less than 5 minutes i was back to windows xp only.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: