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上的其他内核启动.

解决方法

将/ etc / default / grub中的GRUB_DEFAULT = 0更改为您想要的数字,现在需要使用grub2-mkconfig -o /boot/grub2/grub.cfg重新生成grub2配置

相关文章

Linux中的ARP防火墙主要用于防御ARP欺骗攻击,其效果取决于多...
insmod和modprobe加-f参数导致Invalid module format错误 这...
将ArchLinux安装到U盘 几个月前入门Arch的时候上网搜了不少安...
1、安装Apache。 1)执行如下命令,安装Apache服务及其扩展包...
一、先说一下用ansible批量采集机器信息的实现办法: 1、先把...
安装配置 1. 安装vsftpd 检查是否安装了vsftpd # rpm -qa | ...