Windows安装Centos7双系统后Windows启动项消失

原文:
http://www.javashuo.com/article/p-zngolwau-v.html
https://blog.csdn.net/yingzinanfei/article/details/54862571html

方法一:
在Centos7下root登录vim

编辑 /boot/grub2/grub.cfgwindows

vim /boot/grub2/grub.cfg
在第一行添加centos

menuentry "Windows10" {
    insmod ntfs
    set root=(hd0,1)
    chainloader +1
}

其中(hd0, 1)的1表明你的windows10安装所在的盘centos7

修改完毕后保存并退出spa

而后设置Windows10为默认启动项(在Linux使用状况少时颇有必要).net

命令行输入:命令行

grub2-set-default "Windows10"

查看是否修改成默认是Windows10:code

grub2-editenv list

若是显示为Windows10则表示成功,reboot重启一下便可htm

方法二:
windows 七、8/10 安装centos7双系统后,默认会将mbr改写成为grub2,而默认的centos7不识别windows 的ntfs分区,因此启动项没有windows。
能够用3条命令,便可将windows添加到grub2的启动项。

首先保证互联网是通的。

su root
yum -y install epel-release
yum -y install ntfs-3g
grub2-mkconfig -o /boot/grub2/grub.cfg

3条命令运行成功,重启后,便可看到windows 7(loader)的启动项,便可进入windows。

 

 

转 : https://blog.csdn.net/yuxielea/article/details/88707332

相关文章
相关标签/搜索