User Tools

Site Tools

Return to Home page

How to compile a Linux kernel

Download Ubuntu packages:

sudo apt-get install build-essential kernel-package gcc libncurses5 libncurses5-dev libqt3-mt-dev

After copying a running kernel config file from /boot directory to the file .config of the kernel source files directory, run this command to check configuration options not present the config file of the /boot directory:

make oldconfig

To configure the kernel

make menuconfig o make xconfig

To compile the kernel:

make-kpkg clean
fakeroot make-kpkg --initrd --append-to-version=-rtai1 kernel_image kernel_headers  modules_image

With Ubuntu 10.04 –initrd does not work, so us those commands

update-initramfs -c -k

For multiprocessor compilation with bash shell:


For multiprocessor compilation with tcsh shell:


Check those links if they exist:

link include/asm with asm-86


To open GRUB2 at boot press continuously left shift key.

The configuration file of GRUB2 is: /etc/default/grub

GRUB_DEFAULT=0 Sets the default between kernel listed in /boot/grub/grub.cfg
GRUB_TIMEOUT=10 : wait 10 seconds before booting with the default kernel

Another way is to install Grub Customizer and use a graphic environment:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

If you found any error, or if you want to partecipate to the editing of this wiki, please contact: admin [at]

You can reuse, distribute or modify the content of this page, but you must cite in any document (or webpage) this url:
/web/htdocs/ · Last modified: 2024/04/08 22:34 by

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki
Privacy Policy