[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: patch for partmap probing on RAID/LVM

From: Robert Millan
Subject: Re: patch for partmap probing on RAID/LVM
Date: Sun, 17 Jun 2007 20:00:58 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

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 address@hidden  Note: this address is only intended
for spam harvesters.  Writing to it will get you added to my black list.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]