Bug#577808: grub-pc: grub-install segfaults on amd64+gpt+lvm

Jean-Christophe Haessig jean-christophe.haessig at dianosis.org
Wed Apr 14 19:17:34 UTC 2010


Package: grub-pc
Version: 1.98-1
Severity: important
Tags: squeeze

Upon manual invocation or through automatic upgrades of grub-pc, grub-install
does not work. The error comes from grub-probe which segfaults on the followin
commandline : /usr/sbin/grub-probe --device /dev/mapper/vg2-boot
--target=partmap  However, while a "Segmentation Fault" message is printed,
grub-install still reports that "Installation finished. No error reported."  I
only experience that issue on my amd64 box, where I have a lvm on gpt setup.
The last lines or grub-probe follow.  open("/dev/hdc1", O_RDONLY)             =
3 ioctl(3, 0x301, 0x7fffa7dfa6e0)         = 0 close(3)
= 0 open("/dev/hdc2", O_RDONLY)             = 3 ioctl(3, 0x301, 0x7fffa7dfa6e0)
= 0 close(3)                                = 0 open("/dev/hdc2",
O_RDONLY|O_SYNC)      = 3 ioctl(3, BLKFLSBUF, 0)                  = 0 lseek(3,
196096, SEEK_SET)              = 196096 read(3, "BLE\"]\nflags =
[]\nsegment_count ="..., 4096) = 4096 close(3)                                =
0 getcwd("/home/pshunter", 4098)          = 15 open("/dev/hdc", O_RDONLY)
= 3 fstat(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(22, 0), ...}) = 0 ioctl(3,
BLKGETSIZE64, 0x7fffa7dfa778)  = 0 close(3)                                = 0
open("/dev/hdc", O_RDONLY|O_SYNC)       = 3 ioctl(3, BLKFLSBUF, 0)
= 0 lseek(3, 0, SEEK_SET)                   = 0 read(3,
"\353c\220\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512)
= 512 read(3, "EFI
PART\0\0\1\0\\\0\0\0\2615\342\264\0\0\0\0\1\0\0\0\0\0\0\0"..., 3584) = 3584
close(3)                                = 0 gettimeofday({1271272394, 116486},
NULL) = 0 gettimeofday({1271272394, 116552}, NULL) = 0 getcwd("/home/pshunter",
4098)          = 15 open("/dev/hdc", O_RDONLY)              = 3 fstat(3,
{st_mode=S_IFBLK|0660, st_rdev=makedev(22, 0), ...}) = 0 ioctl(3, BLKGETSIZE64,
0x7fffa7dfa778)  = 0 close(3)                                = 0
gettimeofday({1271272394, 116998}, NULL) = 0 gettimeofday({1271272394, 117073},
NULL) = 0 stat("/dev/mapper/vg2-boot", {st_mode=S_IFBLK|0660,
st_rdev=makedev(254, 3), ...}) = 0 gettimeofday({1271272394, 117285}, NULL) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 mmap(NULL,
4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6c54381000
write(1, "part_gpt\n", 9)               = 9 --- SIGSEGV (Segmentation fault) @
0 (0) --- +++ killed by SIGSEGV +++


-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/mapper/vg2-root / ext4 rw,relatime,errors=remount-ro,barrier=1,data=ordered 0 0
/dev/mapper/vg2-var /var ext4 rw,relatime,barrier=1,data=ordered 0 0
*********************** END /proc/mounts

*********************** BEGIN /boot/grub/device.map
(fd0)	/dev/fd0
(hd0)	/dev/hda
(hd1)	/dev/hdc
*********************** END /boot/grub/device.map

*********************** BEGIN /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
  set saved_entry=${prev_saved_entry}
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z ${boot_once} ]; then
    saved_entry=${chosen}
    save_env saved_entry
  fi
}
insmod lvm
insmod ext2
set root='(vg2-root)'
search --no-floppy --fs-uuid --set 43d1fbff-7215-433d-86a0-05765ad255e1
if loadfont /boot/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
insmod lvm
insmod ext2
set root='(vg2-root)'
search --no-floppy --fs-uuid --set 43d1fbff-7215-433d-86a0-05765ad255e1
set locale_dir=($root)/boot/grub/locale
set lang=fr
insmod gettext
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod lvm
insmod ext2
set root='(vg2-root)'
search --no-floppy --fs-uuid --set 43d1fbff-7215-433d-86a0-05765ad255e1
insmod png
if background_image /boot/grub/moreblue-orbit-grub.png ; then
  set color_normal=black/black
  set color_highlight=magenta/black
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Debian GNU/Linux, with Linux 2.6.30-2-amd64" --class debian --class gnu-linux --class gnu --class os {
	insmod lvm
	insmod ext2
	set root='(vg2-root)'
	search --no-floppy --fs-uuid --set 43d1fbff-7215-433d-86a0-05765ad255e1
	echo	Loading Linux 2.6.30-2-amd64 ...
	linux	/boot/vmlinuz-2.6.30-2-amd64 root=/dev/mapper/vg2-root ro  quiet
	echo	Loading initial ramdisk ...
	initrd	/boot/initrd.img-2.6.30-2-amd64
}
menuentry "Debian GNU/Linux, with Linux 2.6.30-2-amd64 (recovery mode)" --class debian --class gnu-linux --class gnu --class os {
	insmod lvm
	insmod ext2
	set root='(vg2-root)'
	search --no-floppy --fs-uuid --set 43d1fbff-7215-433d-86a0-05765ad255e1
	echo	Loading Linux 2.6.30-2-amd64 ...
	linux	/boot/vmlinuz-2.6.30-2-amd64 root=/dev/mapper/vg2-root ro single 
	echo	Loading initial ramdisk ...
	initrd	/boot/initrd.img-2.6.30-2-amd64
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
*********************** END /boot/grub/grub.cfg

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30-2-amd64 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages grub-pc depends on:
ii  debconf [debconf-2.0]         1.5.30     Debian configuration management sy
ii  grub-common                   1.98-1     GRand Unified Bootloader, version 
ii  libc6                         2.10.2-6   Embedded GNU C Library: Shared lib
ii  ucf                           3.0025     Update Configuration File: preserv

grub-pc recommends no packages.

Versions of packages grub-pc suggests:
ii  desktop-base                  5.0.5      common files for the Debian Deskto

-- debconf information:
  grub-pc/kopt_extracted: false
  grub2/kfreebsd_cmdline:
* grub-pc/install_devices: /dev/hda, /dev/hdc
  grub-pc/postrm_purge_boot_grub: false
* grub2/linux_cmdline:
  grub2/kfreebsd_cmdline_default: quiet
* grub2/linux_cmdline_default: quiet
  grub-pc/chainload_from_menu.lst: true





More information about the Pkg-grub-devel mailing list