Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Roger H. Newell - Ubuntu Custom Kernel

Below is a video from Roger H. Newell on how to compile your own kernel in Ubuntu. (In this case 14.04 because it was made some time ago). If you have not compiled your own kernel yet and want to learn how, this is a great place to start and refer to in future.

  • 00:00 - Why compile your own kernel?
  • 02:07 - Update grub configuration file to extend the timeout.
  • 03:12 - Where do you get the kernel source? You can get directly from, or you can use Git.
  • 03:50 - Downloading from using links
  • 04:26 - Extract the downloaded kernel.
  • 04:33 - Talk about configuration options.
    • 04:53 - Use distro config.
    • 05:10 - Alternatively, create a configuration file based on everything thats plugged in.
  • 05:48 - If you want to compile with the distro config...
    • 06:16 - Running the cp command to copy config from /boot.
    • 06:41 - Optionally applying the mod config to only compile for hardware currently plugged in which speeds up the build time.
  • 07:16 - There are some ways to speed up compiling such as setting up a RAMDisk or a distributed compiler.
  • 07:41 - Running the optional make localmodconfig to only build for currently plugged in hardware.
  • 08:23 - Need to install some packages in order to build the kernel.
  • 08:50 - Compiling the kernel with make.
  • 09:53 - Install the compiled kernel on Ubuntu - moves modules into place and updates grub menu etc.
    • sudo make modules_install install
  • 10:47 - Reboot and see if we get a black screen of death.
  • 11:00 - You can still select your old kernels if something goes wrong.
Last updated: 13th October 2019
First published: 16th August 2018