linux – 如何在redhat 7上配置grub.cfg文件以便从特定内核启动

前端之家收集整理的这篇文章主要介绍了linux – 如何在redhat 7上配置grub.cfg文件以便从特定内核启动前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
在Red Hat EL版本5和6中,我们可以轻松更新/etc/grub.conf,以防我们想要通过默认变量更改内核
For example,grub.conf on redhat 5
 default=0
 timeout=5
 #splashimage=(hd0,0)/grub/splash.xpm.gz
 #hiddenmenu
  title Red Hat Enterprise Linux Server (2.6.18-410.el5)
   root (hd0,0)
   kernel /vmlinuz-2.6.18-410.el5 ro root=/dev/rootvg/slash
   initrd /initrd-2.6.18-410.el5.img
  title Red Hat Enterprise Linux Server (2.6.18-409.el5)
    root (hd0,0)
   kernel /vmlinuz-2.6.18-409.el5 ro root=/dev/rootvg/slash
   initrd /initrd-2.6.18-409.el5.img

如果我们想从内核2.6.18-409版本启动,请从这个/etc/grub.conf
然后我们只更改默认值= 1.
因此,在下一次启动时,操作系统将从旧内核开始

RHEL7非常不同.我在RHEL7中找到了/boot/grub2/grub.cfg
但我不明白如何更改文件以便从RHEL5上的其他内核启动.

@H_404_12@解决方法
将/ etc / default / grub中的GRUB_DEFAULT = 0更改为您想要的数字,现在需要使用grub2-mkconfig -o /boot/grub2/grub.cfg重新生成grub2配置
原文链接:https://www.f2er.com/linux/397114.html

猜你在找的Linux相关文章