如何使用Windows 10双重启动CentOS 7

时间:2020-02-23 14:38:03  来源:igfitidea点击:

本指南将向我们展示如何轻松地使用Windows 10双重引导CentOS7. 这也适用于Windows 7和Windows 8双重引导CentOS 7.
默认情况下,CentOS anaconda安装程序不会将grub配置为处理NTFS文件系统或者分区。因此,使用Windows 10双重启动CentOS 7需要手动干预。

如何使用Windows 10双重启动CentOS 7

引导到CentOS 7计算机并挂载包含Windows安装的分区。我们可以安装gparted磁盘分区管理器来记录Windows分区,只需在终端中执行以下命令

sudo yum -y install epel-release
sudo yum install -y gparted
sudo gparted

为了能够在CentOS 7上挂载NTFS文件系统,请安装以下程序。

sudo yum -y install ntfs-3g fuse ntfsprogs ntfsprogs-gnomevfs

编辑/etc/grub.d/40_custom文件。首先对其进行备份。

sudo cp /etc/grub.d/40_custom  /etc/grub.d/40_custom.original

然后编辑/etc/grub.d/40_custom文件,用vi编辑器或者nano打开它。

sudo vi /etc/grub.d/40_custom

在底部添加以下行

 Menuentry "Windows" {
set root=(hd0,3)
 chailoader +1
}

我们可以更改内的菜单项标题菜单,以反映Windows操作系统版本,尽管这不是必需的。

root =(hd0,3)行表示第一个硬盘驱动器上的第四个分区。将3替换为从gparted获取的Windows分区号,因为下图所示的Windows 10分区位于/dev/sda3

运行

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

检查新配置是否包含Windows详细信息

sudo cat  /boot/grub.cfg

重新启动系统

 sudo reboot

现在,我们应该可以使用Windows 10双重引导CentOS7.