memtest86Plus/memtest86+-grub
Silvan Calarco f9d6b9416f added grub.d file and run update-grub
switch to prebuilt binary [release 5.01-3mamba;Tue Feb 07 2017]
2024-01-06 07:04:58 +01:00

37 lines
822 B
Bash

#!/bin/sh
set -e
prefix="/usr"
exec_prefix="/usr"
datarootdir="${prefix}/share"
. "/usr/share/grub/grub-mkconfig_lib"
LX=linux16
# We can't cope with loop-mounted devices here.
case ${GRUB_DEVICE_BOOT} in
/dev/loop/*|/dev/loop[0-9]) exit 0 ;;
esac
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
if test -e /boot/memtest86+.bin ; then
MEMTESTPATH=$( make_system_path_relative_to_its_root "/boot/memtest86+.bin" )
echo "Found memtest86+ image: $MEMTESTPATH" >&2
cat << EOF
menuentry "Memory test (memtest86+)" {
EOF
printf '%s\n' "${prepare_boot_cache}"
cat << EOF
$LX $MEMTESTPATH
}
menuentry "Memory test (memtest86+, serial console 115200)" {
EOF
printf '%s\n' "${prepare_boot_cache}"
cat << EOF
$LX $MEMTESTPATH console=ttyS0,115200n8
}
EOF
fi