How To Install The Linux Kernel

Table of contents:

How To Install The Linux Kernel
How To Install The Linux Kernel

Video: How To Install The Linux Kernel

Video: How To Install The Linux Kernel
Video: Compiling The Linux Kernel On Ubuntu u0026 Debian 2024, May
Anonim

One of the advantages of operating systems of the Linux family is their flexibility, which manifests itself in the presence of wide possibilities for modification. This applies not only to software that runs at the application level, but also to the basic components of the OS. So, in Linux, you can install one or more additional kernels.

How to install the Linux kernel
How to install the Linux kernel

Necessary

  • - installed package manager;
  • - binary package with kernel image;
  • - binary packages with modules;
  • - archive with kernel source codes;
  • - GCC, develop versions of glibc and ncurses;
  • - root password.

Instructions

Step 1

When working in a graphical environment, if local (for example, on the installation CD) or remote (on the distributor's website) repositories are available, including the binary kernel packages of the version you need, use the graphical package manager. Typically, these programs are installed by default when most "desktop" Linux distributions are installed. Start the manager, find the required package, mark it for installation and apply the changes. Typically, binary packages containing kernel images include scripts that update the bootloader configuration. Therefore, all that remains is to reboot the computer to be able to work with the new kernel.

Step 2

When working in the console and the repositories are available, or just the ability to get binary packages (for example, downloading them from the distributor's website), use console package managers such as apt-get, dpkg, rpm. For example, if APT is installed, run the apt-cache command with the search option and a string parameter to find available packages. For example: apt-cache search kernel-image Then select the package to install and install it with: apt-get install PackageName Use the -i option to install the package using rpm.

Step 3

If only a binary kernel image is available, try installing it manually. Give the image file a unique name and place it in the / boot directory (you can choose another directory, but usually the kernel images are placed there). Edit the bootloader config file and then update it. For example, if using LILO, modify the /etc/lilo.conf file and run the lilo command as root.

Step 4

Compile the kernel if only its sources are available. Prepare the system for assembly. Install GCC, the develop versions of the glibc and ncurses libraries. Place the kernel sources in the / usr / src / linux directory. If there are patches available, apply them with a command patch.

Step 5

Configure the kernel. Change to the / usr / src / linux directory. Run make menuconfig to create a new configuration. If you want to build the kernel with parameters as close as possible to the existing ones, copy the configuration file from the / boot directory to / usr / src / linux, rename it to.config, and then run the make oldconfig command.

Step 6

Build the kernel and modules. Run the commands: make depmake cleanmake bzImagemake modules Install the modules by executing the command: make modules_install Install the kernel image as described in the third step (the source file in the build tree is named bzImage).

Recommended: