{"id":1304,"date":"2012-01-03T08:27:45","date_gmt":"2012-01-03T07:27:45","guid":{"rendered":"http:\/\/my.stargazer.at\/?p=1304"},"modified":"2012-01-03T08:27:45","modified_gmt":"2012-01-03T07:27:45","slug":"extending-grub2-to-detect-memtest","status":"publish","type":"post","link":"https:\/\/my.stargazer.at\/de\/2012\/01\/03\/extending-grub2-to-detect-memtest\/","title":{"rendered":"Grub2 um die Erkennung von Memtest+ erweitern"},"content":{"rendered":"<p>Grub2 unter Gentoo erkennt leider nicht, wenn Memtest86+ als Boot-Image vorliegt &#8211; also habe ich mir einmal angesehen, wie man das Ganze realisieren k\u00f6nnte:<\/p>\n<p><!--more-->20_memtest86+:<\/p>\n<blockquote><p>\n<code><br \/>\n#! \/bin\/sh<br \/>\nset -e<\/p>\n<p># grub-mkconfig helper script.<br \/>\n# Copyright (C) 2006,2007,2008,2009,2010  Free Software Foundation, Inc.<br \/>\n#<br \/>\n# GRUB is free software: you can redistribute it and\/or modify<br \/>\n# it under the terms of the GNU General Public License as published by<br \/>\n# the Free Software Foundation, either version 3 of the License, or<br \/>\n# (at your option) any later version.<br \/>\n#<br \/>\n# GRUB is distributed in the hope that it will be useful,<br \/>\n# but WITHOUT ANY WARRANTY; without even the implied warranty of<br \/>\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br \/>\n# GNU General Public License for more details.<br \/>\n#<br \/>\n# You should have received a copy of the GNU General Public License<br \/>\n# along with GRUB.  If not, see <http:\/\/www.gnu.org\/licenses\/>.<\/p>\n<p>prefix=\/usr<br \/>\nexec_prefix=${prefix}<br \/>\nbindir=\/bin<br \/>\nlibdir=\/lib64<br \/>\ndatarootdir=${prefix}\/share<\/p>\n<p>. ${libdir}\/grub\/grub-mkconfig_lib<\/p>\n<p>MEMTEST86_IMAGE=\"\/boot\/memtest86plus\/memtest.bin\"<br \/>\nCLASS=\"--class memtest86 --class gnu --class tool\"<\/p>\n<p>if [ -e $MEMTEST86_IMAGE ] && is_path_readable_by_grub $MEMTEST86_IMAGE; then<br \/>\n  # image exists, create menu entry<br \/>\n  echo \"Found memtest86+ image: $MEMTEST86_IMAGE\" >&2<br \/>\n  cat << EOF\n\nmenuentry \"Memory test (memtest86+)\" $CLASS {\nEOF\n  prepare_grub_to_access_device `${grub_probe} --target=device $MEMTEST86_IMAGE` | sed -e \"s\/^\/  \/\"\n  cat << EOF\n  linux16 (\\$root)`make_system_path_relative_to_its_root $MEMTEST86_IMAGE`\n}\nEOF\nfi\n<\/code>\n<\/p><\/blockquote>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>Grub2 unter Gentoo erkennt leider nicht, wenn Memtest86+ als Boot-Image vorliegt &#8211; also habe ich mir einmal angesehen, wie man das Ganze realisieren k\u00f6nnte:<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[39,576,22],"class_list":["post-1304","post","type-post","status-publish","format-standard","hentry","category-it-related-stuff","tag-gentoo","tag-grub","tag-linux"],"_links":{"self":[{"href":"https:\/\/my.stargazer.at\/de\/wp-json\/wp\/v2\/posts\/1304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/my.stargazer.at\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/my.stargazer.at\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/my.stargazer.at\/de\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/my.stargazer.at\/de\/wp-json\/wp\/v2\/comments?post=1304"}],"version-history":[{"count":0,"href":"https:\/\/my.stargazer.at\/de\/wp-json\/wp\/v2\/posts\/1304\/revisions"}],"wp:attachment":[{"href":"https:\/\/my.stargazer.at\/de\/wp-json\/wp\/v2\/media?parent=1304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/my.stargazer.at\/de\/wp-json\/wp\/v2\/categories?post=1304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/my.stargazer.at\/de\/wp-json\/wp\/v2\/tags?post=1304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}