Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Hzz2U-0004LT-CL for mharc-grub-devel@gnu.org; Sun, 17 Jun 2007 13:59:50 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hzz2S-0004L9-Ik for grub-devel@gnu.org; Sun, 17 Jun 2007 13:59:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hzz2Q-0004Kx-4b for grub-devel@gnu.org; Sun, 17 Jun 2007 13:59:47 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hzz2P-0004Ku-V8 for grub-devel@gnu.org; Sun, 17 Jun 2007 13:59:45 -0400 Received: from aybabtu.com ([69.60.117.155]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Hzz2P-000886-HB for grub-devel@gnu.org; Sun, 17 Jun 2007 13:59:45 -0400 Received: from [192.168.10.6] (helo=aragorn) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Hzz2N-00006m-3b; Sun, 17 Jun 2007 19:59:43 +0200 Received: from rmh by aragorn with local (Exim 4.63) (envelope-from ) id 1Hzz3a-0005qq-Vs; Sun, 17 Jun 2007 20:00:58 +0200 Date: Sun, 17 Jun 2007 20:00:58 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20070617180058.GA22040@aragorn> References: <1180320551.24543.8.camel@xerces> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1180320551.24543.8.camel@xerces> Organization: free as in freedom X-Message-Flag: Microsoft discourages use of Outlook. X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: Genre and OS details not recognized. Cc: Sam Morris Subject: Re: patch for partmap probing on RAID/LVM X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2007 17:59:48 -0000 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 "). 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 honeypot@aybabtu.com. Note: this address is only intended for spam harvesters. Writing to it will get you added to my black list.