I've been running Windows 10 and Ubuntu 16.04 next to eachother for quite a while. I could boot into either OS with Grub bootloader. Unfortunatly my Windows 10 install broke and I needed to reinstall it.

After reinstalling Windows 10 I could not boot into it anymore with Grub bootloader. So I ran used my bootable Windows USB to execute the following commands to regain acces to Windows:

bootrec.exe /fixmbr
bootrec.exe /fixboot  
bootrec.exe /rebuildbcd 

After that I've used easyBCD to create a new Bootloader menu for Windows 10 and Ubuntu. This got it kind of working again. What I have to do now is to use Windows 10 boot menu to select either Windows 10 or Ubuntu, if I choose Windows 10 it sends me straight into the OS. If I choose Ubuntu however I get send to Grub bootloader with the broken link(?) to my old(?) Windows 10. And selecting Ubuntu boots me into the Ubuntu OS.

What I would like to achieve is that I have everything under the Grub Bootloader again but I'm very confused to what is happening here, so I was hopefull somone could help me out here.

Here are my current partitions: enter image description here

Edit: It seems like Grub Customizer is removing /etc/grub.d/40_custom when I try saving in Grub Customizer. When I add those lines in the original file and save it there, the boot option won't show in Grub Customizer.


Try this workaround

Perform these these commands:-


gedit 40_custom

add following lines in 40_custom file:

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

If that fails try this instead:

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

after edit save file and run following command :

grub2-mkconfig -o /boot/grub2/grub.cfg 

It add windows entry in the main configuration file.

then type:

  • I don't have a file named "40_custom" in that directory. :/ – Dan May 28 '17 at 20:40
  • Sorry I fixed the command, try as sudo – xavier_fakerat May 28 '17 at 20:49
  • other variations of root depend on your BIOS for gpt it can also be set root='(hd0,gpt1)' – xavier_fakerat May 29 '17 at 21:07

Try os-prober. Since you have installed another bootloader, you will also need to reinstall GRUB. Run the following commands to install os-prober and update your GRUB configuration:

sudo apt-get update
sudo apt-get install os-prober
sudo grub-install /dev/sda
sudo update-grub

Now reboot and your GRUB menu should be fixed!

  • I've already installed os-prober apparently. And I should run sudo grub-install /dev/nvme0n1p5 instead right? When I do, I get the following error message: grub-install: warning: File system 'ext2' doesn't support embedding. grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged.. grub-install: error: will not proceed with blocklists. – Dan May 29 '17 at 7:35
  • All those "errors" are actually warnings and can be ignored. I myself get them often. – fosslinux May 29 '17 at 8:04

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.