This past weekend I installed Mint 19.1 on a new SSD as dual boot with my existing Win10. The install included kernel 4.15.0-20 and the post install updates installed 4.15.0-43.
If I just hit enter (or let it time out) on the GRUB menu, Mint is loaded with the correct kernel.
If I go into GRUB's advanced settings I can see that it knows about both kernels.
When I first fired up rEFInd, it showed the icon for Linux Mint and loaded the correct kernel. After that first load, it's always showing the Tux logo and wants to load the older kernel.
I can't think of what might have changed between the original test and the reboot. How do I tell rEFInd to use the kernel I expect it to?
Thank you for any guidance, pat---
rEFInd menu showing old kernel.jpg - the rEFInd menu
GRUB2 menu.jpg - the main grub menu
GRUB2 Advanced.jpg - the grub sub menu showing it knows about the different kernels
Installed Kernels.png - screenshot of Mint's Upgrade Manager showing the two available kernels
boot directory.png - screenshot of /boot showing the various boot files
refind.conf - my master rEFInd configuration file
theme.conf - my theme configuration file.
rEFInd sorts all boot loaders (including Linux kernels) within a given directory by the files' time stamps. It does this because parsing kernel version strings would be a complete nightmare -- although many distributions, including Linux Mint, have version strings that are easy to parse, not all distributions use the same naming conventions. Attempting to support all (or even most) distributions' kernel-naming conventions would quickly drive me insane.
As a practical matter, rEFInd's approach usually works fine; however, sometimes it doesn't. Problems most frequently occur immediately after the first kernel update or after updating to a new kernel series (as happens with Ubuntu, for instance, when switching from one OS point-release to another, such as from Ubuntu 18.04.1 to 18.04.2). When this happens, the kernel file time stamps can be out of sync with the kernel versions. Examining your screen shots, this is what's happened to you; your 4.15.0-20 kernel has a time stamp of January 10, 2019, whereas your newer 4.15.0-43 kernel has a time stamp of December 6, 2018.
Fortunately, the solution is simple: Use the touch command to give the desired kernel the most recent time stamp:
touch /boot/vmlinuz-4.15.0-43
There's a chance that you'll have to repeat this step in the future if you happen to touch the kernel after the next one is prepared at Canonical but before it's released (or installed on your system). Doing a sudo apt update followed by sudo apt dist-upgrade just before you touch the kernel will minimize the risk of this happening.
Note also that you can launch any kernel in rEFInd. Hitting F2, Insert, or Tab after you highlight the kernel will produce a menu of selections for launching all the kernels in that location, most likely with two or three options for each kernel (to boot normally, into single-user mode, and possibly with minimal kernel options).
As to the icon changing, I'm less sure of what caused that change. My best guess is that the updates altered the /etc/os-release file, which rEFInd reads to try to find clues about the Linux distribution. I do not recommend hand-editing that file, though. To get the Mint icon back, I recommend using gdisk or tune2fs to change the name of the partition or filesystem that holds the kernel. Change it to include the string linuxmint (as one word) and rEFInd should detect that as a more specific clue than the fact that the file is a Linux kernel. Other methods of setting OS icons are described on this page of the rEFInd documentation.
👍
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Again, thank you! I've got the correct kernel being used now and figured out the icon issue ... I'd named the partition "linux root" to more obviously diffentiate it from my windows partions without realizing that was one of the ways rEFInd determined the OS version. I removed the partition name and rEFInd works as expected again.
Again, thank you for such a quick & genuinely helpful response! pat----
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm glad you've got it sorted out. You could rename the partition to "LinuxMint root" (with "LinuxMint" as one word) and it should work correctly in rEFInd.
👍
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This past weekend I installed Mint 19.1 on a new SSD as dual boot with my existing Win10. The install included kernel 4.15.0-20 and the post install updates installed 4.15.0-43.
If I just hit enter (or let it time out) on the GRUB menu, Mint is loaded with the correct kernel.
If I go into GRUB's advanced settings I can see that it knows about both kernels.
When I first fired up rEFInd, it showed the icon for Linux Mint and loaded the correct kernel. After that first load, it's always showing the Tux logo and wants to load the older kernel.
I can't think of what might have changed between the original test and the reboot. How do I tell rEFInd to use the kernel I expect it to?
Thank you for any guidance,
pat---
rEFInd menu showing old kernel.jpg - the rEFInd menu
GRUB2 menu.jpg - the main grub menu
GRUB2 Advanced.jpg - the grub sub menu showing it knows about the different kernels
Installed Kernels.png - screenshot of Mint's Upgrade Manager showing the two available kernels
boot directory.png - screenshot of /boot showing the various boot files
refind.conf - my master rEFInd configuration file
theme.conf - my theme configuration file.
rEFInd sorts all boot loaders (including Linux kernels) within a given directory by the files' time stamps. It does this because parsing kernel version strings would be a complete nightmare -- although many distributions, including Linux Mint, have version strings that are easy to parse, not all distributions use the same naming conventions. Attempting to support all (or even most) distributions' kernel-naming conventions would quickly drive me insane.
As a practical matter, rEFInd's approach usually works fine; however, sometimes it doesn't. Problems most frequently occur immediately after the first kernel update or after updating to a new kernel series (as happens with Ubuntu, for instance, when switching from one OS point-release to another, such as from Ubuntu 18.04.1 to 18.04.2). When this happens, the kernel file time stamps can be out of sync with the kernel versions. Examining your screen shots, this is what's happened to you; your 4.15.0-20 kernel has a time stamp of January 10, 2019, whereas your newer 4.15.0-43 kernel has a time stamp of December 6, 2018.
Fortunately, the solution is simple: Use the
touch
command to give the desired kernel the most recent time stamp:There's a chance that you'll have to repeat this step in the future if you happen to
touch
the kernel after the next one is prepared at Canonical but before it's released (or installed on your system). Doing asudo apt update
followed bysudo apt dist-upgrade
just before youtouch
the kernel will minimize the risk of this happening.Note also that you can launch any kernel in rEFInd. Hitting F2, Insert, or Tab after you highlight the kernel will produce a menu of selections for launching all the kernels in that location, most likely with two or three options for each kernel (to boot normally, into single-user mode, and possibly with minimal kernel options).
As to the icon changing, I'm less sure of what caused that change. My best guess is that the updates altered the
/etc/os-release
file, which rEFInd reads to try to find clues about the Linux distribution. I do not recommend hand-editing that file, though. To get the Mint icon back, I recommend usinggdisk
ortune2fs
to change the name of the partition or filesystem that holds the kernel. Change it to include the stringlinuxmint
(as one word) and rEFInd should detect that as a more specific clue than the fact that the file is a Linux kernel. Other methods of setting OS icons are described on this page of the rEFInd documentation.Thank you very much!!
p
Again, thank you! I've got the correct kernel being used now and figured out the icon issue ... I'd named the partition "linux root" to more obviously diffentiate it from my windows partions without realizing that was one of the ways rEFInd determined the OS version. I removed the partition name and rEFInd works as expected again.
Again, thank you for such a quick & genuinely helpful response!
pat----
I'm glad you've got it sorted out. You could rename the partition to "LinuxMint root" (with "LinuxMint" as one word) and it should work correctly in rEFInd.