I installed Ubuntu 14.04 and then installed Windows 10, so I normally boot GRUB 2 to access both, but one day my keyboard stopped working with GRUB 2. So I changed GRUB 2 with Windows 7 bootloader using easyBCD, but the problem remains.

But one day Windows 10 bootloader appeared, I don't know how it appeared, but only for one time, and in it both mouse and keyboard worked fine.

What I need:

1--To change Windows 7 bootloader to GRUB 2 or change Windows 7 bootloader to Windows 10 bootloader if that's easier.

2--After changing to GRUB 2 I need to change to Windows 10 bootloader which has the option to boot in Windows 10 and to GRUB 2/Ubuntu. I am not an expert in Ubuntu so please give a clear, detailed solution.

Please help I can't access Ubuntu most of the time because the keyboard is not working.

I also turned on legacy support in BIOS, but that didn't help.


Great question. Troubleshooting this depends on many factors however. I have a few questions which might help clarify the solution:

  1. Which system did you install last? It sounds like maybe you had Windows 7 preinstalled, then installed Ubuntu, then installed Windows 10?
  2. Are these all installed on the same hard drive? If not, which OS's are on which hard drive? Which HD is primary in your boot order?
  3. Are you using UEFI or legacy BIOS? I'm assuming legacy if you had Win 7 first and you were able to dual-boot Linux without too much trouble (many options to change in Win 10 first otherwise), but I could be wrong. It mainly depends on how old your computer is and if Windows 10 came preinstalled.
  4. How did you install Win 10? Did you apply any special settings (i.e. deployed Win 10 in BIOS mode) or subsequently edit the boot settings? One thing that's confusing to me is that, if you installed Windows 10 last then it should have overwritten GRUB 2 in your Master Boot Record (MBR) and/or switched to UEFI (if your motherboard is capable). In either case you wouldn't be able to boot into Ubuntu at all. Please elaborate on how you completed the Windows 10 install (if you remember).

Anyway, moving on with the answer. To figure out which firmware interface you're using, in Windows 10 open the Run window (Windows + R) and type msinfo32. About halfway down your BIOS Mode will be listed.
Note that you can also run msinfo32 from Windows 7, and there is a listing for the BIOS there as well, but because UEFI was not in use yet when that OS was released I think it will just give you your BIOS version, so it's probably best to check this from Win 10 instead.

Solution 1

If this hardware configuration involves more than one hard drive, you might simply be booting to the wrong HD. For instance, if you have Win 7 / Ubuntu on Drive 1, and Win 10 on Drive 2, and Drive 1 is set as primary, then your system will continue to boot to that drive despite your BCD settings. To check / edit this you'll need to boot into your BIOS or UEFI. To do this:

    1. Boot the PC, and press the manufacturer’s key to open the menus. Common keys used: Esc, Delete, F1, F2, F10, F11, or F12. During startup, there’s often a screen that mentions the key. If there’s not one, or if the screen goes by too fast to see it, check your manufacturer’s site.

    2. Or, from within Windows 10, from either the Sign on screen or the Start menu, select Power (Power button icon) > hold Shift while selecting Restart. Select Troubleshoot > Advanced options > UEFI Firmware settings.

    3. Once in your BIOS or UEFI, check your hard drive boot order. The solution might be as simple as setting your Windows 10 hard drive to first.
    I'll need to know more about your hardware configuration and boot order before I can make any more specific recommendations in this regard.
Source: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/boot-to-uefi-mode-or-legacy-bios-mode

Solution 2 (Legacy BIOS only)

Assuming it's Legacy BIOS, EasyBCD is probably your best option. Maybe you just didn't have all the required settings selected? There is a nice step-by-step detailing the process here: http://linuxbsdos.com/2012/03/10/restore-the-windows-bootloader-to-mbr-after-dual-booting-with-linux/

Briefly the steps are as follows:

    1. Click on the BCD Deployment tab. From there click Write MBR. This will restore the Windows bootloader to the MBR.
    If successful a message will appear at the bottom left informing you that the MBR has been written. But this also means that you've now lost GRUB and have no way to boot into Linux anymore.

    2. Click on the Add New Entry tab. This is where you'll add your Ubuntu installation.
    While there, click on the Linux/BSD tab, then select GRUB 2 from the dropdown. Modify the name to reflect your Linux distribution (Ubuntu 14.04 in your case?) and click the Add Entry button.

    3. Click the Edit Boot Menu tab to see the new entry. You can also select the order the operating systems are listed here and set the timeout (in seconds) before the default is booted without user input.

    4. Just to be certain at this stage I might suggest you go back and Write MBR again to make sure your edits above are written.
If EasyBCD isn't working for you, or you want another option, there's also a command-line bcdedit tool in built into Windows: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/bcdedit-command-line-options
You'll need to run that from a command prompt with administrator rights.

Other Resources

Because your question was a bit vague (unclear about the firmware interface, order you installed the OS's, hard drive configuration, etc.) it's quite difficult to compose a "one-size fits all" solution. Hence I have listed some additional resources that you may find helpful below.

There is a detailed answer to your question on the AskUbuntu site found here: https://askubuntu.com/questions/825686/how-can-i-use-with-the-windows-bootloader-with-windows-10-ubuntu-16-04-dual-boot

Ordinarily, you'll use both GRUB2 and the Windows boot loader, because GRUB2 cannot launch a Windows kernel directly and the Windows boot loader cannot launch a Linux kernel directly. To boot Windows from GRUB2, GRUB2 launches the Windows boot loader; and to boot Ubuntu (or any Linux distribution) from the Windows boot loader, it launches GRUB2.

In the end, they recommend using a third-party boot manager such as systemd-boot or rEFInd.

There are some notes on editing the Windows 7 bootloader here: http://blog.nold.ca/2010/09/adding-ubuntu-to-windows-7-bootloader.html

There is another post with lots of useful information here: https://askubuntu.com/questions/124617/easy-bcd-help-dual-boot-win7-and-ubuntu-11-10-add-new-entry-for-ubuntu

Finally there is more info on dual-booting Windows and Ubuntu here: https://askubuntu.com/questions/274371/install-on-second-hard-drive-with-startup-boot-option

If you're using UEFI instead, the answer is completely different. I have posted another potential solution for that case. Happy to provide additional information there as well once you give more specifics.

  • 1
    We expect answers, to contain all relevant information, within their body. Your welcome to quote and cite all the references you need to answer a question (I sometimes quote upwards of 6 different references) but all the information is contained in any answer I submit. – Ramhound Jul 13 '18 at 3:41
  • The complete answer depends on his answering the two questions at the top. His original question was unclear hence all the references. – Allan Smithee Jul 13 '18 at 3:55
  • The answer was modified to include more detailed information. If you like it better now please remove your negative vote. Thanks. – Allan Smithee Jul 13 '18 at 5:17
  • If the question was unclear, then you shouldn't be answering it. Until you reach 50+ reputation and can comment everywhere, please constrain yourself to answering questions that are clear. – robinCTS Jul 13 '18 at 6:32
  • Well apparently nobody was willing to answer because it had been up here for 10 months. I'm sure he'd rather see a solution than nothing. What I have added should solve it or at least get him on the right track. – Allan Smithee Jul 13 '18 at 6:35

If you're using UEFI, you might have to use that to edit. Modified from here: https://askubuntu.com/questions/66070/how-to-set-windows-bootloader-as-default-bootloader

Reboot your computer and enter the bios (by pressing DEL in my case).

Go to Boot Options --> (This step may vary) Hard Disk Drive priority --> 1st Priority -> Windows Boot Loader

The second step may vary depending on how you installed Ubuntu / Windows

The key is that if ubuntu is set to a higher priority (HDD priority or boot device priority), you should replace that with the Windows Boot Loader.

To repair your Windows bootloader, if you have a Windows CD

  1. Boot from CD
  2. From title screen, open terminal (the button is usually in bottom left corner)
  3. Execute bootrec /fixmbr
    If this doesn't give desired results, try bootrec /fixboot

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.