Telling the system to boot latest kernel after update

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
eiver
Level 5
Level 5
Posts: 568
Joined: Fri Jan 23, 2009 5:51 am

Telling the system to boot latest kernel after update

Post by eiver »

Hi!

I recently decided to upgrade LM 18 -> LM 18.2 (MATE 64-bit). In addition to that I also upgraded all packages suggested by the update manager, including the kernel.
However after reboot the system still boots the old kernel. How do I configure it to boot the latest one. I only have ssh or x2go connection to the machine so I cannot manipulate grub menu directly.
I found a ton of instructions on how to do this both on the forums and the Internet, but they seem to contradict each other or are relevant to other systems or other grub version, which is very confusing. And I do not want to end up with an unbootable system. It seems, that there are submenus introduced as well as an upstart and a non-upstart menu entry? That is all very confusing.

Code: Select all

$ uname -a
Linux backup 4.8.0-53-generic #56~16.04.1-Ubuntu SMP Tue May 16 01:18:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Code: Select all

$ grep "menuentry" /boot/grub/grub.cfg
if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
  menuentry_id_option=""
export menuentry_id_option
menuentry 'Linux Mint 18.2 MATE 64-bit' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-c148cfa2-daee-4e40-ba21-e3fda03ad442' {
submenu 'Advanced options for Linux Mint 18.2 MATE 64-bit' $menuentry_id_option 'gnulinux-advanced-c148cfa2-daee-4e40-ba21-e3fda03ad442' {
	menuentry 'Linux Mint 18.2 MATE 64-bit, with Linux 4.8.0-53-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.8.0-53-generic-advanced-c148cfa2-daee-4e40-ba21-e3fda03ad442' {
	menuentry 'Linux Mint 18.2 MATE 64-bit, with Linux 4.8.0-53-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.8.0-53-generic-init-upstart-c148cfa2-daee-4e40-ba21-e3fda03ad442' {
	menuentry 'Linux Mint 18.2 MATE 64-bit, with Linux 4.8.0-53-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.8.0-53-generic-recovery-c148cfa2-daee-4e40-ba21-e3fda03ad442' {
	menuentry 'Linux Mint 18.2 MATE 64-bit, with Linux 4.4.0-87-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-87-generic-advanced-c148cfa2-daee-4e40-ba21-e3fda03ad442' {
	menuentry 'Linux Mint 18.2 MATE 64-bit, with Linux 4.4.0-87-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-87-generic-init-upstart-c148cfa2-daee-4e40-ba21-e3fda03ad442' {
	menuentry 'Linux Mint 18.2 MATE 64-bit, with Linux 4.4.0-87-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-87-generic-recovery-c148cfa2-daee-4e40-ba21-e3fda03ad442' {
	menuentry 'Linux Mint 18.2 MATE 64-bit, with Linux 4.4.0-21-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-21-generic-advanced-c148cfa2-daee-4e40-ba21-e3fda03ad442' {
	menuentry 'Linux Mint 18.2 MATE 64-bit, with Linux 4.4.0-21-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-21-generic-init-upstart-c148cfa2-daee-4e40-ba21-e3fda03ad442' {
	menuentry 'Linux Mint 18.2 MATE 64-bit, with Linux 4.4.0-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-21-generic-recovery-c148cfa2-daee-4e40-ba21-e3fda03ad442' {
menuentry 'Memory test (memtest86+)' {
menuentry 'Memory test (memtest86+, serial console 115200)' {
I want to boot the 4.4.0-87, but don't know about upstart or systemd. I guess I would like to boot whatever I was booting before.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
karlchen
Level 23
Level 23
Posts: 18227
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Telling the system to boot latest kernel after update

Post by karlchen »

Hello, eiver.

We are talking about 2 different kernel series here, not just 2 different kernels:
  • Kernel 4.8.0-53 is a kernel from the kernel series 4.8.0-xx
  • Kernel 4.4.0-87 is the currently most recent kernel from the kernel series 4.4.0-xx
Even though kernel 4.4.0-87 may have been released after 4.8.0-53, kernel 4.8.0-53 has got the higher version string.
By default Grub will always offer the existing kernels on a system starting with the highest kernel version string and descend to the lowest kernel present on the system.
This is the reason why kernel 4.8.0-53 is still on top of the list and the default kernel which Grub will boot.

In case you wish to make K4.4.0-87 the new default kernel, without uninstalling any kernel from the kernel series 4.8.0-xx, you will have to identify the position of K4.4.0-xx in the boot menu. Beware: counting starts with 0, not with 1.
Next you edit the file /etc/default/grub with root privileges. gksudo gedit /etc/default/grub
Look out for the parameter near the top of the file reading GRUB_DEFAULT=0. Change the 0 to the number which you have identified by counting. - If my counting is not incorrect, the number should be 4. GRUB_DEFAULT=4 - Save the file.
Next run sudo update-grub This will instruct Grub to rebuild its configuration and to use the changed GRUB_DEFAULT item number in the list as the new default when booting.

HTH,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
JeremyB
Level 21
Level 21
Posts: 13880
Joined: Fri Feb 21, 2014 8:17 am

Re: Telling the system to boot latest kernel after update

Post by JeremyB »

Use the Grub Advanced options to boot into the 4.4 kernel- don't use upstart or recovery option, then use the Mint Update Manager to uninstall the 4.8.0 kernel you have. When you reboot it should boot into the newest 4.4 kernel you have installed
User avatar
eiver
Level 5
Level 5
Posts: 568
Joined: Fri Jan 23, 2009 5:51 am

Re: Telling the system to boot latest kernel after update

Post by eiver »

Wow! I cannot explain how could I be so silly and not notice that these are in fact different kernel series. I thought they all were 4.4 series. So the system is indeed using the latest one I installed and it switched grub correctly. Also thank you for the info on how to change grub default menu entry.
Locked

Return to “Installation & Boot”