updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / grub2-bios-bzr / 20_memtest86+
blob41ca11f02bc823eeec8de021c684a9fcdf0259ad
1 #! /bin/sh -e
2 ########################################################
3 # This script generates a memtest86+ entry on grub.cfg #
4 # if memtest is installed on the system. #
5 ########################################################
7 prefix=/usr
8 exec_prefix=${prefix}
9 libdir=${exec_prefix}/lib
11 . ${libdir}/grub/grub-mkconfig_lib
13 MEMTEST86_IMAGE="/boot/memtest86+/memtest.bin"
14 CLASS="--class memtest86 --class gnu --class tool"
16 if [ -e $MEMTEST86_IMAGE ] && is_path_readable_by_grub $MEMTEST86_IMAGE; then
17 # image exists, create menu entry
18 echo "Found memtest86+ image: $MEMTEST86_IMAGE" >&2
19 cat << EOF
20 menuentry "Memory test (memtest86+)" $CLASS {
21 EOF
22 prepare_grub_to_access_device `${grub_probe} --target=device $MEMTEST86_IMAGE` | sed -e "s/^/ /"
23 cat << EOF
24 linux16 (\$root)`make_system_path_relative_to_its_root $MEMTEST86_IMAGE`
26 EOF