diff options
author | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-06-29 11:51:20 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-06-29 11:51:20 -0300 |
commit | c368f5d06f0242275c55bac695d4e89f17e3e908 (patch) | |
tree | a5f616aa128c174cf4c71e2930d2efeb7e4e76a2 /libre-testing/grub/20_memtest86+ | |
parent | 64ac32351268a93f44782b6279ce07f4b0685c59 (diff) | |
parent | 50aa5b5bd92fbf10494cbce145f4e7b19ce36daf (diff) |
Merge branch 'master' of ssh://gparabola/srv/git/abslibre-mips64el
Diffstat (limited to 'libre-testing/grub/20_memtest86+')
-rw-r--r-- | libre-testing/grub/20_memtest86+ | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/libre-testing/grub/20_memtest86+ b/libre-testing/grub/20_memtest86+ new file mode 100644 index 000000000..1d3096f6b --- /dev/null +++ b/libre-testing/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 |