Sorry for the late reply ;-).  Let's see if we can revive this issue..

On Mon, May 28, 2007 at 03:49:11AM +0100, Sam Morris wrote:
>         +        if (drive_name[0] == 'm' && drive_name[1] == 'd')
>         +          printf ("pc gpt raid\n");
>         +        else if (strchr (drive_name, '-') != NULL)
>         +          printf ("pc gpt lvm\n");

The point of probing for the partition table is to determine which module
we need to access it.  This "pc gpt" is just a guess, and doesn't give
you any garantee that you will be able to access your partitions. Besides,
even if it does we're needlessly loading an additional module that we
probably don't need (either pc or gpt).

Don't get me wrong, I don't think it's completely unreasonable to fallback to
"pc gpt" (at least, not for debian), but if we do this grub-probe doesn't seem
like the right place to do it.  If it can't detect something, IMHO it should
exit with error.  Then grub-install can be tollerant to this and have that
"pc gpt" fallback (untill the problem is fixed properly).

OTOH, your check that we need raid or lvm modules seems useful, it just happens
to be unrelated to the partmap stuff.  Can you isolate it?  (for example, we
could have "grub-probe -t <some_generic_word_matching_raid_and_lvm>").

Then maybe grub-install could do something like:

partmap=`grub-probe -t partmap || echo pc gpt`
something=`grub-probe -t something || true`

modules="..... $partmap $something ...."

Ah, and this strchr (drive_name, '-') seems too generic.  Maybe it could
catch some other unwanted paths?  Can it be narrowed?

-- 
Robert Millan

My spam trap is [EMAIL PROTECTED]  Note: this address is only intended
for spam harvesters.  Writing to it will get you added to my black list.


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to