# Un-install ubuntu server and grub menu [duplicate]

I have installed ubuntu server 11.10 and win 7 on different drives (dual boot) on my laptop. Could anyone tell me how to remove ubuntu server and grub loader? I have tried log in to win 7 and format my ubuntu server drive. But it wont work. It just give me grub error while booting. Thanks..

-

## marked as duplicate by Mik, Seth♦, Raja, vasa1, hhlpFeb 24 '13 at 11:03

What happens if you change the hard disk boot order in the BIOS? Will it boot straight to Windows if the Windows drive is booted first? –  Wulfhart May 25 '12 at 20:29
Possible Duplicate: How to remove Ubuntu and put Windows back on? –  Aditya Feb 23 '13 at 18:51

You can format the partition using an *buntu installation CD/USB, or any other CD/USB that has Gparted, or other software able to identify Linux partitions. As for the MBR, it's probably OK to just leave it be, though you could overwrite it as well with dd. Just be sure to select the correct device. Be careful with this one!

sudo dd if=/dev/zero of=/dev/sdX bs=512 count=1

-
The problem is, if you format the Ubuntu root volume, most of the GRUB bootloader will disappear, but some stuff will still stick in the MBR of the disk. This will cause GRUB not to work anymore, and provokes boot errors like the one Alee is having. So basically, yes, you have to rewrite the content of the boot sector with a valid bootloader. "how to reinstall windows bootloader" on Google –  Alexandre P. Mar 18 '12 at 0:30
Oh! great.. Let me try thisss.. Thanks –  Alee Mar 18 '12 at 8:59
    5 min maximum . Uninstall UBUNTU  Dual Boot Win 7 .

To remove Ubuntu  installation, which is dual booted with windows 7, You want to make     sure  windows 7 can still work.
*******************************************************
. you need win7 installation disk , put it in.
. restart your computer, set the boot priority from bios setting cd or flashdrive
. When windows 7 installation comes up, choose repair
. choose repair this computer with recovery tool, click next
. choose command prompt
. enter this command
. bootRec.exe /fixmbr