]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* util/grub.d/30_os-prober.in: Add GRUB_OS_PROBER_SKIP_LIST to
authorAxel Kellermann <axel.kellermann@gmx.de>
Tue, 19 Nov 2013 22:39:51 +0000 (23:39 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Tue, 19 Nov 2013 22:39:51 +0000 (23:39 +0100)
selectively skipping systems.

ChangeLog
docs/grub.texi
util/grub-mkconfig.in
util/grub.d/30_os-prober.in

index 169af17eed34b2675e63fd234f099acd54b15ab3..6aeb177dcaececf3fc8bdddef7611884ddab46f0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-11-19  Axel Kellermann <axel.kellermann@gmx.de>
+
+       * util/grub.d/30_os-prober.in: Add GRUB_OS_PROBER_SKIP_LIST to
+       selectively skipping systems.
+
 2013-11-19  Colin Watson  <cjwatson@ubuntu.com>
 
        * Makefile.util.def (grub-mkimage): Add
index de72d0cce85c4c9affdfa68962f44bebde1d0f5d..6aee292f0b52bc937e1988fba90fd3c13b81edf8 100644 (file)
@@ -1451,6 +1451,10 @@ Normally, @command{grub-mkconfig} will try to use the external
 systems installed on the same system and generate appropriate menu entries
 for them.  Set this option to @samp{true} to disable this.
 
+@item GRUB_OS_PROBER_SKIP_LIST
+List of space-separated FS UUIDs of filesystems to be ignored from os-prober
+output. For efi chainloaders it's <UUID>@@<EFI FILE>
+
 @item GRUB_DISABLE_SUBMENU
 Normally, @command{grub-mkconfig} will generate top level menu entry for
 the kernel with highest version number and put all other found kernels
index db58ab93077445280dc7eed29bcd912c92ee7981..3413bbc5ff5df7f2932a25325a434f8458601af6 100644 (file)
@@ -216,6 +216,7 @@ export GRUB_DEFAULT \
   GRUB_SAVEDEFAULT \
   GRUB_ENABLE_CRYPTODISK \
   GRUB_BADRAM \
+  GRUB_OS_PROBER_SKIP_LIST \
   GRUB_DISABLE_SUBMENU
 
 if test "x${grub_cfg}" != "x"; then
index 502faeaa8bc2adbffc7d9e70203186e5f7e94eec..3d1b9389352b3d6e93129298a44ff17c16113f03 100644 (file)
@@ -112,6 +112,18 @@ for OS in ${OSPROBED} ; do
   LONGNAME="`echo ${OS} | cut -d ':' -f 2 | tr '^' ' '`"
   LABEL="`echo ${OS} | cut -d ':' -f 3 | tr '^' ' '`"
   BOOT="`echo ${OS} | cut -d ':' -f 4`"
+  UUID="`grub-probe --target=fs_uuid --device ${DEVICE%@*}`"
+  EXPUUID="$UUID"
+
+  if [ x"${DEVICE#*@}" != x ] ; then
+      EXPUUID="${EXPUUID}@${DEVICE#*@}"
+  fi
+
+  if [ "x${GRUB_OS_PROBER_SKIP_LIST}" != "x" -a "x`echo ${GRUB_OS_PROBER_SKIP_LIST} | grep -i -e '\b'${EXPUUID}'\b'`" != "x" ] ; then
+    echo "Skipped ${LONGNAME} on ${DEVICE} by user request." >&2
+    continue
+  fi
+
   BTRFS="`echo ${OS} | cut -d ':' -f 5`"
   if [ "x$BTRFS" = "xbtrfs" ]; then
        BTRFSuuid="`echo ${OS} | cut -d ':' -f 6`"
@@ -265,7 +277,7 @@ EOF
       echo "$title_correction_code"
     ;;
     macosx)
-      OSXUUID="`${grub_probe} --target=fs_uuid --device ${DEVICE} 2> /dev/null`"
+      OSXUUID="${UUID}"
       osx_entry xnu_kernel 32
       osx_entry xnu_kernel64 64
     ;;