zoukankan      html  css  js  c++  java
  • 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获得

    参考:https://bbs.deepin.org/forum.php?mod=viewthread&tid=34415&extra=

  • 相关阅读:
    事件(五):事件委托
    事件(四):事件类型
    【[ZJOI2005]午餐】
    【[POI2006]OKR-Periods of Words】
    【2^k进制数】
    【[SHOI2015]脑洞治疗仪】
    【[NOI2016]区间】
    【[SHOI2014]概率充电器】
    【逛公园】
    【[CQOI2014]数三角形】
  • 原文地址:https://www.cnblogs.com/phoenix--/p/5355125.html
Copyright © 2011-2022 走看看