]> git.ipfire.org Git - thirdparty/grub.git/commit
util/grub.d/30_os-prober.in: Fix GRUB_OS_PROBER_SKIP_LIST for non-EFI
authorPascal Hambourg <pascal@plouf.fr.eu.org>
Fri, 21 Feb 2025 11:20:28 +0000 (12:20 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Wed, 26 Feb 2025 19:44:36 +0000 (20:44 +0100)
commit56ccc5ed569869fd735074ccebeaa7aab058342d
tree78a62025f83edc675b1d586397513bd7abb47dad
parent01f064064c3146bd82e0c8db0da11d286bca31c6
util/grub.d/30_os-prober.in: Fix GRUB_OS_PROBER_SKIP_LIST for non-EFI

GRUB documentation states:

  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>

But the actual behaviour does not match this description.

  GRUB_OS_PROBER_SKIP_LIST="<UUID>"

does nothing. In order to skip non-EFI bootloaders, you must set

  GRUB_OS_PROBER_SKIP_LIST="<UUID>@<DEVICE>"

which is both absurd, <UUID> and <DEVICE> are redundant, and wrong,
<DEVICE> such as /dev/sd* may not be persistent across boots.

Also, any non-word character is accepted as a separator, including "-"
and "@" which may be present in UUIDs. This can cause false positives
because of partial UUID match.

This patch fixes these flaws while retaining some backward compatibility
with previous behaviour which may be expected by existing setups:
  - also accept <UUID>@/dev/* (with warning) for non-EFI bootloaders,
  - also accept comma and semicolon as separator.

Fixes: 55e706c9 (Add GRUB_OS_PROBER_SKIP_LIST to selectively skipping systems)
Signed-off-by: Pascal Hambourg <pascal@plouf.fr.eu.org>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
docs/grub.texi
util/grub.d/30_os-prober.in