grub-devel
[Top][All Lists]
Advanced

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

Re: grub-probe gets a segfault


From: Isaac M. Marcos
Subject: Re: grub-probe gets a segfault
Date: Wed, 21 May 2008 20:20:54 -0430
User-agent: KMail/1.9.9

El Friday 16 May 2008 13:32:40 Pavel Roskin escribió:
> 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........?ÍÉC ...LVM2 001npzaBI7ZXIhG29Uxcg1lkUIlTNTS6wbR
0000:0240 .../.............................................ð..............

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=LVM2 001
  Found text metadata area: offset=4096, size=192512
pvck /dev/md2
  Found label on /dev/md2, sector 1, type=LVM2 001
  Found text metadata area: offset=4096, size=192512

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 fault, 
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 
was setup like this exactly to prevent this kind of interferences on boot. 
They are "/dev/sda1" and "/dev/sda2", plain ext3 partitions.

And here comes grub-probe, testing every disk and partition on the system, 
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 found?

-- 
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

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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