Package: os-prober Version: 1.56 Followup-For: Bug #685159 The bug is caused by using GRUB's internal filesystems through FUSE which doesn't support symlinks (at least not on ext4). This filesystem is only used when the volume is not already mounted, therefore this bug does not appear when the volume is previously mounted using a real filesystem that properly supports symlinks.
The specific problem is in 90linux-distro, which checks for lib*/ld*.so* in the target filesystem as a heuristic to recognize Linux root filesystems. With broken symlinks this fails for distributions that moved lib* to /usr and only left symlinks in place. Attached patch fixes this by also checking for usr/lib*/ld*.so*.
Index: os-prober-1.56/os-probes/mounted/common/90linux-distro =================================================================== --- os-prober-1.56.orig/os-probes/mounted/common/90linux-distro 2011-07-23 10:19:40.000000000 +0200 +++ os-prober-1.56/os-probes/mounted/common/90linux-distro 2012-11-23 02:15:50.800011728 +0100 @@ -12,8 +12,12 @@ # fact that only some architectures have ld-linux.so, I can't see anything # better. Make sure this test has a high number so that more accurate tests # can come first. +# Unless volumes to checked are already mounted, they will be mounted using +# GRUB's own filesystems through FUSE. Since these ATM doesn't support +# symlinks we need to also check in $dir/usr/lib* for distributions that +# moved /lib* to /usr and only left symlinks behind. # TODO: look for ld-linux.so on arches that have it -if ls "$dir"/lib*/ld*.so* >/dev/null 2>/dev/null; then +if (ls "$dir"/lib*/ld*.so* || ls "$dir"/usr/lib*/ld*.so*) >/dev/null 2>/dev/null; then if [ -e "$dir/etc/debian_version" ]; then short="Debian" long="$(printf "Debian GNU/Linux (%s)\n" "$(cat "$dir/etc/debian_version")")"