os-prober fails to recognize linux installations with crypted root partition

Bug #530252 reported by Josef Wolf
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
os-prober (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Binary package hint: os-prober

On Karmic, os-prober fails to recognize linux installations with LUKS crypted root partition (which is pretty common on laptops nowadays).

linux-boot-prober at least finds partitions when they are luksOpen'ed, but /usr/lib/os-probes-mounted/90linux-distro doesn't even try to look at /dev/mapper partitions or to use linux-boot-prober.

ProblemType: Bug
Architecture: i386
Date: Mon Mar 1 19:58:15 2010
DistroRelease: Ubuntu 9.10
Package: os-prober 1.35
ProcEnviron:
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-19.56-generic
SourcePackage: os-prober
Uname: Linux 2.6.31-19-generic i686

Related branches

Revision history for this message
Josef Wolf (jw-raven) wrote :
Revision history for this message
Nathaniel Griswold (nwg) wrote (last edit ):

This is still a problem for me on jammy jellyfish.

I found an older debian bug #801769 which addresses the issue not by modifying the mounted check (now in /lib/os-probes/50mounted-tests) but by simply adding entries from /dev/mapper/* to to the partitions() list in the main os-prober script.

The attached patch (attached both to the debian bug report and here) worked for me on jammy. It requires luks partitions to be unlocked but not mounted.

Revision history for this message
Nathaniel Griswold (nwg) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in os-prober (Ubuntu):
status: New → Confirmed
Nick Rosbrook (enr0n)
tags: added: rls-jj-incoming
Revision history for this message
Julian Andres Klode (juliank) wrote :

Untagging this, the patch could land via patch pilot, but this is not really a high priority item.

tags: removed: rls-jj-incoming
Revision history for this message
Robie Basak (racb) wrote :

@Nathaniel

Thank you for the merge proposal! Asking here in the bug since I think my question is more general.

Please could you explain your use case? In reviewing your merge proposal I'm missing that context which makes it difficult for me to verify the correctness of your code.

os-prober is used by the installer, and when the installer runs, we wouldn't expect the user to have any existing LUKS partitions unlocked, right? So under what exact circumstances do you expect this change be useful to users please?

Revision history for this message
Julian Andres Klode (juliank) wrote :

So the context you miss is that os-prober runs each time update-grub runs on the system still.

The use case here is a highly unusual setup where another OS is directly installed to a LUKS partition instead of using LVM on top of LUKS, and one needs to balance whether this is a feature we care about as Ubuntu specifically or not, or whether this would be better addressed upstream.

Revision history for this message
Robie Basak (racb) wrote :

Ah. Thanks!

In that case, I think this kind of feature should be added upstream, and isn't something that it's appropriate for Ubuntu to maintain a delta for indefinitely.

@Nathaniel thank you for the contribution but we are unable to take this directly into Ubuntu for this reason. I'll set the bug task for Ubuntu to Won't Fix and will reject the merge proposal. However, you could consider submitting this to Debian. If they take it, then a future Ubuntu release will support this case by default.

Changed in os-prober (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Josef Wolf (jw-raven) wrote :

This patch only partially fixes the problem. While it finds installations on crypted volumes and generates grub menus for them, those menus are mal-formed because of an other bug in linux-boot-prober.

Do you have a pointer to the upstream repository?

Revision history for this message
Josef Wolf (jw-raven) wrote :

Here's the bug in linux-boot-prober: https://github.com/MaddieM4/os-prober/issues/10

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.