os-prober doesn't detect EFI boot partitions on mdraid devices in dual boot

Bug #1926925 reported by Adam Wilczek on 2021-05-02
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-prober (Ubuntu)

Bug Description

Ubuntu Version:
Description: Ubuntu 20.04.2 LTS
Release: 20.04

Package Version:
  Installed: 1.74ubuntu2
  Candidate: 1.74ubuntu2
  Version table:
 *** 1.74ubuntu2 500
        500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
        100 /var/lib/dpkg/status

Given the following setup:
Given a configuration with boot partition on non bios raid drive, and Another OS with its own boot partition (such as Windows) on bios raid drive. User is desiring to chainload the other os from grub.

What should happen:
OS Prober detects Other OS's boot partition (such as windows) and forward the correct EFI file to grub during configuration. Grub now knows about the other OS and will show up in menu to be chainloaded.

What happens:
os-prober skips the mounted boot partition on the bios raid device because it gets caught by the "Is this a virtual device" check on line 32 of /usr/lib/os-probes/mounted/05efi. Grub is not configured for the other OS with a boot partition on bios raid. Grub doesn't know about the other os requiring manual configuration to add EFI files to grub.

Due to the restrictive conditional in /usr/lib/os-probes/mounted/05efi line 32 any mdraid device such as an intel soft raid are not processed by os-prober for other OS's that support boot partitions on bios raid (such as windows). This means in dual boot scenarios where grub is not installed on the bios raid but is used to chainload an os on the bios raid, the Other OS won't be detected or present without manual configuration. As mdadm has supported assembling most bios raids for some time and is loadable as a grub module, os-prober should support probing for other OS's in this situation. While this is an edge case, it is a very easy to believe to be supported edge case and should require minimal modification to fix as intel bios raids have an easily grep-able identifier in the udevadm info output. As far as I can tell mdadm will always use the container 'MD_CONTAINER=/dev/md/imsm*' where star is the identifier number (eg. 0) which should be easily detectable and allow detection of it as a "regular" drive and not virtual. I've attached a patch for another easy way it can be done by just grepping for /dev/md*p* that could allow for different types of raids but potentially have other draw backs on very edge case setups.

The attachment "potential fix for allowing os-prober to detect other os's on bios raid drives loaded by mdadm." seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
tags: added: rls-ff-incoming
tags: added: rls-ff-notfixing
removed: rls-ff-incoming
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers