Tuesday, July 24, 2012

How to restore Windows MBR under Linux

If you have made dual boot Windows/Linux and if you have e.g. due to some reasons deleted your Linux partition you may not be able to mount your Windows partition as Grub bootloader is still being loaded. You will get a grub rescue prompt at the start.

To restore your Windows MBR under Linux do the following:

Follow the previous post to create a bootable USB stick for Linux

Boot Linux from the USB.
Connect to internet.
Open terminal: CTRL ALT T

Type the following commands:

sudo apt-get install syslinux
sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
Put /dev/sda if this is the drive where you have your Windows partition.

Restart. Your Windows partition should boot normally.

No comments:

Post a Comment