Package: memtest86+
Version: 4.00-2
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu karmic ubuntu-patch
*** /tmp/tmpDwM5tm
In Ubuntu, we've applied the attached patch to achieve the following:
* Don't emit grub2 menu items if /boot is on a loop-mounted device (e.g.
Wubi; LP: #435153).
* Cache results of prepare_grub_to_access_device to speed up update-grub
runs a little.
We thought you might be interested in doing the same.
-- System Information:
Debian Release: squeeze/sid
APT prefers karmic-security
APT policy: (990, 'karmic-security'), (900, 'karmic-updates'), (500,
'karmic-backports'), (500, 'karmic'), (400, 'karmic-proposed')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.31-19-generic (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -u memtest86+-4.00/debian/grub memtest86+-4.00/debian/grub
--- memtest86+-4.00/debian/grub
+++ memtest86+-4.00/debian/grub
@@ -9,19 +9,27 @@
. /usr/lib/grub/grub-mkconfig_lib
+# We can't cope with loop-mounted devices here.
+case ${GRUB_DEVICE_BOOT} in
+ /dev/loop/*|/dev/loop[0-9])
+ exit 0
+ ;;
+esac
+
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
- prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
+ prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
+ printf '%s\n' "${prepare_boot_cache}"
cat << EOF
linux16 $MEMTESTPATH
}
menuentry "Memory test (memtest86+, serial console 115200)" {
EOF
- prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
+ printf '%s\n' "${prepare_boot_cache}"
cat << EOF
linux16 $MEMTESTPATH console=ttyS0,115200n8
}
diff -u memtest86+-4.00/debian/changelog memtest86+-4.00/debian/changelog