|
|
d41074 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
a85e8e |
From: Colin Watson <cjwatson@ubuntu.com>
|
|
|
a85e8e |
Date: Thu, 10 Apr 2014 16:54:33 +0100
|
|
|
d41074 |
Subject: [PATCH] Tolerate devices with no filesystem UUID returned by
|
|
|
a85e8e |
os-prober
|
|
|
a85e8e |
|
|
|
a85e8e |
* util/grub.d/30_os-prober.in: Tolerate devices with no filesystem
|
|
|
a85e8e |
UUID. Other parts of grub-mkconfig tolerate these, they were
|
|
|
a85e8e |
previously allowed here up to commit
|
|
|
a85e8e |
55e706c918922def17f5012c23cfe88c4c645208, and they can arise in
|
|
|
a85e8e |
practice when the system has active LVM snapshots.
|
|
|
a85e8e |
Fixes Ubuntu bug #1287436.
|
|
|
a85e8e |
---
|
|
|
a85e8e |
ChangeLog | 9 +++++++++
|
|
|
a85e8e |
util/grub.d/30_os-prober.in | 23 +++++++++++++----------
|
|
|
a85e8e |
2 files changed, 22 insertions(+), 10 deletions(-)
|
|
|
a85e8e |
|
|
|
a85e8e |
diff --git a/ChangeLog b/ChangeLog
|
|
|
d41074 |
index 7f0c57dc0ae..35564681a4d 100644
|
|
|
a85e8e |
--- a/ChangeLog
|
|
|
a85e8e |
+++ b/ChangeLog
|
|
|
d41074 |
@@ -1,3 +1,12 @@
|
|
|
d41074 |
+2014-04-10 Colin Watson <cjwatson@ubuntu.com>
|
|
|
d41074 |
+
|
|
|
a85e8e |
+ * util/grub.d/30_os-prober.in: Tolerate devices with no filesystem
|
|
|
a85e8e |
+ UUID. Other parts of grub-mkconfig tolerate these, they were
|
|
|
a85e8e |
+ previously allowed here up to commit
|
|
|
a85e8e |
+ 55e706c918922def17f5012c23cfe88c4c645208, and they can arise in
|
|
|
a85e8e |
+ practice when the system has active LVM snapshots.
|
|
|
a85e8e |
+ Fixes Ubuntu bug #1287436.
|
|
|
a85e8e |
+
|
|
|
d41074 |
2014-04-10 Colin Watson <cjwatson@ubuntu.com>
|
|
|
a85e8e |
|
|
|
d41074 |
* grub-core/disk/lvm.c (grub_lvm_detect): Search for
|
|
|
a85e8e |
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
|
|
|
d41074 |
index 7cf8487d63a..6f38c82a554 100644
|
|
|
a85e8e |
--- a/util/grub.d/30_os-prober.in
|
|
|
a85e8e |
+++ b/util/grub.d/30_os-prober.in
|
|
|
a85e8e |
@@ -112,16 +112,17 @@ for OS in ${OSPROBED} ; do
|
|
|
a85e8e |
LONGNAME="`echo ${OS} | cut -d ':' -f 2 | tr '^' ' '`"
|
|
|
a85e8e |
LABEL="`echo ${OS} | cut -d ':' -f 3 | tr '^' ' '`"
|
|
|
a85e8e |
BOOT="`echo ${OS} | cut -d ':' -f 4`"
|
|
|
a85e8e |
- UUID="`${grub_probe} --target=fs_uuid --device ${DEVICE%@*}`"
|
|
|
a85e8e |
- EXPUUID="$UUID"
|
|
|
a85e8e |
+ if UUID="`${grub_probe} --target=fs_uuid --device ${DEVICE%@*}`"; then
|
|
|
a85e8e |
+ EXPUUID="$UUID"
|
|
|
a85e8e |
|
|
|
a85e8e |
- if [ x"${DEVICE#*@}" != x ] ; then
|
|
|
a85e8e |
+ if [ x"${DEVICE#*@}" != x ] ; then
|
|
|
a85e8e |
EXPUUID="${EXPUUID}@${DEVICE#*@}"
|
|
|
a85e8e |
- fi
|
|
|
a85e8e |
+ fi
|
|
|
a85e8e |
|
|
|
a85e8e |
- if [ "x${GRUB_OS_PROBER_SKIP_LIST}" != "x" ] && [ "x`echo ${GRUB_OS_PROBER_SKIP_LIST} | grep -i -e '\b'${EXPUUID}'\b'`" != "x" ] ; then
|
|
|
a85e8e |
- echo "Skipped ${LONGNAME} on ${DEVICE} by user request." >&2
|
|
|
a85e8e |
- continue
|
|
|
a85e8e |
+ if [ "x${GRUB_OS_PROBER_SKIP_LIST}" != "x" ] && [ "x`echo ${GRUB_OS_PROBER_SKIP_LIST} | grep -i -e '\b'${EXPUUID}'\b'`" != "x" ] ; then
|
|
|
a85e8e |
+ echo "Skipped ${LONGNAME} on ${DEVICE} by user request." >&2
|
|
|
a85e8e |
+ continue
|
|
|
a85e8e |
+ fi
|
|
|
a85e8e |
fi
|
|
|
a85e8e |
|
|
|
a85e8e |
BTRFS="`echo ${OS} | cut -d ':' -f 5`"
|
|
|
a85e8e |
@@ -277,9 +278,11 @@ EOF
|
|
|
a85e8e |
echo "$title_correction_code"
|
|
|
a85e8e |
;;
|
|
|
a85e8e |
macosx)
|
|
|
a85e8e |
- OSXUUID="${UUID}"
|
|
|
a85e8e |
- osx_entry xnu_kernel 32
|
|
|
a85e8e |
- osx_entry xnu_kernel64 64
|
|
|
a85e8e |
+ if [ "${UUID}" ]; then
|
|
|
a85e8e |
+ OSXUUID="${UUID}"
|
|
|
a85e8e |
+ osx_entry xnu_kernel 32
|
|
|
a85e8e |
+ osx_entry xnu_kernel64 64
|
|
|
a85e8e |
+ fi
|
|
|
a85e8e |
;;
|
|
|
a85e8e |
hurd)
|
|
|
a85e8e |
onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
|