Deepin 2015 安装后找不到win10 启动选项的解决办法
#sudo vi /boot/grub/grub.cfg
在export linux_gfx_mode后面加
menuentry “Windows 10 (loader)” –class windows –class os {
insmod part_gpt
insmod ntfs
set root=’hd0,gpt4′
if [ x$feature_platform_search_hint = xy ]; then
search –no-floppy –fs-uuid –set=root –hint-bios=hd0,msdos1 –hint-efi=hd0,msdos1 –hint-baremetal=ahci0,msdos1 windows分区的uuid
else
search –no-floppy –fs-uuid –set=root windows分区的uuid
fi
chainloader +1
}
之后:
#sudo update-grub 会看到提示:Found Windows 10 (loader) on /dev/sda1
#sudo reboot 即可看到启动选项中第三项变为了win10
此时
#sudo vi /boot/grub/grub.cfg可以看到 ### BEGIN /etc/grub.d/30_os-prober ###之后,新增了
menuentry ‘Windows 10 (loader) (on /dev/sda1)’ –class windows –class os $menuentry_id_option ‘osprober-chain-windows分区的uuid’ {
insmod part_msdos
insmod ntfs
set root=’hd0,msdos1′
if [ x$feature_platform_search_hint = xy ]; then
search –no-floppy –fs-uuid –set=root –hint-bios=hd0,msdos1 –hint-efi=hd0,msdos1 –hint-baremetal=ahci0,msdos1 windows分区的uuid
else
search –no-floppy –fs-uuid –set=root windows分区的uuid
fi
parttool ${root} hidden-
drivemap -s (hd0) ${root}
chainloader +1
}
注:
1)gpt4是和win10对应的。
2)uuid可以使用ls -l /dev/disk/by-uuid获得