summaryrefslogtreecommitdiffstats
path: root/abs/core/grub/20_memtest86+
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-08-07 02:30:28 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-08-07 02:30:28 (GMT)
commite39a88ed81cbb4f4ddb9f1de4d0497ff7db908d7 (patch)
treeea68401bfcf5559fa6bcc9516e3000628ca9daac /abs/core/grub/20_memtest86+
parent401b6463c60a1d979301e882343855eedf8dd14c (diff)
downloadlinhes_pkgbuild-e39a88ed81cbb4f4ddb9f1de4d0497ff7db908d7.zip
linhes_pkgbuild-e39a88ed81cbb4f4ddb9f1de4d0497ff7db908d7.tar.gz
linhes_pkgbuild-e39a88ed81cbb4f4ddb9f1de4d0497ff7db908d7.tar.bz2
grub 2
-drops grub 1 and replaced with grub2
Diffstat (limited to 'abs/core/grub/20_memtest86+')
-rw-r--r--abs/core/grub/20_memtest86+29
1 files changed, 29 insertions, 0 deletions
diff --git a/abs/core/grub/20_memtest86+ b/abs/core/grub/20_memtest86+
new file mode 100644
index 0000000..1d3096f
--- /dev/null
+++ b/abs/core/grub/20_memtest86+
@@ -0,0 +1,29 @@
+#! /bin/sh -e
+########################################################
+# This script generates a memtest86+ entry on grub.cfg #
+# if memtest is installed on the system. #
+########################################################
+
+prefix="/usr"
+exec_prefix="${prefix}"
+
+datarootdir="/usr/share"
+datadir="${datarootdir}"
+
+. "${datadir}/grub/grub-mkconfig_lib"
+
+MEMTEST86_IMAGE="/boot/memtest86+/memtest.bin"
+CLASS="--class memtest86 --class gnu --class tool"
+
+if [ -e $MEMTEST86_IMAGE ] && is_path_readable_by_grub $MEMTEST86_IMAGE; then
+ # image exists, create menu entry
+ echo "Found memtest86+ image: $MEMTEST86_IMAGE" >&2
+ cat << EOF
+menuentry "Memory test (memtest86+)" $CLASS {
+EOF
+ prepare_grub_to_access_device `${grub_probe} --target=device $MEMTEST86_IMAGE` | sed -e "s/^/ /"
+ cat << EOF
+ linux16 (\$root)`make_system_path_relative_to_its_root $MEMTEST86_IMAGE`
+}
+EOF
+fi