Skip to content

Building kernel image

Juneseo Chang edited this page Apr 23, 2024 · 1 revision

How to Build

In the kernel source code root directory (ie. linux/)

$ sudo make -j$(nproc) LOCALVERSION=
$ sudo make modules_install
$ sudo make install

The default kernel name would be 6.0.19-IDT.

When the build makes excessive size of kernel modules and configurations, there may be initrd error.

To prevent this, stripping unnecessary kernel modules and symbols is required.

$ cd /lib/modules/<new_kernel>
$ sudo find . -name *.ko -exec strip --strip-unneeded {} +
$ sudo make install

Booting with IDT kernel

Restart the system, and select IDT kernel in the grub bootloader.

You can also edit /etc/default/grub to boot up IDT kernel as default.

  1. Check IDT kernel's grub entry in /boot/grub/grub.cfg.
  2. Add the entry in the /etc/default/grub with GRUB_DEFAULT=<entry you looked up>.
  3. Update grub with sudo update-grub.

Clone this wiki locally