I have Windows and Ubuntu dual boot on my machine. There’s only a boot-able ubuntu live-usb for recovering if I mess them up. This tutorial shows how to restore mbr the Windows bootloader from installed Ubuntu or Ubuntu livecd/usb.

There are two ways to do it:

First of all, boots into Ubuntu live-system and make a update by (launche Terminal to run commands):

sudo apt-get update

Method 1: Install syslinux by command:

sudo apt-get install syslinux

Then use dd command to write mbr:

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

Method 2: Install mbr package by command:

sudo apt-get install mbr

Then write mbr to your Windows disk:

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

You may need to change /dev/sda to where you installed Windows.