Public bug reported:
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.
** Affects: os-prober (Ubuntu)
Importance: Undecided
Status: New
** Patch added: "os-prober-btrfs-subvol.patch"
https://bugs.launchpad.net/bugs/2147288/+attachment/5958705/+files/os-prober-btrfs-subvol.patch
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2147288
Title:
os-prober fails to detect Linux distributions on Btrfs subvolumes
(e.g. Fedora /root)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/os-prober/+bug/2147288/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs