1

Ok so this might seem like a very common problem but I couldn't find answers anywhere for my specific case. I freed and created some unallocated space from my C:\ drive in windows and it all went well. But while installing Ubuntu 16.04LTS, this popup came up(sorry I am not allowed to embed images yet.): Popup.jpg

It means my windows is installed in BIOS mode, and I didn't want to force install Ubuntu in UEFI by clicking "Continue in UEFI", so I clicked "Go Back" instead. Installation loaded for a while and then it automatically moved forward to next step, I assumed that it'll now continue installation in BIOS mode, but now it only detected FreeDOS(my laptop shippped with it, its on /dev/sda1), and not Windows 10(which is on /dev/sda2), and gave me the option to "Install Ubuntu alongside FreeDOS" only, not windows10. I unfortunately considered that GRUB will detect it later and chose "something else", created / and swap from my unallocated space, and installed Ubuntu. But after installing GRUB isn't detecting Windows 10.

I confirmed my Ubuntu installation too is legacy BIOS as there's no /sys/firmware/efi directory, so it shouldn't be BIOS vs UEFI problem, also, my BIOS has "Legacy support" enabled. Also, os-prober only shows FreeDOS, as below:

/dev/sda1:FreeDOS:FreeDOS:chain I also tried Boot-Repair and performed "Recommended Repairs", but nothing changed. I tried running startup repair from inside windows 10 setup from bootable USB, but it couldn't fix it. I've got no idea how to get this working, is there something I am missing? Any help is greatly appreciated !

EDIT: Ok, so I also tried adding custom menu entry to 40_custom in /etc/grub.d/ as below:

menuentry 'Windows 10' {
set root='(hd0,msdos2)'  //as windows is on /dev/sda2
chainloader +1
}

but still, sudo update-grub2 shows:

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-45-generic
Found initrd image: /boot/initrd.img-4.4.0-45-generic
Found linux image: /boot/vmlinuz-4.4.0-31-generic
Found initrd image: /boot/initrd.img-4.4.0-31-generic
Found FreeDOS on /dev/sda1
done

No windows :(

aayushARM
  • 21
  • 1
  • 7
  • This is kind of unrelated, but I am surprised machines ship with FreeDOS. –  Oct 22 '16 at 14:30
  • May be best to see details: Post the link to the Create BootInfo summary report. Is part of Boot-Repair: https://help.ubuntu.com/community/Boot-Info – oldfred Oct 22 '16 at 15:23
  • It's possibly because of the way Windows got shut down. From Ubuntu, in terminal, run sudo ntfsfix /dev/sda2, then sudo update-grub, and see if GRUB found Windows this time. If so, boot to Windows and turn OFF fast boot in the Power control panel, and turn OFF hibernation in an admin command prompt window powercfg /h off. Let me know. Cheers, Al – heynnema Oct 22 '16 at 15:45
  • Did that yesterday, here you go: bootsummary @oldfred – aayushARM Oct 22 '16 at 15:47
  • I tried that too previously, grub still didn't detect windows. :( @heynnema – aayushARM Oct 22 '16 at 15:49
  • How did you resize your C: drive... using gparted, or Windows own Disk Management app, or something else? Please post a screenshot of gparted looking at your hard disk. Cheers, Al – heynnema Oct 22 '16 at 16:34
  • I used easeUS Partition manager on windows. – aayushARM Oct 22 '16 at 16:41
  • For now, as I had some urgent work to do, I booted from windows setup disk and had to run "bootrec /fixmbr" from command prompt. So GRUB has been overriden by windows bootloader and system directly boots to windows. I'll later try adding Ubuntu to this bootloader(if at all possible)... – aayushARM Oct 22 '16 at 16:46
  • Remember to turn off fast boot and hibernation, as per my previous comment. Cheers, Al – heynnema Oct 22 '16 at 17:09
  • You showed two boot flags. System only works with one boot flag on partition with boot files. And you only showed BCD in sda1, not in sda2 which is required for Windows to boot directly from sda2 (or for grub to know it is bootable). Grub does not use boot flag, but looks for bootmgr & BCD to know which partition is bootable. Perhaps your Windows repairs fixed issues? – oldfred Oct 22 '16 at 17:10

1 Answers1

0

Ok, so I solved this problem using EasyBCD from windows 10. One should always prefer using only GNU GRUB2 as default bootloader, this is more like a last resort solution.

NOTE: If anyone's having same problem, first read and try all the things I did (given in question), and also the comments, only do this if nothing works out.

As I said in question comments, I had to override GRUB2 with windows bootloader to boot in windows 10. Once booted, one can install EasyBCD and run it. Follow this guide to add an entry for Ubuntu in your windows boot menu. On rebooting, boot menu will show both Ubuntu and Windows installations, but there's a catch. On selecting windows, system proceeds to usual windows boot, but when Ubuntu is selected, windows bootloader will first call GRUB2, from wherein you can boot into Ubuntu(AKA "Chainloading").

There's surely a drawback as one has to go through two boot menus to boot into Ubuntu now, hence I'll say again, this is just an ad hoc solution and one should prefer trying other solutions first.

aayushARM
  • 21
  • 1
  • 7
  • how did you get to windows !!!!!!!!!!!!!!!!!!!!!!! please help i have the same problem and i can't enter windows is not showing in the boot!!! – Fadi Aug 14 '18 at 19:30