grub.cnf - missing kernels
grub.cnf - missing kernels
Hello,
I stumbled on to this problem when trying to install VMware Workstation Pro. The installation was looking for the 3.10.0-1160.11.1 kernel header files.
The system was installed using the Centos 7 files downloaded from centos.org.
When I boot up, I only see one entry for a kernel, 3.10.0-1127.19.1.el7.x86_64. (See the attached boot menu screenshot.) I am expecting to see an entry for the 3.10.0-1160.21.1.el7.x86_64 kernel.
Here are the kernel packages that are installed.
kernel-headers-3.10.0-1160.21.1.el7.x86_64
kernel-3.10.0-1160.11.1.el7.x86_64
kernel-3.10.0-1160.21.1.el7.x86_64
kernel-3.10.0-1127.19.1.el7.x86_64
kernel-3.10.0-1127.el7.x86_64
kernel-tools-3.10.0-1160.21.1.el7.x86_64
kernel-devel-3.10.0-1160.21.1.el7.x86_64
kernel-tools-libs-3.10.0-1160.21.1.el7.x86_64
After looking around, I was not able to find any grub.cfg files. After much trouble-shooting I ended up creating 3 grub.cfg files because nothing was changing.
1. grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
2. grub2-mkconfig -o /boot/grub2/grub.cfg
3. grub2-mkconfig -o /boot/grub/grub.cfg
Even after creating these grub.cfg files and rebooting each time, I still only see what's in the attached boot menu screenshot. Even though I see the expected entries for the following images in the cfg files.
-rwxr-xr-x. 1 root root 6.5M Sep 21 2020 vmlinuz-0-rescue-d1d3d38d84ca471e8cbba335d20b3bff
-rwxr-xr-x. 1 root root 6.5M Aug 25 2020 vmlinuz-3.10.0-1127.19.1.el7.x86_64
-rwxr-xr-x. 1 root root 6.5M Mar 31 2020 vmlinuz-3.10.0-1127.el7.x86_64
-rwxr-xr-x 1 root root 6.5M Dec 18 11:38 vmlinuz-3.10.0-1160.11.1.el7.x86_64
-rwxr-xr-x 1 root root 6.5M Mar 16 14:32 vmlinuz-3.10.0-1160.21.1.el7.x86_64
Where is the grub file that is being used?
Thanks!
Gary
I stumbled on to this problem when trying to install VMware Workstation Pro. The installation was looking for the 3.10.0-1160.11.1 kernel header files.
The system was installed using the Centos 7 files downloaded from centos.org.
When I boot up, I only see one entry for a kernel, 3.10.0-1127.19.1.el7.x86_64. (See the attached boot menu screenshot.) I am expecting to see an entry for the 3.10.0-1160.21.1.el7.x86_64 kernel.
Here are the kernel packages that are installed.
kernel-headers-3.10.0-1160.21.1.el7.x86_64
kernel-3.10.0-1160.11.1.el7.x86_64
kernel-3.10.0-1160.21.1.el7.x86_64
kernel-3.10.0-1127.19.1.el7.x86_64
kernel-3.10.0-1127.el7.x86_64
kernel-tools-3.10.0-1160.21.1.el7.x86_64
kernel-devel-3.10.0-1160.21.1.el7.x86_64
kernel-tools-libs-3.10.0-1160.21.1.el7.x86_64
After looking around, I was not able to find any grub.cfg files. After much trouble-shooting I ended up creating 3 grub.cfg files because nothing was changing.
1. grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
2. grub2-mkconfig -o /boot/grub2/grub.cfg
3. grub2-mkconfig -o /boot/grub/grub.cfg
Even after creating these grub.cfg files and rebooting each time, I still only see what's in the attached boot menu screenshot. Even though I see the expected entries for the following images in the cfg files.
-rwxr-xr-x. 1 root root 6.5M Sep 21 2020 vmlinuz-0-rescue-d1d3d38d84ca471e8cbba335d20b3bff
-rwxr-xr-x. 1 root root 6.5M Aug 25 2020 vmlinuz-3.10.0-1127.19.1.el7.x86_64
-rwxr-xr-x. 1 root root 6.5M Mar 31 2020 vmlinuz-3.10.0-1127.el7.x86_64
-rwxr-xr-x 1 root root 6.5M Dec 18 11:38 vmlinuz-3.10.0-1160.11.1.el7.x86_64
-rwxr-xr-x 1 root root 6.5M Mar 16 14:32 vmlinuz-3.10.0-1160.21.1.el7.x86_64
Where is the grub file that is being used?
Thanks!
Gary
- Attachments
-
- current boot menu
- centos_7_boot_menu_3.jpg (188.74 KiB) Viewed 1249 times
Re: grub.cnf - missing kernels
Reinstalling the grub2-efi and shim packages along with recreating /boot/efi/EFI/centos/grub.cfg did not resolve my issue.
Re: grub.cnf - missing kernels
Some questions:
Is the system using software RAID 1?
Is the symlink from /etc/grub2.cfg or /etc/grub2-efi.cfg correctly pointing to the relevant location under /boot? Only one of those symlinks should exist and it will depend on whether /sys/firmware/efi exists or not as to which of those it will be. If /sys/firmware/efi exists then your system is in UEFI mode so would use /etc/grub2-efi.cfg and if it does not then it's in Legacy BIOS mode and will use /etc/grub2.cfg and should point to ../boot/grub2/grub.cfg
Is the system using software RAID 1?
Is the symlink from /etc/grub2.cfg or /etc/grub2-efi.cfg correctly pointing to the relevant location under /boot? Only one of those symlinks should exist and it will depend on whether /sys/firmware/efi exists or not as to which of those it will be. If /sys/firmware/efi exists then your system is in UEFI mode so would use /etc/grub2-efi.cfg and if it does not then it's in Legacy BIOS mode and will use /etc/grub2.cfg and should point to ../boot/grub2/grub.cfg
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: grub.cnf - missing kernels
Hi Trevor,
I am not using software raid. I'm using a Dell Perc 6i for raid.
When I started out, I was not able to find the grub.cfg files in any of the directories. Nor, were the /etc/grub2.cfg or /etc/grub2-efi.cfg syminks valid which is what I expected given the lack of grub.cfg files. As noted in my original post the grub.cfg files now exist and the symlinks are valid as I created them. I have rebooted multiple times including after creating each one. Which is why I am still confused on where grub is looking as it is not looking where we expect.
The directory /sys/firmware/efi does exist.
I am not using software raid. I'm using a Dell Perc 6i for raid.
When I started out, I was not able to find the grub.cfg files in any of the directories. Nor, were the /etc/grub2.cfg or /etc/grub2-efi.cfg syminks valid which is what I expected given the lack of grub.cfg files. As noted in my original post the grub.cfg files now exist and the symlinks are valid as I created them. I have rebooted multiple times including after creating each one. Which is why I am still confused on where grub is looking as it is not looking where we expect.
The directory /sys/firmware/efi does exist.
Code: Select all
[root@centos ~]# ls -lh /sys/firmware/efi
total 0
-r--r--r-- 1 root root 4.0K Mar 29 18:58 config_table
drwxr-xr-x 2 root root 0 Mar 29 14:19 efivars
-r--r--r-- 1 root root 4.0K Mar 29 18:58 fw_platform_size
-r--r--r-- 1 root root 4.0K Mar 29 18:58 fw_vendor
-r--r--r-- 1 root root 4.0K Mar 29 18:58 runtime
drwxr-xr-x 12 root root 0 Mar 29 18:58 runtime-map
-r-------- 1 root root 4.0K Mar 29 18:58 systab
drwxr-xr-x 107 root root 0 Mar 29 18:58 vars
Re: grub.cnf - missing kernels
The kernel update scripts will update /etc/grub2-efi.cfg and if the symlink is broken then those updates will not be in the file that grub reads which is under /boot/efi.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: grub.cnf - missing kernels
My issue is that even though I have recreated the grub.cfg files, I'm not seeing the updated menu list when I boot my system.
How do I fix this issue?
How do I fix this issue?
Re: grub.cnf - missing kernels
What does /etc/grub2-efi.cfg point to? Does that file have the expected contents?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: grub.cnf - missing kernels
Yes it does.
My apologies if this was not clear in my original post.
My apologies if this was not clear in my original post.
Re: grub.cnf - missing kernels
Then it's either not using the filename that you think it is or you have something like a RAID problem. Check your RAID status and make sure that it's ok and that one disk doesn't contain an old copy of the file and the other a newer one.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: grub.cnf - missing kernels
Raid status is good.
Here are the grub files and links.
Like I mentioned earlier, I regenerated the grub.cfg files. Today, I redid the symlinks just to be sure that nothing was hanging out.
Here are the grub files and links.
Code: Select all
[root@centos ~]# ls -lh /etc/grub2.cfg
lrwxrwxrwx 1 root root 20 Mar 30 08:41 /etc/grub2.cfg -> /boot/grub2/grub.cfg
[root@centos ~]# ls -lh /etc/grub2-efi.cfg
lrwxrwxrwx 1 root root 29 Mar 30 08:42 /etc/grub2-efi.cfg -> /boot/efi/EFI/centos/grub.cfg
[root@centos ~]# ls -lh /boot/grub2/grub.cfg
-rwx------ 1 root root 7.2K Mar 29 10:13 /boot/grub2/grub.cfg
[root@centos ~]# ls -lh /boot/efi/EFI/centos/grub.cfg
-rwx------ 1 root root 7.2K Mar 29 16:52 /boot/efi/EFI/centos/grub.cfg