Aug 27, 2009

Removing Linux Grub & Restoring Windows 7 Boot GUI

Recently I had been playing with Kubuntu on my Windows 7 machine.  Don’t get me wrong, Kubuntu and other Linux distributions are great.  I wanted to remove it because I wasn’t really using it anymore and I was getting sick of booting my machine and forgetting to change the GRUB option at start-up to boot into Windows 7.

I know that the GRUB can be edited so that Windows 7 would boot first but I no-longer had the need for Kubuntu so I wanted to remove it all together including the GRUB.

First of all I made a really dumb n00b error of booting into Windows 7 and deleting the partitions that Kubuntu occupied.  Of course, the GRUB remained and my computer wouldn’t even start.  To get back to being able to boot again, I inserted my Kubuntu DVD and re-installed so the GRUB would work again.

Now I thought, maybe EasyBCD would be able to remove the GRUB from within Windows 7 and then I could delete the Kubuntu partitions again.  Unfortunately EasyBCD could not do this.

My next plan was to boot from my Windows 7 DVD and use the option to fix start-up errors.  This was not a good plan either.  The GRUB remained but I now had a Windows Vista GUI start-up instead of the much more pretty Windows 7 one.

I decided to do some research before making anymore stupid mistakes – RTFM comes to mind.

So I discovered that the first step to remove the GRUB (and Kubuntu or other disto of Linux) is to boot from your Windows 7 DVD, select your language and then to choose the repair option.

At the repair option you should choose the command prompt and use the command: bootsect /nt60 C:

Now restart your computer and Windows 7 should boot without entering the GRUB because this has been removed from your machine.

If you have somehow got the old Windows Vista start-up GUI displaying on start-up, then you should wait for your computer to boot into Windows 7 and run the command prompt as an Administrator.  To get the Windows 7 GUI start-up back, use the following command: bootrec /fixmbr

Once you’re happy that your computer is booting without the GRUB and directly into Windows 7 you can remove all traces of the Linux distribution going into Disk Management (Windows Key + R and type diskmgmt.msc). Simply delete the partitions and then expand the rest of the drive containing data to fill the empty space.

The above is just a brief overview of what I did but if you have any questions or would like anything in more detail, please contact me or leave a comment.

Share this:
Facebook Twitter Pinterest Linkedin Reddit Stumbleupon Tumblr Posterous Email

Related posts:

  • Chris Williamson

    My hard drive setup is weird and none of the options i saw had worked. So i went the /help and i found that “bootsect /nt60 all /force /mbr” worked fine for me.

  • awlakers

    Worked great! Used to get my Windows 8 CP installation up and running.  Found the a free windows recovery iso out there as well…do a little searching, don’t pay for it from NeoSmart!

  • IncorruptibleS

    What happens if you dont have the windows 7 cd? I dowloaded my windows 7 from microsofts website. need to get rid of ubuntu and kubuntu please. and Im a total noob.

    • http://www.lukeaddison.com 1uk3

      How did you install Windows 7?  You must have put it on either a disc or USB stick or similar.

      If you used the USB install method, then you just use the Windows USB instead of the disc – booting from the USB installation.  Then just follow the instructions as normal.

      Let me know and I’ll try to help.

  • Bigbadmick

    A million billion thank you’s for this.  Saved me having to do a full re-install and worked perfectly first time.  You saved my bacon on this one and i can never repay the debt to you.

    • http://www.lukeaddison.com 1uk3

      Always glad to know I’ve been of some help.

  • Hmitheos Here

    Before installing linux, I had both vista and seven… I don’t use linux anymore. How can I remove both linux and grub? I installed it on my USB flash drive and since then I need it to boot my system. how can I bring back the boot menu selection for windows? thank you in advance.

  • Windowsman

    Thank you so much. Really saved me here. I could not point the master boot loader away from grub towards windows, but this did the trick.

    bootsect /nt60 C: /mbr

    Many thanks!

  • Gary

    I’ve been working on a new installation of Ubuntu on a new hard drive.  I don’t know if the problem was a difference between old and new GRUB or what.  All I know is that I could not boot into Windows.  I could get to the files easily enough, but I couldn’t boot into it.  I tried everything, scouring and scouring the interwebz.  Everything failed.
    Then I came here.  Both I and my wife thank you.  The “bootsect /nt60 c:” command did the trick.  I just 30 seconds ago FINALLY saw the Win7 splash screen.
    THANK YOU(!) for posting this.

    • http://www.lukeaddison.com 1uk3

       Really glad it helped you out!