-
Notifications
You must be signed in to change notification settings - Fork 1
linux install kernel
Forest0923 edited this page Mar 21, 2021
·
2 revisions
- OS: Ubuntu 18.04 (64bit)
- Current kernel: 5.3.0-42-generic
- Change directory to
/usr/src. - Get kernel source code with the following command (ver.5.4.1).
wget https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/linux-5.4.1.tar.gz- Decompress with tar.
tar -xvf linux-5.4.1.tar.gz- Change directory to
linux-5.4.1. - Before compiling you have to install some packages via apt. Run the following command.
sudo apt install flex bison libssl-dev libelf-dev- Make .config with the following command.
make olddefconfig- Compile with the following command.
4indicate how many thread do you use.
make -j 4- Install modules and kernel image with the following command.
make modules_install && make install- Setting bootloader (grub).
grub-mkconfig- Reboot.
- You can choose kernel by selecting
Advanced options for Ubuntu. - You can also change default kernel by editing
/etc/default/grub.
GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux x.x.x"