1

Currently running 3.11.0-18, but many other later versions are installed. For some reason the updates aren't getting selected for grub:

$ uname -r
3.11.0-18-generic

Listing kernels:

$ sudo /usr/sbin/update-grub
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-3.13.0-55-generic
Found initrd image: /boot/initrd.img-3.13.0-55-generic
Found linux image: /boot/vmlinuz-3.13.0-46-generic
Found initrd image: /boot/initrd.img-3.13.0-46-generic
Found linux image: /boot/vmlinuz-3.13.0-43-generic
Found initrd image: /boot/initrd.img-3.13.0-43-generic
Found linux image: /boot/vmlinuz-3.13.0-40-generic
Found initrd image: /boot/initrd.img-3.13.0-40-generic
Found linux image: /boot/vmlinuz-3.13.0-39-generic
Found initrd image: /boot/initrd.img-3.13.0-39-generic
Found linux image: /boot/vmlinuz-3.13.0-35-generic
Found initrd image: /boot/initrd.img-3.13.0-35-generic
Found linux image: /boot/vmlinuz-3.11.0-18-generic
Found initrd image: /boot/initrd.img-3.11.0-18-generic
Found linux image: /boot/vmlinuz-3.13.0-55-generic
Found initrd image: /boot/initrd.img-3.13.0-55-generic
Found linux image: /boot/vmlinuz-3.13.0-46-generic
Found initrd image: /boot/initrd.img-3.13.0-46-generic
Found linux image: /boot/vmlinuz-3.13.0-43-generic
Found initrd image: /boot/initrd.img-3.13.0-43-generic
Found linux image: /boot/vmlinuz-3.13.0-40-generic
Found initrd image: /boot/initrd.img-3.13.0-40-generic
Found linux image: /boot/vmlinuz-3.13.0-39-generic
Found initrd image: /boot/initrd.img-3.13.0-39-generic
Found linux image: /boot/vmlinuz-3.13.0-35-generic
Found initrd image: /boot/initrd.img-3.13.0-35-generic
Found linux image: /boot/vmlinuz-3.11.0-18-generic
Found initrd image: /boot/initrd.img-3.11.0-18-generic
Found memtest86+ image: /boot/memtest86+.bin
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done

I have noticed that my /boot/grub/grub.cfg actually does contain the newest kernel, just not at position 0. It seems like it is quite a mess actually (500+ lines), but it is what update-grub generates. How do I fix that?

$ cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT="0"
GRUB_RECORDTAIL_TIMEOUT="2"
GRUB_HIDDEN_TIMEOUT="5"
GRUB_HIDDEN_TIMEOUT_QUIET="false"
GRUB_TIMEOUT="5"
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL="console"

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE="640x480"

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID="true"

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

GRUB_DISABLE_OS_PROBER="true"
GRUB_CMDLINE_LINUX="reboot=b

" And also my grub.d directory:

$ ll /etc/grub.d/
total 144
drwxr-xr-x   4 root root  4096 Jun 28 02:10 ./
drwxr-xr-x 167 root root 12288 Jun 28 01:40 ../
-rwxr-xr-x   1 root root  9424 Apr 11  2014 00_header*
-rwxr-xr-x   1 root root  6058 Apr 10  2014 05_debian_theme*
-rwxr-xr-x   1 root root 11608 Apr 11  2014 10_linux.dpkg-dist*
-rwxr-xr-x   1 root root   694 Mar 18  2014 10_linux_proxy*
-rwxr-xr-x   1 root root   172 Mar 18  2014 11_custom_proxy*
-rwxr-xr-x   1 root root   694 Mar 18  2014 12_linux_proxy*
-rwxr-xr-x   1 root root 10258 Oct 10  2013 13_linux_xen*
-rwxr-xr-x   1 root root  1798 Jun 17  2013 14_memtest86+*
-rwxr-xr-x   1 root root 11531 Oct 10  2013 15_os-prober*
-rwxr-xr-x   1 root root  1426 Oct 10  2013 16_uefi-firmware*
-rwxr-xr-x   1 root root   172 Mar 18  2014 17_custom_proxy*
-rwxr-xr-x   1 root root   216 Oct 10  2013 18_custom*
-rwxr-xr-x   1 root root 10412 Apr 11  2014 20_linux_xen.dpkg-dist*
-rwxr-xr-x   1 root root  1992 Mar 12  2014 20_memtest86+*
-rwxr-xr-x   1 root root 11692 Apr 11  2014 30_os-prober.dpkg-dist*
-rwxr-xr-x   1 root root  1416 Apr 11  2014 30_uefi-firmware.dpkg-dist*
drwxr-xr-x   2 root root  4096 Mar 18  2014 bin/
drwxr-xr-x   2 root root  4096 Mar 18  2014 proxifiedScripts/
-rw-r--r--   1 root root   483 Oct 10  2013 README

Edit: Ok it is all fixed now. Turns out I had a messed up /etc/defaults/grub file and weird scripts in /etc/grub.d/. I restored those scripts from a livecd boot.

pieter3d
  • 31
  • 1
  • 5

3 Answers3

1

The current kernel for LTS Trusty:

linux-generic-lts-trusty:
  Installed: (none)
  Candidate: 3.13.0.55.62

To install it run:

sudo apt-get update
sudo apt-get install linux-generic-lts-trusty

Make sure you also have dkms in some cases required like manually installed video drivers etc. To install it run: sudo apt-get install dkms

During kernel installation it should automatically update initramfs and boot configuration. After installation is done then reboot the system and after boot follow this tutorial to remove the old kernels from the system.

If you still not booting to the latest kernel then reboot the system and boot holding SHIFT to get to Grub and pick the latest kernel to boot with. When booted run uname -r to be sure you do run the latest one then run:

sudo update-initramfs -u -k all
sudo update-grub

Or follow Pilot6 suggestion.

JoKeR
  • 6,972
  • 9
  • 43
  • 65
1

The problem was that a bunch of weird stuff had shown up in /etc/grub.d (no idea how). I restored it with the contents of the live CD of that same path. Also I re-installed grub-pc sudo apt-get install --reinstall grub-pc and let it overwrite the current etc/defaults/grub so that it all is normal again. Don't forget to run sudo update-grub to regenerate /boot/grub/grub.cfg.

pieter3d
  • 31
  • 1
  • 5
0

You manually configured your /etc/default/grub. That's why this problem appeared.

Remove this

GRUB_DISABLE_OS_PROBER="true"
GRUB_CMDLINE_LINUX="reboot=b

Then run

sudo update-grub

It should be fixed.

The last line is crap. And GRUB_DISABLE_OS_PROBER does not let to find new kernels.

There may some other hidden errors in that file. Here is the default one.

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=1280x1024x32
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

You can just replace yours with this one.

I hope you know how edit system files using sudo.

This is contents of my /etc/grub.d

00_header        10_linux      20_memtest86+  30_uefi-firmware  41_custom
05_debian_theme  20_linux_xen  30_os-prober   40_custom         README
Pilot6
  • 90,100
  • 91
  • 213
  • 324
  • I did this, but then when I loaded grub-customizer to take a look at grub.cfg, the first entry still points to the old 3.11.0-18 kernel. – pieter3d Jun 28 '15 at 09:22
  • grub.cfg will be rebuit normally. – Pilot6 Jun 28 '15 at 09:23
  • Yes, that is what happened. But it was built with the same old kernel version again. I imagine this might have something to do with the contents of my grub.d directory? – pieter3d Jun 28 '15 at 09:30
  • You made a lot of modifications to your grub configs. @pieter3d – Pilot6 Jun 28 '15 at 09:48