On Mon, Feb 13, 2017 at 09:53:08AM +0000, Dominic Cleal wrote:
Make sure that /etc/grub2.cfg exists and is a symlink
to
/boot/grub2/grub.cfg.
Otherwise try running `new-kernel-pkg -v --package kernel --install
3.10.0-514.6.1.el7.x86_64` (for a version you've got installed) and it
should state why it's not running grubby.
Thanks, that seems to have got it. The "new-kernel-pkg" command line
is particularly useful as it reveals that you need both for
/boot/grub2/grub.cfg to exist and for the /etc/grub2.cfg symlink to
point to it.
Verified it works by removing and installing the kernel package:
# grub2-mkconfig -o /boot/grub2/grub.cfg
# ln -s /boot/grub2/grub.cfg /etc/grub2.cfg
# grubby --default-kernel
/boot/vmlinuz-3.10.0-514.el7.x86_64
# rpm -e kernel-3.10.0-514.el7.x86_64
# grubby --default-kernel
(no output because kernel-3.10.0-514.el7.x86_64 was removed from
/boot/grub2/grub.cfg)
# yum install kernel-3.10.0-514.el7.x86_64
.
.
.
Installed:
kernel.x86_64 0:3.10.0-514.el7
Complete!
# ls -la /boot/grub2/grub.cfg
-rw-r--r--. 1 root root 5380 Feb 13 10:04 /boot/grub2/grub.cfg
(modification time has been updated)
# grubby --default-kernel
/boot/vmlinuz-3.10.0-514.el7.x86_64
And I need to update my proposal to check /boot/grub2/grub.cfg as
well, it seems.
Cheers,
Andy
--
https://bitfolk.com/ -- No-nonsense VPS hosting