diff options
author | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2011-02-12 13:01:00 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2011-02-12 13:01:00 -0300 |
commit | 1a47fcae076047932614b9c19fb49f5f8c9791bb (patch) | |
tree | 19a8770d7170f435ec56e9c98505becc8271e24e /libre-testing/grub2/20_memtest86+ | |
parent | 18019242c4e527f7140f92336061562b8cfb50fb (diff) | |
parent | e9447f47dcf11be3dc905e72374b0e4298a4c112 (diff) |
Merge branch 'master' of ssh://vparabola/srv/git/projects/abslibre
Diffstat (limited to 'libre-testing/grub2/20_memtest86+')
-rw-r--r-- | libre-testing/grub2/20_memtest86+ | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/libre-testing/grub2/20_memtest86+ b/libre-testing/grub2/20_memtest86+ new file mode 100644 index 000000000..41ca11f02 --- /dev/null +++ b/libre-testing/grub2/20_memtest86+ @@ -0,0 +1,27 @@ +#! /bin/sh -e +######################################################## +# This script generates a memtest86+ entry on grub.cfg # +# if memtest is installed on the system. # +######################################################## + +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib + +. ${libdir}/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 |