{"id":7306,"date":"2023-09-20T22:18:01","date_gmt":"2023-09-20T20:18:01","guid":{"rendered":"https:\/\/linux-bibel.at\/?p=7306"},"modified":"2023-09-20T22:18:03","modified_gmt":"2023-09-20T20:18:03","slug":"das-hintergrundbild-von-grub-anpassen","status":"publish","type":"post","link":"https:\/\/linux-bibel.at\/index.php\/2023\/09\/20\/das-hintergrundbild-von-grub-anpassen\/","title":{"rendered":"Das Hintergrundbild von GRUB anpassen"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">GRUB ist der Bootloader von Linux &#8211; ein solcher Bootloader dient dazu, Betriebssysteme zu starten. Auch wenn es heute UEFI gibt, ein Bootloader ist noch immer n\u00f6tig. GRUB kann nicht nur Linux, sondern auch Windows und andere Betriebssysteme starten.<br><br>In diesem Beitrag der Linux Bibel \u00d6sterreich sehen wir uns an, wie man GRUB mit einem eigenen Bild optisch ver\u00e4ndert.<br><br>Sehen wir uns einmal ein Beispiel an &#8211; hier das Bootmen\u00fc von Debian:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian.jpg\" rel=\"lightbox-0\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian-1024x576.jpg\" alt=\"\" class=\"wp-image-7310\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian-150x84.jpg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Bootmen\u00fc von Debian<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Nun, die Idee f\u00fcr diesen Beitrag kam gewisserma\u00dfen von unserem Leser <strong>John_Doe<\/strong> &#8211; er m\u00f6chte das Design des von der Feuerwehr genutzten Linux-Systems anpassen, eben mit Bildern und Logos der Feuerwehr.<br>Dazu werden am Ende nicht nur das Bootmen\u00fc, sondern auch das Plymouth-Thema (<em>es versteckt die Startmeldungen<\/em>), diverse Icons und Fenster angepasst.<br><br>Bis ich entsprechende Beispielgrafiken erhalte &#8211; die ich anpassen kann, werde ich einfach entsprechende Bilder aus dem Netz ziehen. Zu Beginn wird ganz einfach folgendes Bild das Bootmen\u00fc zieren:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/feuerwehr.jpg\" rel=\"lightbox-1\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"682\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/feuerwehr-1024x682.jpg\" alt=\"\" class=\"wp-image-7309\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/feuerwehr-1024x682.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/feuerwehr-300x200.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/feuerwehr-150x100.jpg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/feuerwehr-768x512.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/feuerwehr-1536x1023.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/feuerwehr.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Das Wichtigste &#8211; das verwendete Bild muss an einem Ort liegen, an den GRUB schon herankommt, auch wenn das System verschl\u00fcsselt ist. Also etwa auf einer nicht verschl\u00fcsselten Partition. Standardm\u00e4\u00dfig verwendet man hierzu das Systemverzeichnis &#8222;<em>\/boot\/grub\/images\/<\/em>&#8220; &#8211; es besteht nicht automatisch, man muss es manuell erstellen &#8211; als <a rel=\"noreferrer noopener\" href=\"https:\/\/www.linux-bibel-oesterreich.at\/viewtopic.php?t=366\" target=\"_blank\">Administrator<\/a> am <a rel=\"noreferrer noopener\" href=\"https:\/\/www.linux-bibel-oesterreich.at\/viewtopic.php?t=3\" target=\"_blank\">Terminal<\/a>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/boot\/grub\/images<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Jetzt gilt es, das gew\u00fcnschte Bild in das gerade erstellte Verzeichnis zu kopieren oder zu verschieben &#8211; ich kopiere zu Beginn. Das Bild nennt sich ganz einfach &#8222;<strong>feuerwehr.jpg<\/strong>&#8220; und liegt unter &#8222;<em>Downloads<\/em>&#8220; (<em>nat\u00fcrlich wieder als Administrator<\/em>):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cp Downloads\/feuerwehr.jpg \/boot\/grub\/images\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Zuletzt m\u00fcssen wir GRUB noch zeigen, welches Bild es als Hintergrund verwenden soll. Dies gelingt \u00fcber die Konfigurationsdatei &#8222;<em>\/etc\/default\/grub<\/em>&#8220; &#8211; diese k\u00f6nnen wir nur als Administrator bearbeiten. Also am einfachsten:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/default\/grub<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Hier f\u00fcgen wir eine neue Zeile ein &#8211; in meinem Beispiel zwei (<em>die erste dient zur Beschreibung der Zeile<\/em>):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Hintergrundbild\nexport GRUB_BACKGROUND=\"\/boot\/grub\/images\/feuerwehr.jpg\"<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian-1.jpg\" rel=\"lightbox-2\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian-1-1024x576.jpg\" alt=\"\" class=\"wp-image-7311\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian-1-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian-1-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian-1-150x84.jpg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian-1-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian-1-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian-1.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Hintergrundbild f\u00fcr GRUB angeben<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Wir speichern die Datei mit <strong>Strg+o<\/strong>, best\u00e4tigen mit <strong>Eingabe<\/strong> und schlie\u00dfen den Editor mit <strong>Strg+x<\/strong>. Zuletzt gilt es GRUB zu aktualisieren, also die neuen Einstellungen zu \u00fcbernehmen:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/sbin\/update-grub<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Funktioniert die Befehlsvervollst\u00e4ndigung unter Debian 11 nicht mehr, erhalten Sie eine Fehlermeldung wie &#8222;<strong>grub-mkconfig: not found<\/strong>&#8220; &#8211; einfach folgenden <a rel=\"noreferrer noopener\" href=\"https:\/\/www.linux-bibel-oesterreich.at\/viewtopic.php?t=144\" target=\"_blank\">Artikel<\/a> lesen. Schon sieht das Bootmen\u00fc wie gew\u00fcnscht aus:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian-2.jpg\" rel=\"lightbox-3\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian-2-1024x576.jpg\" alt=\"\" class=\"wp-image-7312\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian-2-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian-2-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian-2-150x84.jpg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian-2-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian-2-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/grub-debian-2.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Angepasstes GRUB-Hintergrundbild<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Jetzt w\u00e4re es m\u00f6glich, dass die Schriftfarbe zu hell ist &#8211; dies l\u00e4sst sich \u00fcber die Datei &#8222;<em>\/etc\/grub.d\/40_custom<\/em>&#8220; anpassen. Standardm\u00e4\u00dfig sieht diese unter Debian so aus:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/sh\nexec tail -n +3 $0\n# This file provides an easy way to add custom menu entries.  Simply type the\n# menu entries you want to add after this comment.  Be careful not to change\n# the 'exec tail' line above.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Diese bearbeiten wir wie zuvor mit Nano als Administrator am Terminal:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/grub.d\/40_custom<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Hier haben wir folgende Farben zur Verf\u00fcgung:<\/strong><br><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Vordergrundfarbe<\/th><th>Hintergrundfarbe<\/th><\/tr><tr><td>white<\/td><td>light-grey<\/td><\/tr><tr><td>dark-gray<\/td><td>black<\/td><\/tr><tr><td>red<\/td><td>light-red<\/td><\/tr><tr><td>yellow<\/td><td>brown<\/td><\/tr><tr><td>green<\/td><td>light-green<\/td><\/tr><tr><td>blue<\/td><td>light-blue<\/td><\/tr><tr><td>cyan<\/td><td>light-cyan<\/td><\/tr><tr><td>magenta<\/td><td>light-magenta<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Gleich einmal wichtig &#8211; die Farbe &#8222;<strong>black<\/strong>&#8220; als Hintergrund ist transparent &#8211; also vorteilhaft bei einem Bild als Hintergrund. Folgende Angaben lassen sich in der Datei machen:<br><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Angabe<\/th><th>Beschreibung<\/th><\/tr><tr><td><strong>set color_normal=&#8220;Vordergrund\/Hintergrund&#8220;<\/strong><\/td><td>Text au\u00dferhalb des Bootmen\u00fcs, also etwa die Hilfe ganz unten<\/td><\/tr><tr><td><strong>set menu_color_normal=&#8220;Vordergrund\/Hintergrund&#8220;<\/strong><\/td><td>Text des Men\u00fcs (<em>Eintr\u00e4ge<\/em>)<\/td><\/tr><tr><td><strong>set menu_color_highlight=&#8220;Vordergrund\/Hintergrund&#8220;<\/strong><\/td><td>Die gerade markierte Zeile<\/td><\/tr><tr><td><strong>set color_highlight=&#8220;Vordergrund\/Hintergrund&#8220;<\/strong><\/td><td>Die Farbe der markierten Zeile in Untermen\u00fcs<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Auch hier folgt abschlie\u00dfend nat\u00fcrlich wieder der Befehl:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>update-grub<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Tipp:<br><br>Ist das Bild zu gro\u00df, ist es m\u00f6glich, dass es nicht angezeigt wird &#8211; in diesem Fall verkleinern Sie das Bild ganz einfach etwas.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Erstver\u00f6ffentlichung: So 13. M\u00e4r 2022, 06:37<\/strong><\/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=\"7306\" 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\">    <\/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=\"7306\" 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>GRUB ist der Bootloader von Linux &#8211; ein solcher Bootloader dient dazu, Betriebssysteme zu starten. Auch wenn es heute UEFI gibt, ein Bootloader ist noch immer n\u00f6tig. GRUB kann nicht nur Linux, sondern auch Windows und andere Betriebssysteme starten. In diesem Beitrag der Linux Bibel \u00d6sterreich sehen wir uns an, wie man GRUB mit einem [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,101,102],"tags":[],"class_list":["post-7306","post","type-post","status-publish","format-standard","hentry","category-system","category-tipps","category-tipps-system"],"_links":{"self":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/7306","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=7306"}],"version-history":[{"count":3,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/7306\/revisions"}],"predecessor-version":[{"id":7313,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/7306\/revisions\/7313"}],"wp:attachment":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media?parent=7306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/categories?post=7306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/tags?post=7306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}