* util/grub.d/30_os-prober.in: Add GRUB_OS_PROBER_SKIP_LIST to

selectively skipping systems.
This commit is contained in:
Axel Kellermann 2013-11-19 23:39:51 +01:00 committed by Vladimir Serbinenko
parent 4e7d433dfb
commit 55e706c918
4 changed files with 23 additions and 1 deletions

View File

@ -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

View 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

View 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

View 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
;;