[LINUX] Rebuild kernel on Ubuntu 20.04 (on Azure)

There was a procedure in the Software Design article below, so I tried it for the first time in a while. In the article, it was Ubuntu 18.04 on Hyper-V, but I tried it on Ubuntu 20.04 on Azure VM. This is my first kernel compilation on Azure.

environment

Status before installation

$ uname -r
5.4.0-1010-azure

Required packages

procedure

1. Download kernel source

$ git clone -b v5.5.5 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable
$ cd linux-stable

2. Make the necessary settings for the build based on the current kernel status.

$ make localmodconfig

For the time being, I just try everything by default, so hit the Enter key repeatedly.

3. Build

$ make -j$(grep -c processor /proc/cpuinfo) bindeb-pkg

It's not accurate because I was working on it separately, but about 30 minutes on the Standard D2s v3 instance?

4. Kernel and module installation

$ sudo dpkg -i ../linux-image-5.5.5_5.5.5-16_amd64.deb

5. Grub settings

It's not necessary if you just reboot and try a new kernel, but if you want to go back, see the manual.

6. Reboot and check

$ sudo /sbin/reboot
...

$ uname -r
5.5.5

References

Recommended Posts

Rebuild kernel on Ubuntu 20.04 (on Azure)
Shebang on Ubuntu 20.04
Compiling the Linux kernel (Linux 5.x on Ubuntu 20.04)
Install TensorFlow on Ubuntu
Install PySide2 on Ubuntu
Install JModelica on Ubuntu
build Python on Ubuntu
Install Python 3.3 on Ubuntu 12.04
Installing pyenv on ubuntu 16.04
Install Theano on Ubuntu 12.04
Install angr on Ubuntu 18.04
Install pip / pip3 on Ubuntu
Set up Python 3.4 on Ubuntu
I installed tensorRT on Ubuntu 18.04
Run Jupyter on Ubuntu on Windows
Use matplotlib on Ubuntu 12 & Python
I installed ROS on Ubuntu 18.04
USB Wifi on Ubuntu 20.04LTS
Set matplotlib font on ubuntu
Put Python 3.x on Ubuntu
Operate ubuntu on VScode (windows10)
Create command shortcuts on Ubuntu 16.04
Install GoLand IDE on Ubuntu
Display GUI messages on Ubuntu
Install OpenCV on Ubuntu + python
wsl Install PostgreSQL on Ubuntu 18.04
Introducing TensorFlow on Ubuntu + Python 2.7
[ROS] Install ROS (melodic) on Ubuntu (18.04)
Install Caffe on Ubuntu 14.04 (GPU)
Install Docker on WSL Ubuntu 18.04
[LINUX kernel rebuild] Version upgrade (4.18.0 → 5.8.8)
Install CUDA10.1 + cuDNN7.6.5 + tensorflow-2.3.0 on Ubuntu 18.04
Install Python 3.8 on Ubuntu 18.04 (OS standard)
Remove ubuntu installed on Windows 10 machine
Python 3.4 pyvenv fails on Ubuntu 14.04 LTS
Changed partition mount point on Ubuntu
Install Caffe on Ubuntu 14.04 (CPU mode)
Install Mecab and mecab-python3 on Ubuntu 14.04
Install and run dropbox on Ubuntu 20.04
Install OpenCV and Chainer on Ubuntu
Building a Python environment on Ubuntu
Install CUDA 8.0 and Chainer on Ubuntu 16.04
Preparing python using vscode on ubuntu
Draw Japanese with matplotlib on Ubuntu
Mount S3 on Ubuntu with goofys
Run azure ML on jupyter notebook
I tried Cython on Ubuntu on VirtualBox
Install fabric on Ubuntu and try
Using a serial console on Ubuntu 20.04
Run XGBoost on Bash on Ubuntu on Windows
I couldn't input Japanese on Ubuntu 20.04
Install Python 3.9 on Ubuntu 20.04 (OS standard?)
Install confluent-kafka for Python on Ubuntu
Install Python 2.7 on Ubuntu 20.04 (OS standard?)
Build Python 3.8 + Pipenv environment on Ubuntu 18.04
Notes on installing Ubuntu 18.04 on the XPS 15 7590
How to install Go on Ubuntu
Run Yocto on Ubuntu using QEMU.
Environment construction of "Tello_Video" on Ubuntu
ROS study # 1 Install ros-noetic on ubuntu 20.04
OpenCV3 & Python3 environment construction on Ubuntu