Restore Windows Bootloader

I installed Ubuntu on my laptop and something happened and my Windows 7 bootloader is missing. I can boot only Ubuntu. So, I tried to do something like suggested here How to restore Windows 7 loader or here, but when I see system recovery option there is no Windows 7 option.

3

3 Answers

Add Windows to GRUB boot menu

Boot Windows from grub rescue prompt


Repair Windows MBR

This tutorial shows how to repair your Windows bootloader (MBR) from Ubuntu dual boot or Ubuntu live DVD/USB. This can be useful if you don't have a Windows DVD on hand.

Boot into your Ubuntu operating system. When you're in Ubuntu, open the terminal and follow the below steps.

  1. Run this command to check your disk:

    sudo fdisk -l
    

    The output tells you the disk information:

    Disk /dev/sda: 320.1 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disk identifier: 0x016c8108
    
    Device Boot Start End Blocks Id System
    /dev/sda1 * 63 39054014 19526976 7 HPFS/NTFS/exFAT
    
  2. Now run these commands to install syslinux, which is a suite of lightweight IBM PC MBR bootloaders for starting up computers with the Linux kernel.

    sudo apt update
    sudo apt install syslinux 
    
  3. Once installed, you can fix your Windows bootloader by running the below command in the terminal:

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

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.