0

I need to add Windows 10 in GRUB.

Windows 10 I have installed in legacy BIOS mode. Similarly as in the screenshot:

enter image description here

Ubuntu 16 I have installed in UEFI mode.

$ [ -d /sys/firmware/efi ] && echo UEFI || echo BIOS
UEFI

I have two hard drives. Each operating system is installed on a separate hard drive.

$ sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
NAME                    FSTYPE        SIZE MOUNTPOINT LABEL
sda                                 465,8G            
├─sda1                  vfat         19,5G            RECOVERY
├─sda2                  ntfs        445,8G            Windows 10
└─sda3                  ntfs          450M            
sdb                                 232,9G            
├─sdb1                  vfat          512M /boot/efi  
├─sdb2                  ext2          488M /boot      
└─sdb3                  crypto_LUKS 231,9G            
  └─sda3_crypt          LVM2_member 231,9G            
    ├─ubuntu--vg-root   ext4          224G /          
    └─ubuntu--vg-swap_1 swap            8G            
      └─cryptswap1      swap            8G [SWAP]     
sr0                                  1024M            

Boot Info Script results.

On Windows, I run the following command:

C:\WINDOWS\system32>bcdboot C:\Windows /s C: /f uefi

I performed this command to create a bootable configuration.

In Ubuntu file /etc/grub.d/40_custom I added the following option:

if [ "${grub_platform}" == "efi" ]; then
menuentry "Windows 10 (BCD-UEFI configuration on system drive /dev/sda2)" --class windows --class os {
    insmod part_msdos
    insmod ntfs
    insmod search_fs_uuid
    insmod chain

    set root='hd0,msdos2'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  8684C04C84C04103
    else
      search --no-floppy --fs-uuid --set=root 8684C04C84C04103
    fi

    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
fi

UUID of the partition labeled "Windows 10":

$ sudo blkid /dev/sda2
/dev/sda2: LABEL="Windows 10" UUID="8684C04C84C04103" TYPE="ntfs" PARTUUID="76692ca8-02"

The problem is booting Windows 10 does not progress further the Windows logo.

Windows-10-Boot-Logo

karel
  • 114,770
abg
  • 171
  • 1
  • 6
  • So, it has nothing to do with Ubuntu? –  Oct 17 '16 at 17:34
  • @CelticWarrior Is GRUB has nothing to do with Ubuntu? – abg Oct 17 '16 at 17:37
  • 1
    It has nothing to do with Windows getting stuck, what happens is after Grub. BTW, there's no way around it: You have to change modes in UEFI whenever you have OSes installed in different modes. You can't use Grub to boot Windows in that scenario. Also there's no point in installing Win10 in Legacy. –  Oct 17 '16 at 17:41
  • @CelticWarrior - Yes there is a point of installing Win in legacy. It makes dual-booting WAY easier. – You'reAGitForNotUsingGit Oct 18 '16 at 00:42
  • You will have to install Ubuntu in legacy as well. You can't mix modes. – You'reAGitForNotUsingGit Oct 18 '16 at 00:42
  • It IS possible to mix modes, but you'll need to use the firmware's built-in boot manager or rEFInd. See my answer to the duplicate question for details. – Rod Smith Oct 18 '16 at 13:30

0 Answers0