The changes made in grub.cfg don't take effect after the hard powering off/on.
Issue
-
The changes made in grub.cfg don't take effect after the hard powering off/on with ipmitool.
-
Steps to reproduce
- Delete the cmdline parameter, "intel_iommu=on" from GRUB_CMDLINE_LINUX line in /etc/default/grub
# cat /etc/default/grub ... GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=rhel00/root rd.lvm.lv=rhel00/swap rhgb quiet intel_iommu=on" ... # vim /etc/default/grub # cat /etc/default/grub ... GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=rhel00/root rd.lvm.lv=rhel00/swap rhgb quiet" ...
- Rebuild grub.cfg with grub2-mkconfig and check that the change has been applied
# grub2-mkconfig -o /boot/grub2/grub.cfg # cat /boot/grub2/grub.cfg | grep linux16 linux16 /vmlinuz-3.10.0-957.el7.x86_64 root=/dev/mapper/rhel00-root ro crashkernel=auto rd.lvm.lv=rhel00/root rd.lvm.lv=rhel00/swap rhgb quiet linux16 /vmlinuz-0-rescue-62d499ded71248fe9e0f179c4aaf4942 root=/dev/mapper/rhel00-root ro crashkernel=auto rd.lvm.lv=rhel00/root rd.lvm.lv=rhel00/swap rhgb quiet
- Power off the server with
ipmitool power off
# ipmitool power off
- Power on the server to boot into the kernel with the change being applied
- After powering on, we can see that the change has been applied to grub.cfg but not applied to cmdline
# cat /boot/grub2/grub.cfg | grep linux16 linux16 /vmlinuz-3.10.0-957.el7.x86_64 root=/dev/mapper/rhel00-root ro crashkernel=auto rd.lvm.lv=rhel00/root rd.lvm.lv=rhel00/swap rhgb quiet linux16 /vmlinuz-0-rescue-62d499ded71248fe9e0f179c4aaf4942 root=/dev/mapper/rhel00-root ro crashkernel=auto rd.lvm.lv=rhel00/root rd.lvm.lv=rhel00/swap rhgb quiet # cat /proc/cmdline BOOT_IMAGE=/vmlinuz-3.10.0-957.el7.x86_64 root=/dev/mapper/rhel00-root ro crashkernel=auto rd.lvm.lv=rhel00/root rd.lvm.lv=rhel00/swap rhgb quiet intel_iommu=on
- However, after the subsequent reboot, we can see that the change has been applied to both grub.cfg and cmdline
# systemctl reboot # cat /boot/grub2/grub.cfg | grep linux16 linux16 /vmlinuz-3.10.0-957.el7.x86_64 root=/dev/mapper/rhel00-root ro crashkernel=auto rd.lvm.lv=rhel00/root rd.lvm.lv=rhel00/swap rhgb quiet linux16 /vmlinuz-0-rescue-62d499ded71248fe9e0f179c4aaf4942 root=/dev/mapper/rhel00-root ro crashkernel=auto rd.lvm.lv=rhel00/root rd.lvm.lv=rhel00/swap rhgb quiet # cat /proc/cmdline BOOT_IMAGE=/vmlinuz-3.10.0-957.el7.x86_64 root=/dev/mapper/rhel00-root ro crashkernel=auto rd.lvm.lv=rhel00/root rd.lvm.lv=rhel00/swap rhgb quiet
Environment
- Red Hat Enterprise Linux 7
- ipmitool
- grub2
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.