On Thu, 23 Feb 2012 06:43:23 +0100, Vladimir 'φ-coder/phcoder' Serbinenko <phco...@gmail.com> wrote: > Try attached patch
hrm, i get a segmentation fault from "grub-probe /" even without this patch when building from bzr trunk (r3964, i think). The test machine i've set up looks like this uses a common layering scheme: disk → partition → mdadm (0.90 superblock) → lvm → filesystem Here are the details and a backtrace of me trying: 0 root@trash:~# parted /dev/sda unit s print Model: ATA WDC WD200BB-75DE (scsi) Disk /dev/sda: 39062500s Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 8192s 12542018s 12533827s primary 2 12550144s 39062499s 26512356s primary 0 root@trash:~# parted /dev/sdb unit s print Model: ATA QUANTUM FIREBALL (scsi) Disk /dev/sdb: 26520480s Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 4096s 26520479s 26516384s primary 0 root@trash:~# cat /proc/mdstat Personalities : [raid1] md0 : active raid1 sdb1[0] sda2[1] 13256064 blocks [2/2] [UU] unused devices: <none> 0 root@trash:~# pvs PV VG Fmt Attr PSize PFree /dev/md0 vg_trash0 lvm2 a-- 12.64g 9.64g 0 root@trash:~# vgs VG #PV #LV #SN Attr VSize VFree vg_trash0 1 1 0 wz--n- 12.64g 9.64g 0 root@trash:~# lvs LV VG Attr LSize Origin Snap% Move Log Copy% Convert root vg_trash0 -wi-ao 3.00g 0 root@trash:~# grep ' / ' /proc/mounts rootfs / rootfs rw 0 0 /dev/mapper/vg_trash0-root / ext3 rw,relatime,errors=remount-ro,user_xattr,acl,barrier=1,data=ordered 0 0 0 root@trash:~# cd - /home/dkg/src/grub/grub 0 root@trash:/home/dkg/src/grub/grub# gdb ./grub-probe GNU gdb (GDB) 7.4-debian Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /home/dkg/src/grub/grub/grub-probe...(no debugging symbols found)...done. (gdb) run -v / Starting program: /home/dkg/src/grub/grub/grub-probe -v / [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1". /home/dkg/src/grub/grub/grub-probe: info: changing current directory to /dev/mapper. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to /dev. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to md. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to dri. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to snd. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-path. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to cpu. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to vg_trash0. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to /dev. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to md. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to dri. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to snd. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-path. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to cpu. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to vg_trash0. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to disk. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-uuid. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-path. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-id. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to block. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to /dev. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to md. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to dri. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to snd. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-path. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to cpu. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to vg_trash0. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to disk. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-uuid. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-path. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-id. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to block. /home/dkg/src/grub/grub/grub-probe: info: Looking for /dev/sdb1. /home/dkg/src/grub/grub/grub-probe: info: /dev/sdb1 starts from 4096. /home/dkg/src/grub/grub/grub-probe: info: opening the device hd1. /home/dkg/src/grub/grub/grub-probe: info: the size of hd1 is 26520480. /home/dkg/src/grub/grub/grub-probe: info: the size of hd1 is 26520480. /home/dkg/src/grub/grub/grub-probe: info: Scanning for DISKFILTER devices on disk hd1. /home/dkg/src/grub/grub/grub-probe: info: no LVM signature found. /home/dkg/src/grub/grub/grub-probe: info: Found array md/md0. /home/dkg/src/grub/grub/grub-probe: info: Inserting hd1 into md/md0 (mdraid09) . /home/dkg/src/grub/grub/grub-probe: info: the size of hd1 is 26520480. /home/dkg/src/grub/grub/grub-probe: info: Scanning for DISKFILTER devices on disk md/md0. /home/dkg/src/grub/grub/grub-probe: info: no LVM signature found. /home/dkg/src/grub/grub/grub-probe: info: scanning md/md0 for LDM. /home/dkg/src/grub/grub/grub-probe: info: no LDM signature found. /home/dkg/src/grub/grub/grub-probe: info: Scanning for DISKFILTER devices on disk md/md0. /home/dkg/src/grub/grub/grub-probe: info: Found array vg_trash0. /home/dkg/src/grub/grub/grub-probe: info: Inserting md/md0 into vg_trash0 (lvm) . /home/dkg/src/grub/grub/grub-probe: info: Scanning for DISKFILTER devices on disk lvm/vg_trash0-root. /home/dkg/src/grub/grub/grub-probe: info: no LVM signature found. /home/dkg/src/grub/grub/grub-probe: info: scanning lvm/vg_trash0-root for LDM. /home/dkg/src/grub/grub/grub-probe: info: no LDM signature found. /home/dkg/src/grub/grub/grub-probe: info: Scanning for DISKFILTER devices on disk hd1. /home/dkg/src/grub/grub/grub-probe: info: Inserting hd1 into vg_trash0 (lvm) . Program received signal SIGSEGV, Segmentation fault. 0x080e7850 in grub_util_get_ldm () (gdb) bt #0 0x080e7850 in grub_util_get_ldm () #1 0x080d834e in grub_util_biosdisk_get_grub_dev () #2 0x080d7195 in grub_util_pull_device () #3 0x080d716a in grub_util_pull_device () #4 0x080d7081 in grub_util_pull_device () #5 0x0804ab2c in probe () #6 0x0804bcdc in main () (gdb) Applying the patch doesn't help me avoid the segfault. So i haven't really tested the patch. --dkg
pgpsCutTHeowg.pgp
Description: PGP signature
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel