RHEL 7 和 Windows 雙系統安裝

來源:互聯網
上載者:User

標籤:rhe7   grub2   

 一、安裝序順

1. 先安裝 Windows 作業系統

2. 再安裝 RHEL 7 系統

 

二、grub 中,添加Windows 引導資訊

因為安裝rhel7後,只有Linux 的引導資訊,而沒有Windows 系統的資訊,需要手工添加。

 

 

1. 修改grub 自訂設定檔(本例 Windows server 2008 是安裝在C 盤,且在安裝時,Windows 自動建立了一個隱藏式磁碟分割)

[[email protected] ~]# 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.重新編譯產生啟動菜單
[[email protected] ~]# grub2-mkconfig -o /boot/grub2/grub.cfg

 

 

3. 重新啟動即可看到有Windows 引導項。


 

三、 grub2更改啟動順序

grub2是通過/etc/grub.d/目錄下的檔案順序來決定啟動項順序的,因此改變這些檔案的序順即可。

 

1. 修改檔案的序順

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

 

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

 

2.重新編譯產生啟動菜單
[[email protected] ~]# grub2-mkconfig -o /boot/grub2/grub.cfg

 

四、grub2 修改菜單顯示時間

 

1.修改設定檔

[[email protected] ~]# 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.重新編譯產生啟動菜單
[[email protected] ~]# grub2-mkconfig -o /boot/grub2/grub.cfg

本文出自 “鐵釘” 部落格,請務必保留此出處http://nails.blog.51cto.com/640492/1548698

RHEL 7 和 Windows 雙系統安裝

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.