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