Pages

Tuesday, April 27, 2021

Fedora 33 : Test Days - test the kernel.

Test Days are often focused on testing Changes planned for an upcoming Fedora release, but they also regularly test important areas of the Fedora distribution, like upgrades, internationalization, graphical drivers, desktop environments, kernel updates, and others., see the Test Days webpage.
In today's tutorial I will show you how to test the kernel, see the kernel test week webpage.
Fedora contains the following kernel packages:
kernel — Contains the kernel for single, multicore and multiprocessor systems.
kernel-debug — Contains a kernel with numerous debugging options enabled for kernel diagnosis, at the expense of reduced performance.
kernel-devel — Contains the kernel headers and makefiles sufficient to build modules against the kernel package.
kernel-debug-devel — Contains the development version of the kernel with numerous debugging options enabled for kernel diagnosis, at the expense of reduced performance.
kernel-headers — Includes the C header files that specify the interface between the Linux kernel and user-space libraries and programs. The header files define structures and constants that are needed for building most standard programs.
linux-firmware — Contains all of the firmware files that are required by various devices to operate.
perf — This package contains supporting scripts and documentation for the perf tool shipped in each kernel image subpackage.
kernel-abi-whitelists — Contains information pertaining to the Fedora kernel ABI, including a lists of kernel symbols that are needed by external Linux kernel modules and a dnf plug-in to aid enforcement.
kernel-tools — Contains tools for manipulating the Linux kernel and supporting documentation.
You can see all events from Test Days on this webpage.
First, you need to install koji tool:
[root@desk mythcat]# dnf install koji.
Last metadata expiration check: 1:42:23 ago on Tue 27 Apr 2021 07:08:25 PM EEST.
Package koji-1.24.0-1.fc33.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
The koji tool is the software that builds RPM packages for the Fedora project.
This command show all available kernel builds:
[root@desk mythcat]# koji list-builds --package=kernel --after="2021-04-09"
Build                                                    Built by          State
-------------------------------------------------------  ----------------  ----------------
kernel-5.11.13-100.fc32                                  jforbes           COMPLETE
kernel-5.11.13-200.fc33                                  jforbes           COMPLETE
kernel-5.11.13-300.fc34                                  jforbes           COMPLETE
kernel-5.11.14-100.fc32                                  jforbes           COMPLETE
kernel-5.11.14-200.fc33                                  jforbes           COMPLETE
kernel-5.11.14-300.fc34                                  jforbes           COMPLETE
kernel-5.11.15-100.fc32                                  jforbes           COMPLETE
kernel-5.11.15-200.fc33                                  jforbes           COMPLETE
kernel-5.11.15-300.fc34                                  jforbes           COMPLETE
kernel-5.11.16-100.fc32                                  jforbes           COMPLETE
kernel-5.11.16-200.fc33                                  jforbes           COMPLETE
kernel-5.11.16-300.fc34                                  jforbes           COMPLETE
kernel-5.12.0-0.rc7.189.eln110                           jforbes           COMPLETE
kernel-5.12.0-0.rc7.189.fc35                             jforbes           COMPLETE
kernel-5.12.0-0.rc7.20210416git7e25f40eab52.191.fc35     jforbes           COMPLETE
kernel-5.12.0-0.rc8.191.eln110                           jforbes           COMPLETE
kernel-5.12.0-0.rc8.191.fc35                             jforbes           COMPLETE
kernel-5.12.0-0.rc8.20210423git7af08140979a.193.eln110   jforbes           COMPLETE
kernel-5.12.0-0.rc8.20210423git7af08140979a.193.fc35     jforbes           COMPLETE
kernel-5.12.0-198.eln110                                 jforbes           CANCELED
kernel-5.12.0-198.fc35                                   jforbes           COMPLETE
I download the kernel:
[root@desk mythcat]# koji download-build --arch=x86_64 kernel-5.12.0-198.fc35
Downloading: kernel-debug-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 243.62 KiB / 243.62 KiB
Downloading: kernel-modules-internal-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 399.58 KiB / 399.58 KiB
Downloading: kernel-debug-modules-internal-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 422.61 KiB / 422.61 KiB
Downloading: kernel-debug-modules-extra-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 2.28 MiB / 2.28 MiB
Downloading: kernel-modules-extra-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 2.19 MiB / 2.19 MiB
Downloading: kernel-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 243.52 KiB / 243.52 KiB
Downloading: kernel-debug-core-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 35.78 MiB / 35.78 MiB
Downloading: kernel-modules-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 31.24 MiB / 31.24 MiB
Downloading: kernel-core-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 33.92 MiB / 33.92 MiB
Downloading: kernel-debug-modules-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 31.97 MiB / 31.97 MiB
Downloading: kernel-devel-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 14.51 MiB / 14.51 MiB
Downloading: kernel-debug-devel-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 14.62 MiB / 14.62 MiB
The last step is update your kernel and see if is working well:
[root@desk mythcat]# dnf update kernel-*.rpm
Last metadata expiration check: 2:01:14 ago on Tue 27 Apr 2021 07:08:25 PM EEST.
The same or higher version of kernel is already installed, cannot update it.
The same or higher version of kernel-core is already installed, cannot update it.
Package kernel-debug not installed, cannot update it.
...
Dependencies resolved.
========================================================================================================
 Package                                  Arch        Version                  Repository          Size
========================================================================================================
Installing:
 kernel                                   x86_64      5.12.0-198.fc35          @commandline       244 k
 kernel-core                              x86_64      5.12.0-198.fc35          @commandline        34 M
 kernel-devel                             x86_64      5.12.0-198.fc35          @commandline        15 M
 kernel-modules                           x86_64      5.12.0-198.fc35          @commandline        31 M
 kernel-modules-extra                     x86_64      5.12.0-198.fc35          @commandline       2.2 M
Installing dependencies:
 bison                                    x86_64      3.6.4-3.fc33             fedora             860 k
 flex                                     x86_64      2.6.4-5.fc33             fedora             311 k
Removing:
 kernel                                   x86_64      5.11.14-200.fc33         @updates             0  
 kernel-core                              x86_64      5.11.14-200.fc33         @updates            74 M
 kernel-devel                             x86_64      5.11.14-200.fc33         @updates            56 M
 kernel-modules                           x86_64      5.11.14-200.fc33         @updates            30 M
 kernel-modules-extra                     x86_64      5.11.14-200.fc33         @updates           1.9 M
Removing dependent packages:
 kmod-nvidia-5.11.14-200.fc33.x86_64      x86_64      3:465.24.02-1.fc33       @@commandline       44 M

Transaction Summary
========================================================================================================
Install  7 Packages
Remove   6 Packages

Total size: 83 M
Total download size: 1.1 M
Is this ok [y/N]: y
...
Installed:
  bison-3.6.4-3.fc33.x86_64                             flex-2.6.4-5.fc33.x86_64                       
  kernel-5.12.0-198.fc35.x86_64                         kernel-core-5.12.0-198.fc35.x86_64             
  kernel-devel-5.12.0-198.fc35.x86_64                   kernel-modules-5.12.0-198.fc35.x86_64          
  kernel-modules-extra-5.12.0-198.fc35.x86_64          
Removed:
  kernel-5.11.14-200.fc33.x86_64                                                                        
  kernel-core-5.11.14-200.fc33.x86_64                                                                   
  kernel-devel-5.11.14-200.fc33.x86_64                                                                  
  kernel-modules-5.11.14-200.fc33.x86_64                                                                
  kernel-modules-extra-5.11.14-200.fc33.x86_64                                                          
  kmod-nvidia-5.11.14-200.fc33.x86_64-3:465.24.02-1.fc33.x86_64                                         

Complete!
If you want to see kernel packages are installed, execute this command:
[root@desk mythcat]# dnf list installed "kernel-*"
Installed Packages
kernel-core.x86_64                                 5.11.15-200.fc33                        @updates     
kernel-core.x86_64                                 5.11.16-200.fc33                        @updates     
kernel-core.x86_64                                 5.12.0-198.fc35                         @@commandline
kernel-devel.x86_64                                5.11.15-200.fc33                        @updates     
kernel-devel.x86_64                                5.11.16-200.fc33                        @updates     
kernel-devel.x86_64                                5.12.0-198.fc35                         @@commandline
kernel-headers.x86_64                              5.11.16-200.fc33                        @updates     
kernel-modules.x86_64                              5.11.15-200.fc33                        @updates     
kernel-modules.x86_64                              5.11.16-200.fc33                        @updates     
kernel-modules.x86_64                              5.12.0-198.fc35                         @@commandline
kernel-modules-extra.x86_64                        5.11.15-200.fc33                        @updates     
kernel-modules-extra.x86_64                        5.11.16-200.fc33                        @updates     
kernel-modules-extra.x86_64                        5.12.0-198.fc35                         @@commandline
kernel-srpm-macros.noarch                          1.0-3.fc33                              @fedora