centos双系统只有linux,Centos添加Windows/Centos双系统启动
1 ?在/etc/boot/gurb2/grub.cfg中
### END /etc/grub.d/00_header ### 后添加:
### BEGIN /etc/grub.d/30os_prober ###
menuentry 'Windows 10(loader)(on /dev/sda1)'{
insmod part_msdos
insmod ntfs
set root='hd0,msdos1'
chainloader +1
}
### END /etc/grub.d/30os_prober ###
在Linux中查看Win7系統所在分區是sda幾,如果是sda1 set root='hd0,msdos1'依次類推。
2 ?修改啟動順序
在
terminal_output console
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
后面 添加 ?set default=0 ? ? 0代表啟動菜單中第一個選項 ?如果要選第三個 那就是3
3 ?刪除多余的系統啟動項
內核升級后,Linux會保留以前內核的啟動項,如果不需要就刪除。
rpm -q kernel ? ? ? ?顯示當前所有內核
rpm -e kernelxxxxx ? ? 刪除想刪除的內核
grub.cfg中相應的啟動菜單就會自動刪除。
總結
以上是生活随笔為你收集整理的centos双系统只有linux,Centos添加Windows/Centos双系统启动的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python缩进格式错误的是_Pytho
- 下一篇: linux 6.5桌面环境kde,Cen