RHEL 7 和 Windows 双系统安装

 1、安装序顺linux

1. 先安装 Windows 操做系统windows

2. 再安装 RHEL 7 系统ide

 

2、grub 中,添加Windows 引导信息ui

由于安装rhel7后,只有Linux 的引导信息,而没有Windows 系统的信息,须要手工添加。this

 

 

1. 修改grub 自定义配置文件(本例 Windows server 2008 是安装在C 盘,且在安装时,Windows 自动创建了一个隐藏分区)spa

[root@rhel7 ~]# cat /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
操作系统

menuentry 'Windows Server 2008' {
         insmod part_msdos
         insmod ntfs
         insmod ntldr
         set root=(hd0,1)
         chainloader +1
         boot
 }
server

 

2.从新编译生成启动菜单
[root@rhel7 ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
it

 

 

3. 从新启动便可看到有Windows 引导项。console


 

3、 grub2更改启动顺序

grub2是经过/etc/grub.d/目录下的文件顺序来决定启动项顺序的,所以改变这些文件的序顺便可。

 

1. 修改文件的序顺

[root@rhel7 ~]# cd /etc/grub.d/
[root@rhel7 grub.d]# ls
00_header  10_linux  20_linux_xen  20_ppc_terminfo  30_os-prober  40_custom  41_custom  README

 

[root@rhel7 grub.d]# cp 40_custom 02_windows
[root@rhel7 grub.d]# ls
00_header  02_windows  10_linux  20_linux_xen  20_ppc_terminfo  30_os-prober  40_custom  41_custom  README

 

2.从新编译生成启动菜单
[root@rhel7 ~]# grub2-mkconfig -o /boot/grub2/grub.cfg

 

4、grub2 修改菜单显示时间

 

1.修改配置文件

[root@rhel7 ~]# vi /etc/default/grub
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="vconsole.keymap=us crashkernel=auto  vconsole.font=latarcyrheb-sun16 rhgb quiet"
GRUB_DISABLE_RECOVERY="true"

 

2.从新编译生成启动菜单[root@rhel7 ~]# grub2-mkconfig -o /boot/grub2/grub.cfg

相关文章
相关标签/搜索