300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > centos双系统只有linux Centos添加Windows/Centos双系统启动

centos双系统只有linux Centos添加Windows/Centos双系统启动

时间:2023-11-03 09:51:24

相关推荐

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中相应的启动菜单就会自动删除。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。