Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm a Windows user. I tried to experiment with Linux and installed openSUSE on my system. I formatted a partition and installed Linux on that drive.

When I tried to remove Linux by formatting that drive, on the next boot, Windows wouldn't load.

Some GRUB bootloader error is displaying. I reinstalled Linux and everything was working fine again. So, how do I remove Linux from my system (from that drive) without affecting Windows' bootloader?

share|improve this question
add comment

3 Answers 3

up vote 3 down vote accepted

You have to reinstall the Windows boot loader. Use your Windows CD, choose the recovery option, and get to a command prompt. Then based on the Windows version you should run fixboot and fixmbr or Bootrec.exe/FixMbr.

More reading:

share|improve this answer
add comment

You can do it by formating the Linux partitions and create unallocated space in the disk manager. After that boot the computer with the windows cd in the cd-rom. It may take a few minutes to load. Select 'Recovery Console' by pressing 'r' choose Windows system and log into it

Press enter to bypass the administrative password prompt.
Type fixboot and press enter.
Type y to confirm choice and press enter.
Type fixmbr and press enter.
Type y to confirm choice and press enter.
Then retype fixboot and press enter.
Type y to confirm choice and press enter.
Type exit and press enter.
share|improve this answer
add comment

Boot from Linux and install the package:

 sudo apt-get install syslinux

If the package was installed, use the following to write the MBR.

 sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda

If it does not work, boot from Linux and install this package:

 sudo apt-get install mbr

Use this to write the MBR:

 sudo install-mbr -i n -p D -t 0 /dev/sda

To check, use:

 sudo fdisk -l
share|improve this answer
add comment

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.