6

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.

enter image description here

3
  • 1
    What's the output of sudo os-prober? If that doesn't list Windows, please run Boot-Info and edit your question to include a link to its resulting info log. Thanks. Feb 23, 2017 at 16:14
  • @DavidFoerster cool comment - after 5 months) Feb 25, 2017 at 9:15
  • 3
    Well, even if it doesn't help you it may help someone with the same issue who may want to ask a similar question and wants to know which info to provide. It's also a message to other reviewers why I think they should close this question as unclear for lack of information. Feb 25, 2017 at 9:53

3 Answers 3

10

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
    

Rescatux

Rescatux is a free bootable live CD/USB that can repair GRUB and the Windows bootloader. Rescatux has a graphical interface with a menu of operating system rescue tasks. If your hard disk has the MBR partitioning format, you can select the Restore Windows MBR (BETA) option to repair the Windows bootloader. If your computer has UEFI firmware, you can select among the UEFI boot options.

Boot options:

  • (>=0.41 beta 1) Update UEFI order
  • (>=0.41 beta 1) Create a new UEFI Boot entry
  • (>=0.41 beta 1) UEFI Partition Status
  • (>=0.41 beta 1) Fake Microsoft Windows UEFI
  • (>=0.41 beta 1) Hide Microsoft Windows UEFI
  • (>=0.41 beta 1) Reinstall Microsoft Windows EFI
  • (>=0.41 beta 1) Check UEFI Boot

GRUB options:

  • (>=0.40 beta 11) Easy GNU/Linux Boot Fix
  • Restore GRUB and GRUB2
  • (>=0.31 beta 4) Update any GRUB2 menu
  • Update Debian/Ubuntu GRUB menus

Windows options:

  • Restore Windows MBR (BETA)
  • Clear Windows passwords
  • (>=0.31 beta 4) Promote a Windows user to Administrator role
  • (>=0.41 beta 1) Reinstall Microsoft Windows EFI
  • (>=0.31 beta 4) Unlock Windows user

Password options:

  • Change GNU/Linux Password
  • Regenerate sudoers file
  • Clear Windows passwords

Expert tools:

  • Boot-Repair
  • GParted
  • OS-Uninstaller
  • Clean-Ubiquity
  • PhotoRec
  • TestDisk

enter image description here
Rescapp is a nice wizard that will guide you through your rescue tasks.


How to make a Rescatux live USB from Ubuntu

  1. Install GParted partition editor with sudo apt install gparted.

  2. Insert a USB flash drive and check if the boot flag has been enabled on the flash drive using the GParted application. Unmount the USB flash drive. Open GParted and select the USB flash drive from the menu list of drives. From the GParted menu select: Partition -> Manage Flags -> check boot.

  3. It is very important to verify that the device that you are installing the Rescatux live USB to is indeed your flash drive, so that you don't overwrite any of your system or personal files which may make your operating system unbootable. In Ubuntu you can find the device name of the flash drive using the Disks application.

  4. Unmount the USB partition device. Let's say the USB partition device is /dev/sdc1

     sudo umount /dev/sdc1 # replace sdc1 with the partition name of your USB drive
    
  5. Change directories using cd to the path of the directory where the Rescatux iso file that you downloaded is located.

  6. Write the Rescatux iso file to the USB flash drive. In the following command replace rescatux_0.xxxx.iso with the name of the Rescatux iso file you downloaded.

     sudo dd if=rescatux_0.xxxx.iso of=/dev/sdc   
     sudo sync  
    

I have also been able to make a Rescatux live USB using the built-in Startup Disk Creator app.

1
  • 1
    Thank you! syslinux saved my Win7 installation when I could only load from a LiveUSB!
    – feos
    May 5, 2019 at 10:41
4

Can you still log into Ubuntu? If you can, open a terminal and type:

sudo update-grub

It will hopefully detect the Windows 7 installation and add its option to the grub boot menu.

1

You can use this utility to boot to your windows. SuperGrub2 lets you boot to any present OS regardless of MBR or Boot menu.

You can also use Rescatux from the same people to reinstall your windows boot loader.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .