1 From b1ff1336667cb0ab0abe679d9e38f3e3b5b48e2f Mon Sep 17 00:00:00 2001
2 From: Colin Watson <cjwatson@ubuntu.com>
3 Date: Mon, 13 Jan 2014 12:13:24 +0000
4 Subject: Skip Windows os-prober entries on Wubi systems
6 Since we're already being booted from the Windows boot loader, including
7 entries that take us back to it mostly just causes confusion, and stops
8 us from being able to hide the menu if there are no other OSes
11 https://blueprints.launchpad.net/ubuntu/+spec/foundations-o-wubi
14 Last-Update: 2013-11-26
16 Patch-Name: wubi_no_windows.patch
18 util/grub.d/30_os-prober.in | 19 +++++++++++++++++++
19 1 file changed, 19 insertions(+)
21 diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
22 index b7e1147c4..271044f59 100644
23 --- a/util/grub.d/30_os-prober.in
24 +++ b/util/grub.d/30_os-prober.in
25 @@ -110,6 +110,8 @@ EOF
27 used_osprober_linux_ids=
31 for OS in ${OSPROBED} ; do
32 DEVICE="`echo ${OS} | cut -d ':' -f 1`"
33 LONGNAME="`echo ${OS} | cut -d ':' -f 2 | tr '^' ' '`"
34 @@ -146,6 +148,23 @@ for OS in ${OSPROBED} ; do
40 + if [ -z "$wubi" ]; then
41 + if [ -x /usr/share/lupin-support/grub-mkimage ] && \
42 + /usr/share/lupin-support/grub-mkimage --test; then
48 + if [ "$wubi" = yes ]; then
49 + echo "Skipping ${LONGNAME} on Wubi system" >&2
55 onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
57 menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' $CLASS --class os \$menuentry_id_option 'osprober-chain-$(grub_get_device_id "${DEVICE}")' {