Noyaux (kernels) Manjaro
Aperçu
Comme son nom l'indique, comme pour le noyau d'une graine, le noyau Linux est le cœur d'un système d'exploitation Linux. Tous les autres éléments d'un système d'exploitation basé sur Linux sont construits autour du noyau, qui agit comme une interface entre le matériel de votre ordinateur et les applications qui y sont exécutées. À mesure que les applications matérielles et logicielles deviennent plus complexes et sophistiquées, les noyaux doivent également les utiliser pleinement. En tant que tels, les noyaux Linux sont continuellement en développement, avec de nouvelles révisions et versions régulièrement publiées. De plus amples informations sur les tout derniers développements de la technologie du noyau peuvent être trouvées sur The Linux Kernel Archives.
Le premier noyau Linux a été initialement développé par Linus Torvalds, le créateur de Linux. Il s'agit désormais d'un projet open source contenant des millions de lignes de code générées par des milliers de programmeurs. Cependant, Linus Torvalds a toujours l'autorité finale sur leur développement et leur publication.
Outil GUI
Manjaro Settings Manager offre un moyen simple d'ajouter et de supprimer un noyau (y compris les modules de noyau nécessaires).
Les nouveaux noyaux peuvent être installés en appuyant sur le bouton "Installer". Tous les modules de noyau nécessaires seront également installés automatiquement avec un nouveau noyau.
Veuillez considérer la balise "Recommandé" lors du choix d'un noyau. LTS signifie Long Term Support, ce qui est le plus sûr pour la plupart des utilisateurs. "What should I be aware of if I'm not on an LTS kernel?"
Le noyau installé le plus récent sera démarré par défaut, mais pour exécuter d'autres noyaux installés, voir la section Selecting Kernels ci-dessous.
Commandes Terminal
Au lieu d'utiliser l'interface graphique Manjaro Settings Manager pour identifier, choisir, ajouter et supprimer des noyaux, tout peut également être réalisé à partir d'un terminal.
Identification du noyau utilisé
Cette commande de terminal donnera les informations sur le noyau de votre système :
La commande ci-dessus indique non seulement quel noyau est utilisé, mais elle répertorie également tous les autres noyaux également installés, comme le montre l'exemple suivant de sortie du terminal :
$ mhwd-kernel -li
Currently running: 5.0.17-1-MANJARO (linux50) The following kernels are installed in your system: * linux419 * linux420 * linux50
As seen in the above example, Manjaro is running kernel 5.0.17-1-MANJARO. The information given here is not arbitrary; each part of the kernel name identifies something about that kernel:
- The 5 indicates the version
- The 0 indicates the major revision
- The 17 indicates the minor revision
- The 1 indicates the revision of the Manjaro package
- MANJARO indicates the specific distribution it is used for
Adding New Kernels
Manjaro not only supports the use of multiple kernels (selectable from the boot screen), but allows easy access to the very latest bleeding edge kernels as well. This is undertaken through use of Manjaro's own MHWD-kernel (Manjaro Hard-Ware Detection) command. The syntax of the command is as follows:
sudo mhwd-kernel [-i] [new kernel: linux(version)] [optional - remove the current kernel: rmc]
When listing a new kernel to be installed in the command, it is not necessary to write the entire version number. For example, any version of Kernel 4.19 can be listed simply as 'linux419', and any version of Kernel 4.14 can be listed as 'linux414', and so on.
The optional rmc (remove current) component is of vital importance. Using this will result in your existing kernel being deleted upon the installation of the new kernel. Otherwise, if it is not used, then the existing kernel will be kept, and will be selectable alongside the new kernel at the boot screen. It is recommended - especially if updating to the latest bleeding edge kernel - to keep your old one, even if only for a short time afterwards. This the safer option, and the old kernel can be easily removed when satisfied with the stability and functionality of the new one.
As an example, once the terminal is opened, the following command will install a new kernel (6.6) without deleting the existing kernel currently being used:
Otherwise, the following command will install a new kernel (5.10) to replace the existing kernel, which will be deleted:
Either way, Manjaro will automatically configure the new kernel for you, ready for immediate use. Once completed, close the terminal and re-boot the system for the change to take effect.
Removing Kernels
Where multiple kernels are present on your system, pacman can be used to remove them in the terminal. It may be necessary to delete a total of three elements of the kernel in total to completely remove it:
- The kernel itself
- The kernel's headers
- The kernel's extra modules
Whether or not the headers and extra modules must be deleted depends on whether or not they have been installed.
1. To remove a kernel use the following syntax: sudo mhwd-kernel -r linux[version]
Here is an example for removing kernel 5.0.17-1
2. To delete a kernel's headers, the syntax is:
For example, to delete the headers of kernel version 5.0.x from the system, the following command would be entered:
3. To delete a kernel's extra modules, the syntax is:
For example, to delete the extra modules of kernel version 5.0.x from the system, the following command would be entered:
4. To delete all elements of a kernel at the same time - where they are all present on your system - the syntax is:
For example, to completely remove all elements of kernel version 5.0.x, the following command would be entered:
Please note however, that attempting to delete multiple elements at once if they are not present on your system will result in an error message before the operation itself is aborted. It is also worthwhile noting if Manjaro is being run in a virtual machine (e.g. Oracle Virtualbox), you may not be able to delete certain kernels if they contain elements important to the virtualisation process itself.
Don't forget the mhwd-kernel -h command
As with most Linux commands that can be entered into the Terminal, typing the command followed by either -h or --help will print out the usage & available options to the Terminal for your reference. Here is the output of the mhwd-kernel -h command:
$ mhwd-kernel -h
Usage: mhwd-kernel [option] -h --help Show this help message -i --install Install a new kernel [kernel(s)] [optional: rmc = remove current kernel] -l --list List all available kernels -li --listinstalled List installed kernels -r --remove Remove a kernel [kernel(s)]
Selecting Kernels
All available kernels installed on your system will be presented upon booting up. GNU GRUB is visible with a couple of options. Choose "Advanced Options for Manjaro Linux" by using the arrow keys ↑ ↓ on your keyboard and then ↵ Enter.
On the next screen (as illustrated) are backup copies of each kernel version installed (which will also be automatically removed if or when a kernel version is deleted). To select a kernel, simply use the arrow keys ↑ ↓ to highlight the desired version, and then press ↵ Enter.