2

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?

3

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:

1

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.
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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