2008/5/16 Pavel Roskin <[EMAIL PROTECTED]>: > On Mon, 2008-05-12 at 09:14 -0430, Isaac M. Marcos wrote: > > > (gdb) print mda_size > > $1 = 192512 > > > > not what you though :-( > > OK, we have something interesting here. mda_size is 192512 (0x2f000). > rlocn->offset is 92672 (0x16a00). But (q - metadatabuf) is 325120 > (0x4f600). So, the initial value of q was within the buffer, but the > value that caused the segfault was outside the buffer. > > It means that GRUB could not find any space character in the buffer and > kept scanning until it hit unallocated space. I believe it's not valid > LVM metadata. > > > $ sudo pvck /dev/sda6 > > Device /dev/sda6 not found (or ignored by filtering). > > So, it's not a LVM physical volume. > > > /dev/sda6 3397 6561 25422831 fd Linux raid > autodetect > > It's a RAID partition. I guess RAID partitions have a different layout. > > 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? -- Cases are always threesome: Best case, Worst case, and Just in case
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel