[Bug 2147288] Re: os-prober fails to detect Linux distributions on Btrfs subvolumes (e.g. Fedora /root)
Serhii Cherneha
2147288 at bugs.launchpad.net
Sun Apr 5 08:03:10 UTC 2026
This is a new script that adds support for the modern BLS (Boot Loader
Specification) standard. It ensures that GRUB shows correct system names
and kernel versions (matching Fedora's native menu) and adds all
necessary boot options automatically.
** Attachment added: "linux-boot-prober-bls-support.sh"
https://bugs.launchpad.net/ubuntu/+source/os-prober/+bug/2147288/+attachment/5958710/+files/linux-boot-prober-bls-support.sh
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to os-prober in Ubuntu.
https://bugs.launchpad.net/bugs/2147288
Title:
os-prober fails to detect Linux distributions on Btrfs subvolumes
(e.g. Fedora /root)
Status in os-prober package in Ubuntu:
New
Bug description:
1) The release of Ubuntu you are using:
Ubuntu 24.04.4 LTS (Noble)
2) The version of the package you are using:
os-prober 1.81ubuntu4
3) What you expected to happen:
When running `sudo os-prober` or `sudo update-grub`, other Linux distributions installed on Btrfs partitions (like Fedora) should be automatically detected and added to the GRUB menu.
4) What happened instead:
os-prober fails to detect Linux installations when the root filesystem is located within a Btrfs subvolume (e.g., the "root" subvolume used by Fedora default installs). It only detects the partition but fails to identify the OS because it only checks the top-level directory of the partition's mount point.
Bug Description:
The issue is located in the /usr/lib/os-probes/mounted/90linux-distro script. When os-prober mounts a Btrfs partition via grub-mount, it only looks for /etc/os-release and other distribution identifiers in the root of the mount point. However, many distributions (Fedora, openSUSE, etc.) place their root filesystem inside a subvolume (like /root, /@, or /@rootfs).
As a result, os-prober doesn't see the /etc/os-release file and
ignores the partition, leaving the user with no boot entry for the
other OS.
Steps to reproduce:
1. Install Fedora on a disk using default Btrfs partitioning (which creates a "root" subvolume for /).
2. Boot into Ubuntu.
3. Run `sudo os-prober`. Fedora is not listed in the output.
I have attached a patch that adds a fallback check for common Btrfs
subvolume names to 90linux-distro. This fix has been tested and
successfully detects Fedora 43.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/os-prober/+bug/2147288/+subscriptions
More information about the foundations-bugs
mailing list