On Wed, Sep 15, 2010, antoine beaupre wrote:
> So this is still happening in 1.39, which is fairly disappointing. It
> seems that os-prober relies on a linux-specific sysfs in line 29:
That would explain why os-prober's so useless under kfreebsd; but
there's more to it. When os-prober running on GNU/Linux tries to
detect a GNU/kFreeBSD partition it still doesn't achieve anything.
I've just set up a new dual-Debian-OS machine, and on this occasion
I've had enough spare time to do some more searching through
shellscripts, so here's some extra information.
On kfreebsd-i386:
• os-prober fails to detect Linux from FreeBSD.
These days as soon as /usr/bin/os-prober's partition-finding routine
discovers that [ $(uname -s) != Linux ] it just silently exits (though
not before it's returned a couple of errors). Doesn't this make the
os-prober_1.42_kfreebsd-{amd64,i386} packages somewhat pointless?
On i386:
• os-prober can't see a Debian GNU/kFreeBSD install on an unmounted
UFS2 partition (as created by debian-installer).
This is because the filesystem has too many variants; os-prober just
asks for "ufs", and mount automatically defaults to "ufstype=old". I
don't see any solution for this...
On i386:
• os-prober misidentifies a Debian GNU/kFreeBSD install on a mounted
UFS2 partition as Debian GNU/Linux. It can recognise the release
number, but not the OS!
This is because /usr/lib/os-probes/mounted/90linux-distro believes
anything with files matching /lib*/ld*.so* and /etc/debian_version
must therefore be Debian GNU/Linux. I could probably produce some
sort of hacky fix for that, but it can't live in 90linux-distro as a
special case for Debian, because that script always outputs a result
including the word "linux" if it finds anything. The tidy-seeming
alternative would be to put it in the script that handles BSD probes,
except that there's no such script...
(By the way, why are these shellscripts split off from the ones under
/usr/share/os-prober and - even more bafflingly - from the ones under
/usr/lib/os-prober? Instead they're all sitting in a subdirectory of
/usr/lib/os-probes...)
On all arches:
• os-prober has no effect on the grub.cfg generated by update-grub.
This is unsurprising because /etc/grub.d/30_os-prober is told it's
Linux, and therefore runs linux-boot-prober on it (which gives up when
it can't see a vmlinuz). If I hacked together some sort of
/usr/lib/os-probes/mounted/85debiangnukfreebsd-specialcase, it would
instead correctly fall through to a message about this OS not yet
being supported by grub-mkconfig. I can see why people might not be
making this a high priority.
On all arches:
• os-prober's documentation consists of the package name and
description and nothing else. Still, at least it's a good name.
The long description should at least name the supported operating
systems so that sysadmins can tell whether there's any point keeping
it installed.
--
JBR
Ankh kak! (Ancient Egyptian blessing)