Kernel updates and grub settings in Ubuntu

ubuntu

Ubuntu tips for Linux kernel updates and grub settings:

I always try to install Ubuntu security or Linux kernel updates. But sometimes I get problems with graphics drivers and Linux kernels because my graphics driver is not compatible with latest Linux kernel. Then I have to boot with older Linux kernel version in Ubuntu. That’s why I wanted to write small tips.

  • Which Linux kernel version I have?

Open a terminal with Ctrl-Alt-T or from Unity menu
Type uname -sr press enter.  (-s name of the operating system, -r the operating system release level)

Linux 3.2.0-43-generic

  • List of  all installed Linux kernels in Terminal:

dpkg --list | grep linux-image

  • How can I see Ubuntu boot menu on startup?

Display your Grub is to press and hold the SHIFT button while booting.

  • Boot settings in grub: How can I boot with older Linux kernel?

Open grub in editor:

sudo gedit /etc/default/grub

#This is newest Linux kernel and default setting in Ubuntu
# deactivate
#GRUB_DEFAULT=0

# Set default for older Linux kernel (first entry is 0 in grub boot menu)
# 2 for Previous Linux versions 4 for me Linux 3.2.0-38-generic
# see your previous Linux versions in grub menu
GRUB_DEFAULT="2>4"

Save your changes and close editor.  Then type:

sudo update-grub

Without update-grub command your changes will not be applied! Reboot and you can see your selected Linux kernel with uname -sr command.

  • What happens if my GRUB_DEFAULT setting is wrong?

Don’t worry! Ubuntu will boot with the latest kernel.

Reference: www.askubuntu.com

Leave a Reply