Tue Jan 24 11:37:32 2023 UTC

Change the default kernel boot

Introduction

NuTyX provides several kernel.

To list them :

cards search kernel
(cli-extra) kernel-414 4.14.260 The 4.14 longterm support Linux Kernel version
...
(cli-extra) kernel-419 4.19.223 The 4.19 longterm support Linux Kernel version
...
(cli-extra) kernel-54 5.4.169 The 5.4 longterm support Linux Kernel version
...
(cli-extra) kernel-510 5.10.89 The 5.10 longterm support Linux Kernel version 
...
(cli-extra) kernel-515 5.15.12 The 5.15 longterm support Linux Kernel version
..
(cli-extra) kernel-61 6.1.8 The 6.1 longterm support Linux Kernel version
..

For this example, we are going to use the "kernel-419".

Kernel installation

To install the kernel (4.19) :

sudo cards install kernel-419

More information about cards commands : base commands

Set the new kernel by default

You have to edit /boot/grub/grub.cfg file which is the GRUB configuration file.

Edit the menuentry function.

By default the kernel is defined by this line :

linux	/boot/kernel-stable root=/dev/nvme0n1p3 ro init=/sbin/systemd-init quiet verbose=no

/boot/kernel-stable indicates that the stable version of the kernel will be used.

You have to modify kenerl-stable by the kernel that you want to use.

In this example kernel-stable with kernel-419.

linux	/boot/kernel-419 root=/dev/nvme0n1p3 ro init=/sbin/systemd-init quiet verbose=no

Then, save the file and reboot, you can then check by opening a terminal and type the command:

uname -r
4.19.223-NuTyX-419
to verify if it succed.