]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - memtest86+/memtest86+.grub
pdns: Update to version 3.4.7
[people/amarx/ipfire-3.x.git] / memtest86+ / memtest86+.grub
CommitLineData
435aa863
MT
1#!/bin/sh
2set -e
3
4# older versions of grub2 do not have this yet (LP: #459080)
5if [ ! -e /usr/lib/grub/grub-mkconfig_lib ]; then
6 echo "no grub-mkconfig_lib, exiting"
7 exit 0
8fi
9
10. /usr/lib/grub/grub-mkconfig_lib
11
12# We can't cope with loop-mounted devices here.
13case ${GRUB_DEVICE_BOOT} in
14 /dev/loop/*|/dev/loop[0-9])
15 exit 0
16 ;;
17esac
18
19if test -e /boot/memtest86+; then
20 MEMTESTPATH=$( make_system_path_relative_to_its_root "/boot/memtest86+" )
21 echo "Found memtest86+ image: $MEMTESTPATH" >&2
22 cat << EOF
23menuentry "Memory test (memtest86+)" {
24EOF
25 prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
26 printf '%s\n' "${prepare_boot_cache}"
27 cat << EOF
28 linux16 $MEMTESTPATH
29}
30menuentry "Memory test (memtest86+, serial console 115200)" {
31EOF
32 printf '%s\n' "${prepare_boot_cache}"
33 cat << EOF
34 linux16 $MEMTESTPATH console=ttyS0,115200n8
35}
36EOF
37fi