#995063 os-prober fails to detect partition when the device name is a substring of another device

Package:
os-prober
Source:
os-prober
Description:
utility to detect other OSes on a set of drives
Submitter:
Mike
Date:
2021-09-25 14:48:03 UTC
Severity:
important
Tags:
#995063#5
Date:
2021-09-25 14:36:12 UTC
From:
To:
Dear Maintainer,

My system has another linux install located on /dev/sde1, which os-prober should detect
There is also a /dev/sde127 which is part of a raid array

In this case, os-prober line 141 incorrectly believes that /dev/sde1 is part of a raid array, because
grep -q "^/dev/sde1" $OS_PROBER_TMP/raided-map
returns true as it matches the /dev/sde127 line.

This can be fixed by changing the line to read
 if grep -q "^$mapped\$" "$OS_PROBER_TMP/raided-map" ; then

Thanks