From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Jyz1t-0003mL-SV for mharc-grub-devel@gnu.org; Wed, 21 May 2008 20:51:37 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jyz1r-0003jO-O7 for grub-devel@gnu.org; Wed, 21 May 2008 20:51:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jyz1n-0003cc-VA for grub-devel@gnu.org; Wed, 21 May 2008 20:51:35 -0400 Received: from [199.232.76.173] (port=42024 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jyz1n-0003cR-S2 for grub-devel@gnu.org; Wed, 21 May 2008 20:51:31 -0400 Received: from wx-out-0506.google.com ([66.249.82.230]:34630) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jyz1n-0001AM-FQ for grub-devel@gnu.org; Wed, 21 May 2008 20:51:31 -0400 Received: by wx-out-0506.google.com with SMTP id h28so2976895wxd.24 for ; Wed, 21 May 2008 17:51:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date:user-agent:cc:references:in-reply-to:x-face:mime-version:content-type:content-transfer-encoding:message-id; bh=rZqogHGulE0TQx0Z30rkA7pUAMf3lkKD0w+HTQtNKKw=; b=Uwlp+TPWOVEMfHI2uv4SRhdFlvn+xiWYXJmAv+H90lFzcKjLTBDBRt7/UEQhLOR95+SITmnf4i2bSugANAW53a7ZLPyOAwiLqvhWvYblGDOl2x66Q2+fGOGx8j08qGOyAmfVmlwxYfQnuCRoyFig7BrE+1+KrQkKdsBADwZVBjw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to:x-face:mime-version:content-type:content-transfer-encoding:message-id; b=cAPVipaY2a2gcjwhEdhoCD8ba1NivZa3P1kD+o/+jkgHqek7uYy6N0Yk7aJiLv0F9uxb2ZHCLzu/q6KD8L3apf1qa0/Oh6DU7NX/K1CR8xuUtq8xfhJRQqpC62cxBAG1o/AyMmLshDsgTs+NHztePumAFSkH7pIwRrbMU4PK0g4= Received: by 10.70.54.2 with SMTP id c2mr13272470wxa.85.1211417486620; Wed, 21 May 2008 17:51:26 -0700 (PDT) Received: from dsktop01.iafcg.loc ( [190.75.165.30]) by mx.google.com with ESMTPS id h38sm1115253wxd.39.2008.05.21.17.51.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 21 May 2008 17:51:25 -0700 (PDT) From: "Isaac M. Marcos" To: grub-devel@gnu.org Date: Wed, 21 May 2008 20:20:54 -0430 User-Agent: KMail/1.9.9 References: <200805080454.54578.isaacmarcos100010@gmail.com> <3ac92b10805161048q6b4e12b4kd8cca66644d904a9@mail.gmail.com> <1210960960.19414.6.camel@dv> In-Reply-To: <1210960960.19414.6.camel@dv> X-Face: x-y\t15800Zgk#"~:Drp1}fo=N%pB*F8(J'>p}vH!s^cOfk.OkJcPPD#tY{V}N3:"-2Y>=?utf-8?q?B=0A=09RudWYi=5BV?=(q[woD:$pX],WnaV2Pp"&mBYiTK3g}RJsiBFy3IGy'H+&N,g0%lZ5; $Ows7Zyv1D2r8s=]C=]6QHY=YyEr\; 1=F4C76~*(=?utf-8?q?2l=7B9=23=0A=09Z=5Db1dNIHPtCCvypAZi-0=5D=25kTcGn=27x8A=5C=5F-/?= =?utf-8?q?7PW8=60?= X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Cc: Pavel Roskin Subject: Re: grub-probe gets a segfault 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: Thu, 22 May 2008 00:51:36 -0000 --nextPart2192341.FxMJPQSPAS Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline El Friday 16 May 2008 13:32:40 Pavel Roskin escribi=C3=B3: > On Sat, 2008-05-17 at 13:18 +0000, Isaac Marcos wrote: > > The fix would be to reject RAID partitions in > > grub_lvm_scan_device(). > > The only validity check in that function is presence of the > > LVM label in > > the first 4 sectors. Perhaps additional checks are needed. > > > > Good find Pavel. :-) > > > > Just a question, /dev/sda5 has an equivalent setup: > > # pvck /dev/sda5 > > Device /dev/sda5 not found (or ignored by filtering). > > /dev/sda5 232 3396 25422831 fd Linux raid > > autodetect > > > > Why grub-probe doesn't fail on /dev/sda5? > > I think because it has no LVM label. Maybe /dev/sda6 was holding a LVM > physical volume before, and the label was not erased when it became a > RAID partition. I cheked, and both partitions (sda5,sda6) have LVM labels, and correctly so: /dev/sda5 (for example): 0000:0200 LABELONE........?=C3=8D=C3=89C ...LVM2 001npzaBI7ZXIhG29Uxcg1lkUI= lTNTS6wbR 0000:0240 .../.............................................=C3=B0..........= =2E... sda5,sdb5,sdc5,sdd5 form a RAID5 disk (md1) ON which LVM was set up. sda6,sdb6,sdc6,sdd6 form a RAID5 disk (md2) ON which LVM was set up. pvck /dev/md1 Found label on /dev/md1, sector 1, type=3DLVM2 001 Found text metadata area: offset=3D4096, size=3D192512 pvck /dev/md2 Found label on /dev/md2, sector 1, type=3DLVM2 001 Found text metadata area: offset=3D4096, size=3D192512 Some kind of deep interaction is going on? > As you can see, pvck doesn't display information partition. It means it > cannot be fooled by the label. And that's what GRUB should do. Yes, but in the meanwhile : Today, I bump on this problem again on updating kernel. Because of this fau= lt,=20 update-initramfs reports a failure. It can't find "/". grub-probe -t device / --> segfault!! Let me explain something: Neither "/" or "/boot" has anything to do with RAID or LVM in this system. = It=20 was setup like this exactly to prevent this kind of interferences on boot.= =20 They are "/dev/sda1" and "/dev/sda2", plain ext3 partitions. And here comes grub-probe, testing every disk and partition on the system,= =20 testing for LVM, and many other things, and failing in the process. I think it boils down to this main idea: Could it test simple partitions first and if / is found, stop scanning? Why it needs to scan anything else if the requested partition has been foun= d? =2D-=20 Isaac M. Marcos GPG key 0xC9045C1B 5633 ECAF 44B1 8A5D 9371 DCDA 4620 A016 C904 5C1B The only place success comes before work is in the dictionary. VINCE LOMBARDI --nextPart2192341.FxMJPQSPAS Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBINMN/RiCgFskEXBsRArZpAJ4hB3TKG1aWzGeAj381E6CIKNjOTQCcCD72 JDn6gZ/BNw5813kBVZyZceE= =SGi6 -----END PGP SIGNATURE----- --nextPart2192341.FxMJPQSPAS--