Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I installed Ububtu 12.04LTS as dual boot along with my Windows 7. I need to remove Grub and restore Windows MBR but without uninstalling Ubuntu

share|improve this question
    
Read this. It will give you an idea of how to uninstall GRUB. In order to completely remove GRUB you need to use FixMBR from a Windows CD. To fix the MBR read this. –  kalpetros Apr 4 '13 at 4:49

2 Answers 2

To install a Windows bootloader, boot Windows and create a Repair CD. Boot from the repair CD (or from your original Windows DVD) to a repair prompt and run:

bootrec /fixmbr

(If you use Windows XP then the command is: fixmbr)

If you can't boot Windows and can't create a repair CD, you can install something like lilo which works identically to the Windows boot loader when used as shown below. Boot from an Ubuntu CD/USB and select "Try Ubuntu", connect to the internet and drop to a terminal (Ctrl+Alt+T):

sudo apt-get update
sudo apt-get install lilo
sudo lilo -M /dev/sda mbr

Note, when you install lilo it will popup a big warning. You can ignore this (as it's not relevant when installing a Windows-style bootloader) - Tab to OK and hit enter. Also, if you don't boot from /dev/sda change as appropriate.

If you're planning to continue to boot Ubuntu after replacing the Windows bootloader you can use easyBCD. Otherwise you'll need to boot a live CD/USB to reinstall Grub later.

share|improve this answer

Install EasyBCD 2.2 go to advanced options, select which partition has Win7/xp installed and in the MBR configuration options select as per the OS you have installed. Click on write MBR and restart..Voila..Go to disk management and restore the linux partitions by deleting and formatting them.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.