{"id":14053,"date":"2024-02-03T10:34:59","date_gmt":"2024-02-03T09:34:59","guid":{"rendered":"https:\/\/linux-bibel.at\/?p=14053"},"modified":"2024-02-03T10:38:56","modified_gmt":"2024-02-03T09:38:56","slug":"linux-kernel-fuer-debian-selbst-kompilieren","status":"publish","type":"post","link":"https:\/\/linux-bibel.at\/index.php\/2024\/02\/03\/linux-kernel-fuer-debian-selbst-kompilieren\/","title":{"rendered":"Linux-Kernel f\u00fcr Debian selbst kompilieren"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Der Kernel bringt unter Linux die wichtigsten Treiber mit, ein aktuellerer Kernel nat\u00fcrlich auch aktuellere Treiber. Ein aktuellerer Kernel bringt aber auch die Behebung von Fehlern aus \u00e4lteren Kerneln und nat\u00fcrlich auch mehr Geschwindigkeit.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In diesem Beitrag der Linux Bibel sehen wir uns an, wie wir unter Debian einen aktuellen Kernel selbst kompilieren &#8211; es ist viel einfacher als man denkt.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Voraussetzungen schaffen<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Als Erstes werden \u00fcber die Paket-Verwaltung die n\u00f6tigen Pakete installiert &#8211; als root am Terminal:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install libncurses-dev fakeroot wget bzip2 build-essential bc python3 bison flex rsync libelf-dev libssl-dev libncurses-dev dwarves git debhelper ncurses-dev fakeroot wget bzip2<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Haben Sie eine NVIDIA-Grafikkarte installiert, ben\u00f6tigen Sie noch deren Kernel-Treiber &#8211; suchen Sie etwa unter Synaptic nach &#8222;<strong>nvidia<\/strong>&#8220; und installieren das passende Paket mit dem Zusatz &#8222;<strong>dkms<\/strong>&#8222;. Danach laden wir uns von <a href=\"https:\/\/kernel.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Kernel.org<\/a> den aktuellsten Kernel herunter:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"585\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-1024x585.jpeg\" alt=\"\" class=\"wp-image-14049\" style=\"width:647px;height:auto\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-1024x585.jpeg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-1536x877.jpeg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-150x86.jpeg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-300x171.jpeg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-768x439.jpeg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel.jpeg 1688w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Mainline ist die aktuellste Entwickler-Version &#8211; dieser muss nicht unbedingt stabil sein, ich hatte allerdings noch nie Probleme damit &#8211; Einsteigern rate ich jedoch davon ab. Stable w\u00e4re f\u00fcr produktive Systeme nat\u00fcrlich optimal. Sie laden den Tarball herunter und entpacken diesen. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Anschlie\u00dfend wechseln Sie auf dem Terminal in das entpackte Verzeichnis und kopieren die Konfiguration des aktuellen Kernels in das Verzeichnis &#8211; als normaler Benutzer:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cp \/boot\/config-`uname -r` .config<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Jetzt \u00f6ffnen Sie diese gerade kopierte (<em>versteckte Datei<\/em>) mit einem beliebigen Texteditor &#8211; ich mache dies gleich am Terminal mit Vim:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim .config<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Hier f\u00fcgen Sie gleich am Beginn vier neue Zeilen ein:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>scripts\/config --disable SYSTEM_TRUSTED_KEYS<br>scripts\/config --disable SYSTEM_REVOCATION_KEYS<br>scripts\/config --disable DEBUG_INFO<br>scripts\/config --enable DEBUG_INFO_NONE<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Jetzt wird die Konfiguration angepasst:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>make olddefconfig<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Und schon wird der Kernel kompiliert &#8211; als root:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>make bindeb-pkg -j `nproc` LOCALVERSION=-custom<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-2.jpeg\" rel=\"lightbox-0\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"591\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-2-1024x591.jpeg\" alt=\"\" class=\"wp-image-14051\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-2-1024x591.jpeg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-2-1536x886.jpeg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-2-2048x1182.jpeg 2048w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-2-150x87.jpeg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-2-300x173.jpeg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-2-768x443.jpeg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In meinem Fall dauerte das Kompilieren rund 20 Minuten, einfach abwarten, bis die Arbeit abgeschlossen ist:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-3.jpeg\" rel=\"lightbox-1\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"588\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-3-1024x588.jpeg\" alt=\"\" class=\"wp-image-14054\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-3-1024x588.jpeg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-3-1536x882.jpeg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-3-2048x1176.jpeg 2048w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-3-150x86.jpeg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-3-300x172.jpeg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-3-768x441.jpeg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Die erstellten Pakete finden Sie jetzt ein Verzeichnis h\u00f6her:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-4-scaled.jpeg\" rel=\"lightbox-2\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-4-1024x640.jpeg\" alt=\"\" class=\"wp-image-14055\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-4-1024x640.jpeg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-4-1536x960.jpeg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-4-2048x1280.jpeg 2048w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-4-150x94.jpeg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-4-300x188.jpeg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/02\/kernel-4-768x480.jpeg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Sie wechseln auf dem Terminal ein Verzeichnis h\u00f6her:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd ..<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Und installieren die Pakete \u00fcber die Paket-Verwaltung:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install .\/*.deb<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Ein Neustart des Systems und schon arbeiten Sie mit dem aktuellsten Kernel.<\/p>\n<div class=\"pld-like-dislike-wrap pld-custom\">\r\n    <div class=\"pld-like-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-like-trigger pld-like-dislike-trigger  \" title=\"Gef\u00e4llt mir\" data-post-id=\"14053\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                            <img src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/12\/Daumen-Hoch.png\" alt=\"Gef\u00e4llt mir\" \/>\r\n            <\/a>\r\n    <span class=\"pld-like-count-wrap pld-count-wrap\">14    <\/span>\r\n<\/div><div class=\"pld-dislike-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-dislike-trigger pld-like-dislike-trigger  \" title=\"Gef\u00e4llt mir nicht\" data-post-id=\"14053\" data-trigger-type=\"dislike\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                            <img src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/12\/Daumen-Runter.png\" alt=\"Gef\u00e4llt mir nicht\" \/>\r\n            <\/a>\r\n    <span class=\"pld-dislike-count-wrap pld-count-wrap\"><\/span>\r\n<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Der Kernel bringt unter Linux die wichtigsten Treiber mit, ein aktuellerer Kernel nat\u00fcrlich auch aktuellere Treiber. Ein aktuellerer Kernel bringt aber auch die Behebung von Fehlern aus \u00e4lteren Kerneln und nat\u00fcrlich auch mehr Geschwindigkeit. In diesem Beitrag der Linux Bibel sehen wir uns an, wie wir unter Debian einen aktuellen Kernel selbst kompilieren &#8211; es [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":14054,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[15],"class_list":["post-14053","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-system","tag-system"],"_links":{"self":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/14053","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/comments?post=14053"}],"version-history":[{"count":2,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/14053\/revisions"}],"predecessor-version":[{"id":14057,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/14053\/revisions\/14057"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media\/14054"}],"wp:attachment":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media?parent=14053"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/categories?post=14053"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/tags?post=14053"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}