3

So I updated Ubuntu to 14.04 a few days ago and I just noticed Windows 10 went missing from the grub menu options. I tried multiple variations of update-grub and tried using boot-repair, too, but nothing fixed it. Here's the pastebin from boot-repair.

I'm at a loss as to what to try next. Any help?

EDIT: After reading a few suggestions elsewhere, I tried editing /etc/grub.b/40_common, and here are its current contents:

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply     type the
# menu entries you want to add after this comment.  Be careful not to     change
# the 'exec tail' line above.
menuentry "Windows 10" {
    set root='(hd0,msdos1)'
    chainloader +1
}
menuentry "Windows 102" {
    set root='(hd0,msdos2)'
    chainloader +1
}

But booting from either "Windows 10x" option doesn't work.

Option 1 (set root='(hd0,msdos1)') displays this error (imgur .com/AbymY1r.jpg), which stays onscreen for about half a minute or until I ctrl+alt+del out of it (which restarts the computer and goes back to grub).

Option 2, on the other hand, gives off this error:

BOOTMGR is missing
Press Ctrl+Alt+Del do restart

I tried using the repair options through the Windows 10 installation disk, and assorted commands within it (e.g. bootrec /RebuildBcd, bootrec /FixMbr and bootrec /FixBoot), but all that did was screw up grub again, and I ended up not being able to boot to neither Ubuntu nor Windows. I made grub come back by using the Ubuntu Live CD, now I'm back to the same problem, except for these new Windows 10 entries I manually added to grub.

This is the output for fsbkl -f:

NAME   FSTYPE LABEL           MOUNTPOINT
sda                           
├─sda1 ntfs   System Reserved 
├─sda2 ntfs                   
├─sda3                        
├─sda5 swap                   [SWAP]
└─sda6 ext4                   /
sr0

EDIT 2: SOLVED!

So, I managed to solve it by following Christian_Sosa's answer at MS support, basically run chkdsk on the windows drives and then try startup repair. In my case, chkdsk did the trick.

9
  • Keep /etc under version control. If comes in handy if your config changes and you don't know why, and/or you want to change it back. And what good do you think update-grub is doing to do? This just installs GRUB. What makes you think GRUB is not installed? Check and see what packages were updated. /var/log/dpkg.log, and also the files in /var/log/apt, particularly history.log. Note that /boot/grub/grub.cfg is assembled from files in /etc/grub.d. Commented Mar 18, 2016 at 17:25
  • I can't see anything wrong in the logs you mentioned. Here are their contents: /var/log/dpkg.log : pastebin.com/a7Zvzyun /var/log/apt/history.log : pastebin.com/spAYRQCB
    – zynphull
    Commented Mar 21, 2016 at 16:38
  • Put the command and its output from history.log in the question. It's relevant. I wouldn't bother with dpkg.log. It looks like GRUB was updated, but it was a minor update. Do you have backups of the /etc directory? If so, you could check what changed. In any case, check out etckeeper for keeping /etc/ under version control. Commented Mar 21, 2016 at 16:51
  • Do you have os-prober installed? I'd install it and retry "update-grub" to see if Windows is recognized. Commented Mar 21, 2016 at 16:56
  • I'm no expert on GRUB2, which is a pain in the rear. But the logic is that GRUB2 hands off the boot to Windows, I think. You should check that the root partition ((hd0,msdos1)) is correct. Have you? Can you paste the output of lsblk, please? That gives the partition layout. Commented Mar 21, 2016 at 16:57

2 Answers 2

0

I also had the same problem while updating Ubuntu from 12.04 to 14.04.
Boot Ubuntu from a live USB/CD and install Boot Repair

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo sed 's/trusty/saucy/g' -i /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list
sudo apt-get update
sudo apt-get install -y boot-repair && (boot-repair &)

If it doesn't gets repaired automatically by boot-repair, then you may try it again and at the end of the process play with "Advanced options".

3
  • As I said, I already tried using boot-repair, and nothing changed.
    – zynphull
    Commented Mar 21, 2016 at 16:29
  • Did you tried to tweek advanced options..? I heard of some users that made it work thanks to that...
    – marc
    Commented Mar 21, 2016 at 16:48
  • Yeah, no luck either, I even tried selecting Windows as the default boot option or something, and nothing changed, still no "Windows" option in grub.
    – zynphull
    Commented Mar 21, 2016 at 17:04
0

So, I managed to solve it by following Christian_Sosa's answer at MS support, basically run chkdsk on the windows drives and then try startup repair. In my case, chkdsk did the trick.

  1. Boot "Repair" mode from a Windows 10 install disk.
  2. Launch the command prompt
  3. Type the following commands:

    • diskpart

      This will launch the disk partition utility, we will want to know the volume disk letter for where our OS is located.

    • list volume

      It should list your HDD as well as their drive letter. Remember the drive letter that is in a HDD that most resembles the storage capacity. It may or may not say "boot" for file description.

In my case, I had to repeat this process both for C: and D: drives, though both had very different sizes.

  • exit

    In order to run the next command we will need to exit the disk partition utility.

  • chkdsk /f X:

    replace X for your boot os drive letter that we confirmed earlier.

    1. Reboot the system back into the Recovery disc.
    2. Choose Startup Repair and let it run.

In my case, Startup repair never actually ran, but I tried anyway. It seems chkdsk alone did the trick. And for the record, the correct grub menuentry in my case was

menuentry "Windows 10" {
  set root='(hd0,msdos1)'
  chainloader +1
}

Thanks for the answers and comments.

4
  • Does that mean it was a Windows corruption issue? If so, any idea why the entry disappeared from GRUB2? Commented Mar 22, 2016 at 19:40
  • No idea why it disappeared. To be frank, I can't even be sure it was precisely after I updated Ubuntu that the grub entry disappeared. It could've been something else and I just didn't notice (because I just hadn't used Windows in a while). As for the Windows issue, I suppose we can only guess: maybe the update (or whatever it was) screwed up not only grub, but also the windows bootmgr, thus forcing me to fix both.
    – zynphull
    Commented Mar 24, 2016 at 1:23
  • Ok. Well, that's why people put /etc under version control. Your GRUB2 config is controlled by files in /etc. So, if it is under version control, you'll know when the files changed. Check out etckeeper, which does precisely this. Commented Mar 24, 2016 at 8:03
  • Will look into etckeeper. Thank you very much for the help!
    – zynphull
    Commented Mar 25, 2016 at 15:35

You must log in to answer this question.

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