1

I have three OS on my system in dual-boot: Windows 8, Linux Deepin 2014, and Ubuntu 14.04 LTS. Somewhere along the way, booting to windows no longer worked, and some time after that, only the Deepin boot worked.

So I re-installed Ubuntu (because it was my main working OS) and now it works again, but Windows is not booting. I tried fixing it with boot-repair but it failed, complaining: No boot loader is installed in the MBR of /dev/sda.. Here's the full report from it.

Now I'm afraid to even restart because who knows if Ubuntu is going to boot...

What should I do?

3
  • Is the Windows boot option available in grub? If not, what happens when you do a "sudo update-grub"? Sep 1, 2014 at 7:00
  • @DanJohansen It's available, but choosing it I see some "diskread error" or something and it goes back to the grub menu
    – yuvi
    Sep 1, 2014 at 7:02
  • Is the Windows boot device the same as Ubuntu's? I.E: grub overwrites the Windows boot manager for grub to route to each Ubuntu and Windows, usually on the default boot device in your BIOS.
    – user179946
    Sep 1, 2014 at 9:01

1 Answer 1

1

First - fix Windows booting, second - fix GRUB2. Let's start with Windows booting:

Boot from Windows 7 DVD and after choosing language options, start the console: "Repair your computer" -> "Use recovery tools..." -> "Command prompt". In the console run the following command to re-install Windows bootloader:

> bootrec /fixmbr

Then rebuild bootsector if it is corrupted, just to be sure:

> bootrec /fixboot

After that You should be able to boot into Windows through the standard Windows booting - no GRUB, no questions - just power on and boot into Windows as in single-boot Windows machine. Now, when Windows boots correctly, it is time to re-install GRUB2:

Boot from Ubuntu Desktop CD and run Terminal. Then mount the / filesystem of existing Ubuntu installation (/dev/sda2 in this example, but Your case may be different) as well as additional resources:

$ sudo mkdir /mnt/ubuntu
$ sudo mount /dev/sda2 /mnt/ubuntu
$ sudo mount --bind /dev /mnt/ubuntu/dev
$ sudo mount --bind /proc /mnt/ubuntu/proc
$ sudo mount --bind /sys /mnt/ubuntu/sys

After that, chroot to mounted directory and reinstall GRUB2:

$ sudo chroot /mnt/ubuntu
# grub-install /dev/sda
# exit

Reboot and GRUB2 is back. GRUB2 installation should automatically detect all available operating systems and put them into GRUB2 boot menu.

5
  • Thanks for the detailed answer (I'm assuming windows 8 is a similar process to windows 7, right?). But I'm wondering if there's a simple way to fix the MBR from Ubuntu? Or is it more reliable to use the windows CD?
    – yuvi
    Sep 1, 2014 at 9:12
  • 1
    Use Windows installation disk. There is no straightforward way to re-install Windows bootloader from ubuntu.
    – user280493
    Sep 1, 2014 at 9:20
  • it didn't work :-( ... Running the two commands I got "success" messages, but after restarting I still had the grub menu and trying to boot to windows didn't work... I tired several other repair options (frankly all of them except for the total-restart for the entire computer because I'm afraid it would remove Ubuntu). Maybe it isn't the MBR that's broken... What else can I do to find out the problem and fix it?
    – yuvi
    Sep 6, 2014 at 18:30
  • I should note - Windows 8 came pre-installed on the PC, and it did dual boot correctly with Ubuntu at some point, but stopped at a later one (I can't really tell when that happened, because I haven't used the windows system until now).
    – yuvi
    Sep 6, 2014 at 18:31
  • This worked for me! I have no idea why. I found it after re-enabling secure boot and receiving a similar error. Anyway, thanks for the help.
    – yuvi
    Sep 6, 2014 at 20:20

You must log in to answer this question.

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