新聞中心
GRUB 是一個(gè)多重啟動(dòng)管理器。GRUB 是 GRand Unified Bootloader 的縮寫(xiě),它可以在多個(gè)操作系統(tǒng)共存時(shí)選擇引導(dǎo)哪個(gè)系統(tǒng)。它可以引導(dǎo)幾乎所有的 Unix,Linux,Windows 操作系統(tǒng)。它可以 載入操作系統(tǒng)的內(nèi)核和初始化操作系統(tǒng),或者把引導(dǎo)權(quán)交給操作系統(tǒng)來(lái)完成引導(dǎo)。

創(chuàng)新互聯(lián)建站是一家集網(wǎng)站建設(shè),濱城企業(yè)網(wǎng)站建設(shè),濱城品牌網(wǎng)站建設(shè),網(wǎng)站定制,濱城網(wǎng)站建設(shè)報(bào)價(jià),網(wǎng)絡(luò)營(yíng)銷(xiāo),網(wǎng)絡(luò)優(yōu)化,濱城網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強(qiáng)企業(yè)競(jìng)爭(zhēng)力。可充分滿足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時(shí)我們時(shí)刻保持專(zhuān)業(yè)、時(shí)尚、前沿,時(shí)刻以成就客戶成長(zhǎng)自我,堅(jiān)持不斷學(xué)習(xí)、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實(shí)用型網(wǎng)站。
如何添加Windows 10啟動(dòng)項(xiàng)到GRUB2
裝的雙系統(tǒng),第一個(gè)系統(tǒng)裝的是Windows 10,然后再安裝Centos7。裝完Centos7發(fā)現(xiàn)沒(méi)有Windows 10的啟動(dòng)項(xiàng),這時(shí)候需要手動(dòng)添加windows 10的啟動(dòng)項(xiàng)。
# 打開(kāi)40_custom文件,添加如下內(nèi)容
[root@localhost ~]# vim /etc/grub.d/40_custom
menuentry 'Windows 10' {
insmod ntfs
set root='hd0,1'
chainloader +1
}
# 修改完成之后,需要導(dǎo)出生成配置文件,這樣才能生效。
[root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
重啟電腦,檢查一下是否有Windows 10啟動(dòng)項(xiàng)
如何更改默認(rèn)啟動(dòng)項(xiàng)
列出所有啟動(dòng)項(xiàng)
[root@localhost ~]# grep '^menuentry' /boot/grub2/grub.cfg |cut -d "'" -f 2
CentOS Linux (3.10.0-1062.el7.x86_64) 7 (Core)
CentOS Linux (0-rescue-2fbe0839e3b3416b960e84dab68c8bb3) 7 (Core)
Windows 10
修改Windows10作為默認(rèn)啟動(dòng)項(xiàng)
[root@localhost ~]# grub2-set-default "Windows 10"
檢查是否設(shè)置成功
[root@localhost ~]# grub2-editenv list
saved_entry=Windows 10
保存更改
[root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-1062.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-1062.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-2fbe0839e3b3416b960e84dab68c8bb3
Found initrd image: /boot/initramfs-0-rescue-2fbe0839e3b3416b960e84dab68c8bb3.img
done
如何更改grub2菜單的超時(shí)時(shí)間
打開(kāi)/etc/default/grub文件,修改GRUB_TIMEOUT變量值,變量的值是秒數(shù)。
[root@localhost ~]# vim /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="gfxterm"
GRUB_BACKGROUND=/boot/grub2/background.jpg
GRUB_GFXMODE=1440x900,1024x768,640x480
GRUB_CMDLINE_LINUX="crashkernel=auto spectre_v2=retpoline rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
保存生成配置文件
[root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-1062.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-1062.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-2fbe0839e3b3416b960e84dab68c8bb3
Found initrd image: /boot/initramfs-0-rescue-2fbe0839e3b3416b960e84dab68c8bb3.img
done
網(wǎng)站標(biāo)題:Centos7中添加GRUB2啟動(dòng)項(xiàng)
本文來(lái)源:http://www.dlmjj.cn/article/coeogsc.html


咨詢(xún)
建站咨詢(xún)
