Bug#597563: grub-common: grub-probe segfaults scanning lvm devices
Matthew Gabeler-Lee
cheetah at fastcat.org
Sun Jan 9 03:09:08 UTC 2011
On 1/8/2011 18:55, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> I have a hypothesis. Does last partition on any device span, s.t. it
> leaves less than 64K after it until the end of device? If so then GRUB
> sees the same metadata sector as the one at the end of device and as at
> the end of partition. With 1.x metadata sector contains its own location
> on the device. With 0.90 I can see no such field. Is there a way to
> check for such condition with 0.90?
I created the last partition on each disk running as close to the end of the
disk as fdisk would allow. Since the partitions were created on cylinder
boundaries, however, it looks like the last partition ends 2MB before the
end of the physical device. Reading the data between the end of the last
partition and the end of the disk gives all zeros for three of the four
disks, but /dev/sdb gives what looks like it might have an mdraid superblock
in it:
$ sudo fdisk -lu /dev/sdb
Disk /dev/sdb: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x994d834b
Device Boot Start End Blocks Id System
/dev/sdb1 * 63 4016249 2008093+ fd Linux raid autodetect
/dev/sdb2 4016250 8032499 2008125 fd Linux raid autodetect
/dev/sdb3 8032500 1465144064 728555782+ fd Linux raid autodetect
$ sudo dd if=/dev/sdb bs=512 skip=1465144064 2>/dev/null | hd
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00260000 fc 4e 2b a9 00 00 00 00 5a 00 00 00 03 00 00 00 |.N+.....Z.......|
00260010 00 00 00 00 a2 f7 64 93 e8 36 28 44 01 00 00 00 |......d..6(D....|
00260020 80 f3 0e 00 03 00 00 00 02 00 00 00 00 00 00 00 |................|
00260030 00 00 00 00 d5 95 46 d7 a0 b3 8d 7d 48 9e 5f 3b |......F....}H._;|
00260040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00260080 6f 90 65 49 01 00 00 00 02 00 00 00 03 00 00 00 |o.eI............|
00260090 00 00 00 00 01 00 00 00 eb 34 81 5b 52 25 90 00 |.........4.[R%..|
002600a0 00 00 00 00 52 25 90 00 00 00 00 00 ff ff ff ff |....R%..........|
002600b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00260200 00 00 00 00 08 00 00 00 01 00 00 00 00 00 00 00 |................|
00260210 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00260220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00260280 01 00 00 00 08 00 00 00 11 00 00 00 01 00 00 00 |................|
00260290 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
002602a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00260300 02 00 00 00 08 00 00 00 30 00 00 00 02 00 00 00 |........0.......|
00260310 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00260f80 02 00 00 00 08 00 00 00 30 00 00 00 02 00 00 00 |........0.......|
00260f90 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
0027e000
mdadm seems to confirm this. mdadm --examine /dev/sd[acd] gives "no md
superblock", but on /dev/sdb, I get this (note that the device size at least
is bogus, since the disk itself is only 750GB):
$ sudo mdadm --examine /dev/sdb
/dev/sdb:
Magic : a92b4efc
Version : 0.90.03
UUID : 9364f7a2:d74695d5:7d8db3a0:3b5f9e48
Creation Time : Mon Mar 27 14:03:04 2006
Raid Level : raid1
Used Dev Size : 979840 (957.04 MiB 1003.36 MB)
Array Size : 979840 (957.04 MiB 1003.36 MB)
Raid Devices : 2
Total Devices : 3
Preferred Minor : 0
Update Time : Thu Jan 8 00:34:39 2009
State : clean
Active Devices : 2
Working Devices : 3
Failed Devices : 0
Spare Devices : 1
Checksum : 5b8134eb - correct
Events : 9446738
Number Major Minor RaidDevice State
this 2 8 48 2 spare /dev/sdd
0 0 8 1 0 active sync /dev/sda1
1 1 8 17 1 active sync /dev/sdb1
2 2 8 48 2 spare /dev/sdd
--
-Matt
"Reality is that which, when you stop believing in it, doesn't go away".
-- Philip K. Dick
GPG pubkey fingerprint: A57F B354 FD30 A502 795B 9637 3EF1 3F22 A85E 2AD1
More information about the Pkg-grub-devel
mailing list