redhat双系统Linux引导,RHEL 7 和 Windows 双系统安装

一、安装序顺

1. 先安装 Windows 操作系统

2. 再安装 RHEL 7 系统

二、grub 中,添加Windows 引导信息

因为安装rhel7后,只有Linux 的引导信息,而没有Windows 系统的信息,需要手工添加。

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

[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

}

2.重新编译生成启动菜单

[root@rhel7 ~]# grub2-mkconfig -o /boot/grub2/grub.cfg

3. 重新启动即可看到有Windows 引导项。

三、 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

四、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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值