Bug#650724: grub-pc: /usr/sbin/grub-probe: error: Couldn't find PV pv2. Check your device.map.
Luca Capello
luca at pca.it
Fri Dec 2 11:25:04 UTC 2011
Package: grub-pc
Version: 1.98+20100804-14+squeeze1
File: /etc/kernel/postinst.d/zz-update-grub
Severity: important
Usertags: pca.it-boot
Hi there!
After having changed both 500GB Samsung HDs with two 1TB Seagate HDs (in
RAID1 and LV for /srv) and having rebooted at least twice with no
problems, today's kernel upgrade fails:
=====
sha:/etc# apt-get update
[...]
sha:/etc# apt-get upgrade
[...]
The following packages will be upgraded:
bind9-host dnsutils libbind9-60 libcups2 libdns69 libfreetype6
libisc62 libisccc60 libisccfg62 liblwres60 linux-base
linux-image-2.6.32-5-686 linux-libc-dev
[...]
Preparing to replace linux-image-2.6.32-5-686 2.6.32-38 \
(using .../linux-image-2.6.32-5-686_2.6.32-39_i386.deb) ...
Unpacking replacement linux-image-2.6.32-5-686 ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 2.6.32-5-686 \
/boot/vmlinuz-2.6.32-5-686
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 2.6.32-5-686 \
/boot/vmlinuz-2.6.32-5-686
[...]
Setting up linux-image-2.6.32-5-686 (2.6.32-39) ...
Running depmod.
Running update-initramfs.
update-initramfs: Generating /boot/initrd.img-2.6.32-5-686
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 2.6.32-5-686 \
/boot/vmlinuz-2.6.32-5-686
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 2.6.32-5-686 \
/boot/vmlinuz-2.6.32-5-686
Generating grub.cfg ...
/usr/sbin/grub-probe: error: Couldn't find PV pv2. Check your device.map.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postinst.d at \
/var/lib/dpkg/info/linux-image-2.6.32-5-686.postinst line 799.
dpkg: error processing linux-image-2.6.32-5-686 (--configure):
subprocess installed post-installation script returned error exit status 2
Setting up libisc62 (1:9.7.3.dfsg-1~squeeze4) ...
[...]
Errors were encountered while processing:
linux-image-2.6.32-5-686
E: Sub-process /usr/bin/dpkg returned an error code (1)
sha:/etc#
=====
Not being a RAID/partition/boot expert, after having looked through the
grub-pc bugs for RAID1/LVM, I could see three problems:
1) debconf's 'grub-pc/install_devices' refers to an MD device which is
not partitioned and with 0.9 metatada:
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593648#69>
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632048#24>
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637208#15>
=====
sha:/etc# fdisk -l /dev/disk/by-id/md-uuid-a3208af4:1df324f6:0359f4d8:3a34e120
Disk /dev/disk/by-id/md-uuid-a3208af4:1df324f6:0359f4d8:3a34e120: \
197 MB, 197263360 bytes
[...]
Disk /dev/disk/by-id/md-uuid-a3208af4:1df324f6:0359f4d8:3a34e120 \
doesn't contain a valid partition table
sha:/etc# file -s /dev/disk/by-id/md-uuid-a3208af4:1df324f6:0359f4d8:3a34e120
/dev/disk/by-id/md-uuid-a3208af4:1df324f6:0359f4d8:3a34e120: \
symbolic link to `../../md2'
sha:/etc# file -s /dev/md2
/dev/md2: Linux rev 1.0 ext3 filesystem data, UUID=50fdd9f5-2c08-4e16-8044-e8e8771a3195 \
(needs journal recovery)
sha:/etc# mdadm --detail /dev/md2 | grep Version
Version : 0.90
sha:/etc#
=====
2) debconf's 'grub-pc/install_devices' refers to an MD device, which is
wrong and should be corrected by 1.99~20101210-2, given that AFAIK
the RAID device was automatically added:
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=612692#13>
Please note that this worked well before and was supported by debconf
question:
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=587017>
3) device.map is not in sync with the current situation, which means
that a simple `grub-mkdevicemap` should solve this.
Despite the machine being in production, it is not critical and thus I
have not touched anything yet, so feel free to ask for tests ;-)
Thx, bye,
Gismo / Luca
-- Package-specific info:
*********************** BEGIN /proc/mounts
/dev/mapper/vgsha-lvroot / ext3 rw,relatime,errors=remount-ro,data=ordered 0 0
/dev/md2 /boot ext3 rw,relatime,errors=continue,data=ordered 0 0
/dev/mapper/vgsha-lvsrv /srv ext3 rw,relatime,errors=continue,data=ordered 0 0
*********************** END /proc/mounts
*********************** BEGIN /boot/grub/device.map
(hd0) /dev/disk/by-id/ata-SAMSUNG_HD502HJ_S20BJA0Z108086
(hd1) /dev/disk/by-id/ata-SAMSUNG_HD502HJ_S20BJA0Z108087
(hd2) /dev/disk/by-id/scsi-35005076206cac30e
(hd3) /dev/disk/by-id/scsi-SSEAGATE_ST39236LW_3BN0VTMQ0000711534E4
(hd4) /dev/disk/by-id/scsi-SIBM_DDRS-34560D_RD3Q8116
*********************** END /boot/grub/device.map
*********************** BEGIN /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by 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
}
function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}
insmod raid
insmod mdraid
insmod lvm
insmod part_msdos
insmod part_msdos
insmod part_msdos
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(vgsha-lvroot)'
search --no-floppy --fs-uuid --set 41c04aeb-46b9-45c7-8aea-77d3da070136
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md2)'
search --no-floppy --fs-uuid --set 50fdd9f5-2c08-4e16-8044-e8e8771a3195
set locale_dir=($root)/grub/locale
set lang=it
insmod gettext
set timeout=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686' --class debian --class gnu-linux --class gnu --class os {
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md2)'
search --no-floppy --fs-uuid --set 50fdd9f5-2c08-4e16-8044-e8e8771a3195
echo 'Loading Linux 2.6.32-5-686 ...'
linux /vmlinuz-2.6.32-5-686 root=/dev/mapper/vgsha-lvroot ro rootdelay=15
echo 'Loading initial ramdisk ...'
initrd /initrd.img-2.6.32-5-686
}
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md2)'
search --no-floppy --fs-uuid --set 50fdd9f5-2c08-4e16-8044-e8e8771a3195
echo 'Loading Linux 2.6.32-5-686 ...'
linux /vmlinuz-2.6.32-5-686 root=/dev/mapper/vgsha-lvroot ro single rootdelay=15
echo 'Loading initial ramdisk ...'
initrd /initrd.img-2.6.32-5-686
}
menuentry 'Debian GNU/Linux, with Linux 2.6.26-2-686' --class debian --class gnu-linux --class gnu --class os {
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md2)'
search --no-floppy --fs-uuid --set 50fdd9f5-2c08-4e16-8044-e8e8771a3195
echo 'Loading Linux 2.6.26-2-686 ...'
linux /vmlinuz-2.6.26-2-686 root=/dev/mapper/vgsha-lvroot ro rootdelay=15
echo 'Loading initial ramdisk ...'
initrd /initrd.img-2.6.26-2-686
}
menuentry 'Debian GNU/Linux, with Linux 2.6.26-2-686 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md2)'
search --no-floppy --fs-uuid --set 50fdd9f5-2c08-4e16-8044-e8e8771a3195
echo 'Loading Linux 2.6.26-2-686 ...'
linux /vmlinuz-2.6.26-2-686 root=/dev/mapper/vgsha-lvroot ro single rootdelay=15
echo 'Loading initial ramdisk ...'
initrd /initrd.img-2.6.26-2-686
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### 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 ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
*********************** END /boot/grub/grub.cfg
-- System Information:
Debian Release: 6.0.3
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages grub-pc depends on:
ii debconf [debco 1.5.36.1 Debian configuration management sy
ii grub-common 1.98+20100804-14+squeeze1 GRand Unified Bootloader, version
ii libc6 2.11.2-10 Embedded GNU C Library: Shared lib
ii libdevmapper1. 2:1.02.48-5 The Linux Kernel Device Mapper use
ii ucf 3.0025+nmu1 Update Configuration File: preserv
grub-pc recommends no packages.
Versions of packages grub-pc suggests:
pn desktop-base <none> (no description available)
-- Configuration Files:
/etc/default/grub changed:
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX="rootdelay=15"
-- debconf information:
grub2/kfreebsd_cmdline:
* grub2/device_map_regenerated:
grub-pc/linux_cmdline: fillme
* grub2/linux_cmdline: rootdelay=15
grub-pc/install_devices_empty: false
grub-pc/install_devices_failed: false
grub-pc/chainload_from_menu.lst: true
grub-pc/kopt_extracted: false
* grub-pc/install_devices: /dev/disk/by-id/md-uuid-a3208af4:1df324f6:0359f4d8:3a34e120
grub-pc/postrm_purge_boot_grub: false
grub-pc/install_devices_failed_upgrade: true
grub-pc/disk_description:
grub2/kfreebsd_cmdline_default: quiet
grub-pc/partition_description:
grub-pc/install_devices_disks_changed:
grub2/linux_cmdline_default:
grub-pc/mixed_legacy_and_grub2: true
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20111202/2608a913/attachment.pgp>
More information about the Pkg-grub-devel
mailing list