Get the App
SLTechnology News&Howtos  ›  Servers  › 

The process of installing a new Linux kernel in a Debian system

Shulou Source: shulou.com Published: 2022-06-01 12:06:30 09月19日 Update

This article introduces the relevant knowledge of "the process of installing the new Linux kernel in Debian system". In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!

Download https://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.28.tar.bz2 and extract it to any directory, not necessarily in/usr/src.

Since I only needed a kernel source tree, I generated the configuration file using a simple make oldconfig

1. Generate config file

The code is as follows:

make oldconfig

Make oldconfig will prompt you incrementally with your existing configuration file, and finally use the system default value, that is, all the way to "enter", otherwise it may lead to some module dependencies, resulting in compilation failure.

2. Generating a compressed kernel image

The code is as follows:

make bzImage

This will generate a bzImage in the boot directory of your platform, such as my linux-2.6.28/arch/x86/boot/bzImage

3. compilation module

The code is as follows:

make modules

This is a very time-consuming step. Wait slowly.

4. Install kernel module

The code is as follows:

make modules_install

This creates the corresponding kernel version module in your/lib/modules/directory

5. install the kernel

The code is as follows:

make install

This will install our compiled kernel into the/boot directory

6. Create an initramfs file

The code is as follows:

update-initramfs -c -k 2.6.28

c for creating a new initramfs, k for specifying the kernel version

7. Update GRUB

The code is as follows:

update-grub

If not, you can manually repair/boot/grub/menu.lst. You can refer to the previous configuration file, just add the "title","root","kernel","initrd" fields. Note: update-grub Newly added kernel versions will appear before older versions.

8.reboot,enjoy it。

"The process of installing the new Linux kernel in Debian system" is introduced here. Thank you for reading it. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!

Tags: Kernel code file directory module version build system compilation configuration process Zhongan content more knowledge no practical successful learning and then that is Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Docker OPPO Reno Shulou Technology NVidia