2010-02-18 07:56:34 +01:00
|
|
|
#! /bin/sh
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# older versions of grub2 do not have this yet (LP: #459080)
|
2013-06-10 09:08:40 +02:00
|
|
|
if [ ! -e /usr/share/grub/grub-mkconfig_lib ]; then
|
2010-02-18 07:56:34 +01:00
|
|
|
echo "no grub-mkconfig_lib, exiting"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2013-06-10 09:08:40 +02:00
|
|
|
. /usr/share/grub/grub-mkconfig_lib
|
2010-02-18 07:56:34 +01:00
|
|
|
|
2012-02-23 09:29:23 +01:00
|
|
|
if test -e /boot/memtest86+ ; then
|
|
|
|
MEMTESTPATH=$( make_system_path_relative_to_its_root "/boot/memtest86+" )
|
2010-02-18 07:56:34 +01:00
|
|
|
echo "Found memtest86+ image: $MEMTESTPATH" >&2
|
|
|
|
cat << EOF
|
|
|
|
menuentry "Memory test (memtest86+)" {
|
|
|
|
EOF
|
|
|
|
prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
|
|
|
|
cat << EOF
|
|
|
|
linux16 $MEMTESTPATH
|
|
|
|
}
|
|
|
|
menuentry "Memory test (memtest86+, serial console 115200)" {
|
|
|
|
EOF
|
|
|
|
prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
|
|
|
|
cat << EOF
|
|
|
|
linux16 $MEMTESTPATH console=ttyS0,115200n8
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
fi
|