/dos is not an unheard of directory to have on a linux system -- we used
to put our dual-boot mount point there in 1995 -- and when mounted by
grub-mount, the filesystem type is not available to limit detection of
MS-DOS to only relevant filesystems.
Work around this problem by also requiring an /autoexec.bat or a
/config.sys. While not all MS-DOS systems have one of these files,
any MS-DOS system that a user is likely to care about showing up
in their boot menu probably does.
(IIRC not all MS-DOS systems even have a /dos!)
I also took a brief look at the other tests that allows fuse mount through.
Many of them, like 83haiku check for enough different items that the
chances of a false positive are very low even absent a filesystem type
confirmation. The most worrying are 20macosx, which only checks for
/mach_kernel, and 30utility, which only checks for /f11.sys.
Those should probably be tightened down, or a way found to check the actual
filesystem type when using grub-mount.
* Add support to detect BSD systems. Thanks to Gavrilin Andrey
<gaal.dev@gmail.com> for the patch (refs: #659208).
+ [ Joey Hess ]
+ * Avoid false positives in MS-DOS detection by also looking for
+ autoexec.bat. Closes: #663540
+
-- Joey Hess <joeyh@debian.org> Tue, 13 Dec 2011 17:54:33 -0400
os-prober (1.49) unstable; urgency=low
# MS-DOS
if [ -z "$found" ] && item_in_dir -q dos "$2" &&
- [ -d "$2"/"$(item_in_dir dos "$2")" ]; then
+ (item_in_dir -q autoexec.bat "$2" || item_in_dir -q config.sys "$2"); then
long="MS-DOS 5.x/6.x/Win3.1"
short=MS-DOS