This is an old revision of the document!
The required contributions are designed to enhance the mentorship experience by participating in the kernel release process.
Participating in the kernel release process will help understand how it works and how fixes flow from the mainline kernel into stable releases. Boot test at least 2 or 3 stable releases during the 6 week application process.
Start by cloning the stable kernel git, building and installing the latest stable kernel. You can find information on the latest stable and mainline releases at The Linux Kernel Archive.
# Clone the git repo specified and in the email. A new directory linux-5.0.y # gets created which contains the kernel sources. git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.0.y cd linux-5.0.y # Starting out with the distribution configuration file is the safest approach # for the very first kernel install on any system. You can do so by copying the # configuration for your current kernel from /boot. cp /boot/<currentconfig> .config # Once this step is complete, it is time to compile the kernel. make -j2 all # Check for errors if any echo $? # Install the new kernel and run update-grub to add the new kernel to # the grub menu. Now it is time to reboot the system to boot the newly # installed kernel. su -c "make modules_install install"
Altenrnately, you can download and apply the patch. The following is my workflow for getting repo ready, apply the patch, compile, and install. I apply patches and use the same repo to be able to detect regressions. I save dmesg for the current rc to compare with the next rc. Please feel free to make changes to suit your needs.
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git cd linux-stable git checkout linux-5.0.y # Copy current config cp /boot/<currentconfig> .config wget https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.0.6-rc1.gz git reset --hard make clean git pull gunzip patch-5.0.6-rc1.gz git apply --index patch-5.0.6-rc1 echo "Patch applied" head Makefile make -j2 all echo $? su -c "make modules_install install"
Now it is time to reboot the system to boot the newly installed kernel. Before we do that, let's save logs from the current kernel to compare and look for regressions and new errors, if any.
dmesg -t > dmesg_current dmesg -t -k > dmesg_kernel dmesg -t -l emerg > dmesg_current_emerg dmesg -t -l alert > dmesg_current_alert dmesg -t -l crit > dmesg_current_alert dmesg -t -l err > dmesg_current_err dmesg -t -l warn > dmesg_current_warn
In general, dmesg should be clean with no emerg, alert, crit, and err level messages. If you see any of these, it might indicate some hardware and/or kernel problem.
A couple more important steps before trying out the newly installed kernel. There is no guarantee that the new kernel will boot. As a safe guard, please ensure that there is at least one good kernel installed. Change the default grub configuration file /etc/default/grub to:
Enable printing early boot messages to vga using earlyprink=vga kernel boot option Increase the GRUB_TIMEOUT value to 30 seconds, so grub pauses in menu allowing time to choose kernel to boot from grub menu, and comment out GRUB_TIMEOUT_STYLE=hidden
GRUB_CMDLINE_LINUX="earlyprink=vga" #GRUB_TIMEOUT_STYLE=hidden GRUB_TIMEOUT=30
Run update-grub to update the grub configuration in /boot
sudo update-grub
Now restart the system. Once the new kernel comes up, compare the saved dmesg from the old kernel with the new one and see if there are any regressions. If the newly installed kernel fails to boot, you will have to boot a good kernel and then investigate why the new kernel failed to boot.
Run Kernel Selftests and check results.
make kselftest