How to add a Windows 10 entry to GRUB
Tofloor
poster avatar
savanweylyn
deepin
2015-12-26 09:12
Author
Edited by savanweylyn at 2015-12-26 01:22

Hi,

I've installed Deepin 15 RC and Windows 10 does not show up in GRUB even after running the update-grub command, while Ubuntu Kylin 15.10 show in GRUB. So whenewer i want to boot into Windows 10, i have to modify the boot order to Windows Boot Loader to boot to Windows 10. These are the outptuts of
  1. cat /etc/default/grub

  2. GRUB_BACKGROUND="/boot/grub/themes/deepin/background.png"
  3. GRUB_CMDLINE_LINUX_DEFAULT="splash quiet"
  4. GRUB_DEFAULT="Deepin 15 RC GNU/Linux"
  5. GRUB_DISTRIBUTOR="`lsb_release -d -s 2> /dev/null || echo Debian`"
  6. GRUB_GFXMODE="1366x768"
  7. GRUB_THEME="/boot/grub/themes/deepin/theme.txt"
  8. GRUB_TIMEOUT="5"
Copy the Code
and
  1. lsblk

  2. NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
  3. sda      8:0    0 465,8G  0 disk
  4. ├─sda1   8:1    0   450M  0 part
  5. ├─sda2   8:2    0   100M  0 part /boot/efi
  6. ├─sda3   8:3    0    16M  0 part
  7. ├─sda4   8:4    0 309,7G  0 part /mnt/OS
  8. ├─sda5   8:5    0   483M  0 part
  9. ├─sda6   8:6    0    75G  0 part /mnt/Kylin
  10. ├─sda7   8:7    0     4G  0 part [SWAP]
  11. └─sda8   8:8    0    76G  0 part /
Copy the Code
So how can i create a GRUB entry for Windows 10?

Reply Favorite View the author
All Replies
eric52
deepin
2015-12-26 16:22
#1
Well, it's Xmas, so quick replies are less likely. I don't have a lot to offer, because I have little experience with Windows 10. I have read that between quick boot, secure boot, and other "innovations" Windows 10 does not welcome any other OS. Apparently this can apply to hardware on machines that come with 10, so I'm guessing that you're using an upgraded system. I'll bet you had to jump through a few hoops to get Linux working. I wonder if that might be a concern. In any event, assuming Windows 10 is on sda1, try:
  insmod part_msdos
  insmod ntfs
  set root='(hd0,msdos1)'
  chainloader +1
Reply View the author
savanweylyn
deepin
2015-12-27 01:59
#2
https://bbs.deepin.org/post/30491
Well, it's Xmas, so quick replies are less likely. I don't have a lot to offer, because I have littl ...

Windows 10 is on the 4th partition. The first is a recovery partition created automatically at windows installation, the second is the Windows bootloader, the third is a Microsoft Reserved partition and the fourth partition is where the Windows 10 was installed. Again, these partitons were created automtically while installing Windows.
Reply View the author
laoguang
deepin
2015-12-27 04:06
#3
check your efi partition, maybe you should use os-prober.
Reply View the author
savanweylyn
deepin
2015-12-27 06:10
#4
https://bbs.deepin.org/post/30491
check your efi partition, maybe you should use os-prober.

There are two supbfolders in /boot/efi. These are Boot, which is empty and EFI, which contains 6 subfolders: Boot, deepin, Deepin 2014.3, Deepin Desktop 15, Microsoft and ubuntu. In the Boot folder there is a file, called bootx64.efi, in the deepin, Deepin 2014.3 and Deepin Desktop 15 folders is another .efi file, called grubx64.efi. In the ubuntu folder are grubx64.efi, grub.cfg, MokManager.efi and shimx64.efi. In the Microsoft folder are two subfolders, called Boot and Recovery. There are several subfolders and files in Boot (see screenshot at ).
Reply View the author
laoguang
deepin
2015-12-27 22:36
#5
https://bbs.deepin.org/post/30491
There are two supbfolders in /boot/efi. These are Boot, which is empty and EFI, which contains 6 s ...

seems to be very screwed up, try installing refind...
Reply View the author
finid
deepin
2015-12-30 20:40
#6
I just installed Deepin 15 beta on a laptop with Windows 10, and GRUB as added automatically. Note that I disabled Secure Boot before the installation. If it helps, a detailed guide has been posted at here
Reply View the author
savanweylyn
deepin
2016-01-03 07:00
#7
Edited by savanweylyn at 2016-1-2 23:01
https://bbs.deepin.org/post/30491
I just installed Deepin 15 beta on a laptop with Windows 10, and GRUB as added automatically. Note t ...

It's a great help but i didn't want to reinstall Deepin, so I've asked this question on another linux forum and i could solve this problem with their help.
This is what i had to do:

Copy the  40_custom file from /etc/grub.d to my home folder, then open it and write these after the
# the 'exec tail' line above line:
menuentry 'Windows 10' --class windows --class os $menuentry_id_option 'osprober-efi-XXXX-XXXX' {
insmod part_gpt
insmod fat
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root XXXX-XXXX
fi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

then execute the sudo blkid | grep sda2 command, copy the partition's UUID and replace the three 'XXXX-XXXX' with it. After that save the changes and copy the 40_custom file to /etc/grub.d and make it executable with the sudo chmod 755 /etc/grub.d/40_custom. Finally i had to update GRUB with sudo update-grub.
Reply View the author
le******54@gmail.com
deepin
2022-11-25 01:00
#8
The user is banned, and the content is hidden.
d***g@gmail.com
deepin
2023-07-01 00:58
#9
The user is banned, and the content is hidden.