centos7引导项grub配置文件

  学习linux,在电脑上安装了双系统,所以在centos7上需要设置一下启动引导项。这些都是基于安装完windows系统之后再安装llinux的基础下。

  方法一:直接用pe进入系统,用easybcd或者是easyuefi工具。没有尝试过

 

  方法二:进入centos,直接修改grub.cfg文件

vi /boot/grub/grub.cfg

 找到下面这行代码

### BEGIN /etc/grub.d/30_os-prober ###

在后面添加

menuentry "Windows7" {
insmod ntfs
set root=(hd0,1) #由于我的windows安装在硬盘的C盘,故(hd0,1)
chainloader +1
}

   方法三:系统自动检测替换

安装epel源

yum -y install epel-release

安装ntfs-3g

yum install ntfs-3g

 替换grub.cfd文件

grub2-mkconfig -o /boot/grub2/grub.cfg

 基本大功告成了

 

  问题来源:关于ntfs-3g格式识别问题,linux只能认识Ext3/4,fat32格式,如果Windows是NTFS格式磁盘分区,Grub2将无法识别。

 

转载于:https://www.cnblogs.com/gqjuly/p/10830704.html

你可能感兴趣的:(centos7引导项grub配置文件)