X-Debbugs-CC: debian-h...@lists.debian.org --- os-prober | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/os-prober b/os-prober index d67f0b3..67e8b52 100755 --- a/os-prober +++ b/os-prober @@ -48,13 +48,23 @@ partitions () { done done fi - elif [ "$(uname -s)" = Linux ]; then - echo "Cannot find list of partitions! (Try mounting /sys.)" >&2 - exit 1 else - # We don't know how to probe OSes on non-Linux kernels. For - # now, just don't get in the way. - exit 0 + os_name="$(uname -s)" + if [ "$os_name" = GNU ]; then + for part in /dev/sd*s*[0-9]; do + echo "Trying $part" >&2 + if [ -s "$part" ]; then + echo "$part" + fi + done + elif [ "$os_name" = Linux ]; then + echo "Cannot find list of partitions! (Try mounting /sys.)" >&2 + exit 1 + else + # We don't know how to probe OSes on non-Linux and non-GNU kernels. + # For now, just don't get in the way. + exit 0 + fi fi # Also detect OSes on LVM volumes (assumes LVM is active) -- 2.5.1