Use custom kernel on Ubuntu VPS

Pick a kernel

Find a kernel at http://mirrors.kernel.org/ubuntu/pool/main/l/linux/[1]. In the tutorial, we pick the latest available version 4.14.0-11-generic.

Download and Install

Commands starts with # means you need to run it with root privileges. Per your preference, you can choose either sudo or su -c.

For 64bit installation:

$ wget http://mirrors.kernel.org/ubuntu/pool/main/l/linux/linux-image-4.14.0-11-generic_4.14.0-11.13_amd64.deb
# dpkg -i linux/linux-image-4.14.0-11-generic_4.14.0-11.13_amd64.deb

For 32bit installation:

$ wget http://mirrors.kernel.org/ubuntu/pool/main/l/linux/linux-image-4.14.0-11-generic_4.14.0-11.13_i386.deb
# dpkg -i linux/linux-image-4.14.0-11-generic_4.14.0-11.13_i386.deb

Note: When a prompting box pops up saying "A new version of /boot/grub/menu.lst is available", make sure to pick install the package maintainer's version. Otherwise you'll not be able to update grub.lst automatically.

menu.lst

This is a vpsserver.com specific Ubuntu templates approach. It may not apply if you are using service from other providers.

Update grub

Run the following command

# grub-set-default "Ubuntu, with Linux 4.14.0-11-generic"
# update-grub

Install extra modules

If you are planning use Docker or use NFS, you may want to install extra kernel modules as well. Run:

For 64bit installation:

$ wget http://mirrors.kernel.org/ubuntu/pool/main/l/linux/linux-image-extra-4.14.0-11-generic_4.14.0-11.13_amd64.deb
# dpkg -i linux-image-extra-4.14.0-11-generic_4.14.0-11.13_amd64.deb

For 32bit installation:

$ wget http://mirrors.kernel.org/ubuntu/pool/main/l/linux/linux-image-extra-4.14.0-11-generic_4.14.0-11.13_i386.deb
# dpkg -i linux-image-extra-4.14.0-11-generic_4.14.0-11.13_i386.deb

Reboot

Reboot your system and you're all set!

[1]: http://mirrors.kernel.org/ubuntu/pool/main/l/linux/

comments (2)

  • 66978

    - 5 years ago

    How to update kernel on centos 7?

    grub-set-default commmand not found

    • baoziii

      - 5 years ago

      edit /etc/grub.conf. Change the value of line start with "default" to the kernel list below (index start at 0), save and restart