Manjaro Manjaro Kernel

Manjaro Kernel

From Manjaro
Revision as of 16:03, 9 September 2021 by Andreas85 (talk | contribs) (Created page with "Das optionale '''rmc''' ('''<u>r</u>'''e'''<u>m</u>'''ove '''<u>c</u >'''urrent) Komponente ist von entscheidender Bedeutung. Wenn Sie dies verwenden, wird Ihr vorhandener Ker...")
Other languages:
Deutsch • ‎English • ‎Türkçe • ‎русский • ‎עברית

Übersicht

As the name would imply, as with the kernel of a seed, the Linux kernel is the core of a Linux operating system. Every other element of a Linux-based operating system is built around the kernel, which acts as an interface between your computer's hardware and the applications that run on it. As hardware and software applications become more complex and sophisticated, so do the kernels to fully utilise them. As such, Linux kernels are continually under development, with new revisions and versions being regularly released. Further information on the very latest developments in kernel technology can be found at The Linux Kernel Archives

The first Linux kernel was originally developed by Linus Torvalds, the creator of Linux. It is now an open-source project containing millions of lines of code generated by thousands of programmers. However, Linus Torvalds still has the final authority on their development and release.


GUI Manjaro Einstellungen

Msm-kernels.jpg

Manjaro-Einstellungsmanager bietet eine einfache Möglichkeit zum Hinzufügen und Entfernen von Kerneln (einschließlich der erforderlichen Kernel-Module).

Neue Kernel können durch Drücken der Schaltfläche "Installieren" installiert werden. Alle notwendigen Kernel-Module werden automatisch mit einem neuen Kernel mit installiert.

Bitte beachten Sie bei der Auswahl eines Kernels das Tag "Empfohlen". LTS steht für Long Term Support, was für die meisten Benutzer am sichersten ist.

Der neueste installierte Kernel wird standardmäßig gebootet, aber um andere installierte Kernel auszuführen, lesen Sie den Abschnitt Kernel auswählen unten.


Terminalbefehle

Anstatt den Manjaro-Einstellungsmanager zum Identifizieren, Auswählen, Hinzufügen und Entfernen von Kerneln zu verwenden, kann alles auch von einem Terminal aus erreicht werden.


Identifizieren des verwendeten Kernels

Dieser Terminalbefehl gibt die Kernel-Informationen Ihres Systems aus:

mhwd-kernel -li

Der obige Befehl zeigt nicht nur an, welcher Kernel verwendet wird, sondern listet auch alle anderen Kernel auf, die ebenfalls installiert sind, wie im folgenden Beispiel für die Terminalausgabe gezeigt:

mhwd-kernel -li                                                

Currently running: 5.13.11-1-MANJARO (linux513) The following kernels are installed in your system:

  * linux419
  * linux510
  * linux513

Wie im obigen Beispiel zu sehen ist, führt Manjaro den Kernel 5.13.11-1-MANJARO aus. Die hier gemachten Angaben sind nicht willkürlich; jeder Teil des Kernelnamens identifiziert etwas über diesen Kernel:

  • Die 5 gibt die Version an
  • Die 13 zeigt die Hauptrevision an
  • Die 11 zeigt die geringfügige Überarbeitung an
  • Die 1 gibt die Überarbeitung des Manjaro-Pakets an
  • MANJARO gibt die spezifische Distribution an, für die es verwendet wird


Neue Kernel hinzufügen

Tip
mhwd-kernel aktualisiert automatisch einen neu installierten Kernel mit allen Modulen, die derzeit in Ihrem bestehenden Kernel verwendet werden. Wenn Sie beispielsweise von Kernel 4.19 auf 5.10 aktualisieren, aktualisiert mhwd-kernel automatisch 5.10 mit allen Modulen, die in 4.19 vorhanden sind. Ist das nicht nett!

Manjaro unterstützt nicht nur die Verwendung von mehreren Kerneln (auswählbar über den Boot-Bildschirm), sondern ermöglicht auch einen einfachen Zugriff auf die neuesten Bleeding Edge-Kernel. Dies wird durch die Verwendung von Manjaros eigenem mhwd-kernel (Manjaro Hard-Ware Detection)-Befehl durchgeführt. Die Syntax des Befehls lautet wie folgt:

sudo mhwd-kernel [-i] [neuer Kernel: linux(version)] [optional - entfernt den aktuellen Kernel: rmc]


Wenn Sie im Befehl einen neuen zu installierenden Kernel auflisten, ist es nicht erforderlich, die gesamte Versionsnummer anzugeben. Zum Beispiel kann jede Version von Kernel 4.19 einfach als 'linux419' aufgelistet werden, und jede Version von Kernel 4.14 kann als 'linux414' aufgelistet werden und so weiter.

Das optionale rmc (remove current) Komponente ist von entscheidender Bedeutung. Wenn Sie dies verwenden, wird Ihr vorhandener Kernel bei der Installation des neuen Kernels gelöscht. Andernfalls, wenn er nicht verwendet wird, wird der vorhandene Kernel beibehalten und ist neben dem neuen Kernel auf dem Startbildschirm auswählbar. Es empfiehlt sich - insbesondere bei einem Update auf den neusten Kernel - den alten Kernel zu behalten, wenn auch nur für kurze Zeit. Dies ist die sicherere Option, und der alte Kernel kann leicht entfernt werden, wenn Sie mit der Stabilität und Funktionalität des neuen zufrieden sind.


As an example, once the terminal is opened, the following command will install a new kernel (4.19) without deleting the existing kernel currently being used:

sudo mhwd-kernel -i linux419


Otherwise, the following command will install a new kernel (5.10) to replace the existing kernel, which will be deleted:

sudo mhwd-kernel -i linux510 rmc


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

Warning
DO NOT attempt to delete an existing kernel while it is actually being used by Manjaro at the time. You can first identify what kernel is running on your system by using the command mhwd-kernel -li in the terminal (see above).

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:

  1. The kernel itself
  2. The kernel's headers
  3. 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

sudo mhwd-kernel -r linux50


2. To delete a kernel's headers, the syntax is:

sudo pacman -R linux[version]-headers


For example, to delete the headers of kernel version 5.0.x from the system, the following command would be entered:

sudo pacman -R linux50-headers


3. To delete a kernel's extra modules, the syntax is:

sudo pacman -R linux[version]-extramodules


For example, to delete the extra modules of kernel version 5.0.x from the system, the following command would be entered:

sudo pacman -R linux50-extramodules


4. To delete all elements of a kernel at the same time - where they are all present on your system - the syntax is:

sudo pacman -R linux[version] linux[version]-headers linux[version]-extramodules


For example, to completely remove all elements of kernel version 5.0.x, the following command would be entered:

sudo pacman -R linux50 linux50-headers linux50-extramodules

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:

[handy@jarmano ~]$ 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

Kernel select.png

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 press <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>.


See also

MHWD-kern - a lightweight kernel wizard

Cookies help us deliver our services. By using our services, you agree to our use of cookies.