Traditionally kernels were numbered starting from 0 but by default the "new style" of grub boot loading considers each subkernel item to be different so if you have 3 entries for 4.40-148 rather than counting for 1.
To get the expected behavior let's show this example and how we can boot it
We do a grep on menuentry in /boot/grub/grub.cfg to see all of the bootable kernels rather than scrolling through loads of extra entries we don't care about (though grub does care and won't boot without them so don't mess things up here if you are editing grub.cfg!)
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 17.2 MATE 64-bit' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-61f69d26-da8e-4317-a5cb-834402b90501' {
submenu 'Advanced options for Linux Mint 17.2 MATE 64-bit' $menuentry_id_option 'gnulinux-advanced-61f69d26-da8e-4317-a5cb-834402b90501' {
menuentry 'Linux Mint 17.2 MATE 64-bit, with Linux 4.4.0-148-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-148-generic-advanced-61f69d26-da8e-4317-a5cb-834402b90501' {
menuentry 'Linux Mint 17.2 MATE 64-bit, with Linux 4.4.0-148-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-148-generic-recovery-61f69d26-da8e-4317-a5cb-834402b90501' {
menuentry 'Linux Mint 17.2 MATE 64-bit, with Linux 4.4.0-134-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-134-generic-advanced-61f69d26-da8e-4317-a5cb-834402b90501' {
menuentry 'Linux Mint 17.2 MATE 64-bit, with Linux 4.4.0-134-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-134-generic-recovery-61f69d26-da8e-4317-a5cb-834402b90501' {
menuentry 'Linux Mint 17.2 MATE 64-bit, with Linux 4.4.0-108-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-108-generic-advanced-61f69d26-da8e-4317-a5cb-834402b90501' {
menuentry 'Linux Mint 17.2 MATE 64-bit, with Linux 4.4.0-108-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-108-generic-recovery-61f69d26-da8e-4317-a5cb-834402b90501' {
menuentry 'Linux Mint 17.2 MATE 64-bit, with Linux 4.4.0-98-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-98-generic-advanced-61f69d26-da8e-4317-a5cb-834402b90501' {
menuentry 'Linux Mint 17.2 MATE 64-bit, with Linux 4.4.0-98-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-98-generic-recovery-61f69d26-da8e-4317-a5cb-834402b90501' {
menuentry 'Linux Mint 17.2 MATE 64-bit, with Linux 4.4.0-64-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-64-generic-advanced-61f69d26-da8e-4317-a5cb-834402b90501' {
menuentry 'Linux Mint 17.2 MATE 64-bit, with Linux 4.4.0-64-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-64-generic-recovery-61f69d26-da8e-4317-a5cb-834402b90501' {
menuentry 'Linux Mint 17.2 MATE 64-bit, with Linux 3.19.0-80-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.19.0-80-generic-advanced-61f69d26-da8e-4317-a5cb-834402b90501' {
menuentry 'Linux Mint 17.2 MATE 64-bit, with Linux 3.19.0-80-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.19.0-80-generic-recovery-61f69d26-da8e-4317-a5cb-834402b90501' {
menuentry 'Linux Mint 17.2 MATE 64-bit, with Linux 3.16.0-38-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-38-generic-advanced-61f69d26-da8e-4317-a5cb-834402b90501' {
menuentry 'Linux Mint 17.2 MATE 64-bit, with Linux 3.16.0-38-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-38-generic-recovery-61f69d26-da8e-4317-a5cb-834402b90501' {
menuentry 'Memory test (memtest86+)' {
menuentry 'Memory test (memtest86+, serial console 115200)' {
Say we want to boot 3.19.0-80
If we look at all the unique kernels listed (not duplicates) and count from 0 then 3.19 is #5
Let's edit the default grub file to tell it to boot 3.19 or menu entry #5
sudo vi /etc/default/grub
GRUB_DEFAULT=5
GRUB_DISABLE_SUBMENU=y
*Note we need the GRUB_DISABLE_SUBMENU=y above or things won't work as expected and won't restore the good old "legacy" days of how grub handles kernel entries.
Update grub so the changes take effect
sudo update-grub
After rebooting you should boot into the desired kernel and don't have to rely on the normally correct assumption that the latest and newest kernel is the one you should boot by default/automatically.
linux, grub, booting, kernel, debian, mint, ubuntu, specify, defaulttraditionally, kernels, numbered, default, quot, loading, considers, subkernel, entries, grep, menuentry, cfg, bootable, scrolling, loads, editing, feature_menuentry_id, xy, menuentry_id_option, export, gnu, os, gnulinux, cb, submenu, advanced, generic, mode, memtest, console, listed, duplicates, edit, entry, sudo, vi, etc, grub_default, grub_disable_submenu, restore, legacy, handles, update, rebooting, desired, rely, assumption, newest, automatically,