Hi Vladmir, Thanks for your reply. Sorry I didn't get back to you -- I had some mail problems.
2009/10/31 Vladimir 'phcoder' Serbinenko <phco...@gmail.com>: > hfs+ and ext2 use same sector as superblock so it's not a problem Ok, what about NTFS and ext2 then? > Or you can modify the tools to clear first and last MiB on mkfs which > solves problem at the root I agree... but unfortunately there are many file systems created a long time ago that have this signature problem. >> This heuristic could have a lot of problems. (See my example above.) >> > Any heuristic means that something is wrong. Agreed... if there were enough partition type IDs for everyone, or everyone agreed on where to put superblocks, we wouldn't have this problem. We're forced to use heuristics because there is no standard. >>> Or we can attempt to read a given file when we expect it's there. For >>> example, if we're looking for /boot/grub/, we can tell "/boot/grub" to the >>> filesystem layer, so that it will require it as a precondition. >>> >> >> I can see that that would work will for some use cases... >> > It breaks encapsulation and makes code a lot less maintainable. And just > offset clear bug to a lot of strange and weird bugs Grub currently uses heuristics... grub_fs_probe() arbitrarily picks the first match, which is a terrible heuristic which made my computer unbootable. How can you avoid heuristics in this situation? You could require the user to specify the file system? > Many filesystems would look having some weird filenames but still having > a directory if they are false positives. I agree that my patch does not eliminate all false positives. But it does not add any new ones. > Every heurisitic makes code less clear and more prone to bugs and in > long run results only in more heurisitc failures. Does this mean you want to remove grub_fs_probe() ? Cheers, Andrew _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel