Bug#666552: [grub-common] Bad GRUB / os-prober integration: Other operating systems removed from GRUB's list when os-prober is removed, duplicate menu entries

Filipus Klutiero chealer at gmail.com
Sat Mar 31 17:04:05 UTC 2012


Package: grub-common, os-prober, grub-installer
Version: 1.99-17
Severity: important
X-Debbugs-Cc: 650414 at bugs.debian.org
X-Debbugs-Cc: 563204 at bugs.debian.org

GRUB doesn't depend on os-prober, it only recommends it.

One obvious effect is that when installing GRUB, other operating systems 
are not necessarily detected. This was reported in #563204. However, 
debian-installer includes a fallback procedure to write a static 
/etc/grub.d/30_otheros in that case (for example, when installing from a 
netinst without a mirror). This itself has a downside - if os-prober is 
later installed, both 30_otheros and 30_os-prober will cause the 
addition of entries for other OS-es, so other operating systems will be 
duplicated.

One less obvious and worst effect, which was alluded to in comments of 
#563204, is that the removal of os-prober eventually causes the loss of 
other operating systems. And this is both likely and non-trivial to "debug".
os-prober is only extra. Its extended description reads:

> This package detects other OSes available on a system and outputs the 
> results in a generic machine-readable format. 

Unless the administrator reading this is very alert, it's unlikely he 
will think the removal of os-prober can affect GRUB. And when removing 
os-prober, there is no warning at all about an effect on GRUB.

Also, the effect will only be seen after grub.cfg is updated and then 
the system rebooted, which will normally take days, usually weeks, so it 
will be hard for the administrator to realize that his removal of 
os-prober caused the problem when he notices the problem.


The duplication of menu entries could be solved by removing 30_otheros 
when os-prober is installed. The loss of menu entries could be solved by 
writing a "final" 30_otheros when os-prober is removed, in prerm.
However, it would be even better, and much less complicated to 
implement, to simply make GRUB depend on os-prober, which only weighs 
128 kB, as suggested in #563204. This would in fact allow a substantial 
simplification of grub-installer eventually, and fix #650414 for free. 
It could also make os-prober-udeb unneeded.






More information about the Pkg-grub-devel mailing list