Bug#427289: grub-probe: error: unknown device when / is an encrypted LVM

Luca Capello luca at pca.it
Sat Jun 2 22:34:12 UTC 2007


Package: grub-pc
Version: 1.95+20070520-1
Severity: important

Hello,

I installed a new lenny with yesterday daily-built netinst amd64
image and at the end d-i proposed me to install grub2 instead of
grub-legacy.  The installation was OK and I rebooted into the new
lenny to upgrade it to sid:

=====
Script started on Sat 02 Jun 2007 01:01:28 AM CEST
gismo:~# apt-get dist-upgrade
Reading package lists... Done
[...]
Setting up linux-image-2.6.21-1-amd64 (2.6.21-4) ...
Running depmod.
Finding valid ramdisk creators.
Using mkinitramfs-kpkg to build the ramdisk.
Running postinst hook script /usr/sbin/update-grub.
grub-probe: error: unknown device
User postinst hook script [/usr/sbin/update-grub] exited with value 1
dpkg: error processing linux-image-2.6.21-1-amd64 (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-2.6-amd64:
 linux-image-2.6-amd64 depends on linux-image-2.6.21-1-amd64; however:
  Package linux-image-2.6.21-1-amd64 is not configured yet.
dpkg: error processing linux-image-2.6-amd64 (--configure):
 dependency problems - leaving unconfigured
Setting up grub-pc (1.95+20070520-1) ...
grub-probe: error: unknown device
dpkg: error processing grub-pc (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of grub2:
 grub2 depends on grub-pc; however:
  Package grub-pc is not configured yet.
dpkg: error processing grub2 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-2.6.21-1-amd64
 linux-image-2.6-amd64
 grub-pc
 grub2
E: Sub-process /usr/bin/dpkg returned an error code (1)
gismo:~# 
======

I guess the problem is linked to the fact that I've

  /dev/sda1, 200M, ext3, /boot
  /dev/sda2, 90G, encrypted LVM

In fact, grub-probe works with /boot, but not with /:

=====
gismo:~# grub-probe -v /boot
grub-probe: info: the size of hd0 is 195371568
grub-probe: info: opening the device `/dev/sda'
grub-probe: info: the size of hd0 is 195371568
grub-probe: info: opening the device `/dev/sda'
grub-probe: info: the size of hd0 is 195371568
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: the size of hd0 is 195371568
grub-probe: info: opening the device `/dev/sda2'
grub-probe: info: the size of hd0 is 195371568
grub-probe: info: the size of hd0 is 195371568
grub-probe: info: the size of hd0 is 195371568
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: the size of hd0 is 195371568
grub-probe: info: opening the device `/dev/sda2'
grub-probe: info: changing current directory to /dev/mapper
grub-probe: info: changing current directory to /dev
grub-probe: info: changing current directory to snd
grub-probe: info: changing current directory to net
grub-probe: info: changing current directory to loop
grub-probe: info: changing current directory to shm
grub-probe: info: changing current directory to pts
grub-probe: info: changing current directory to vggismo
grub-probe: info: changing current directory to mapper
grub-probe: info: /dev/sda1 starts from 63
grub-probe: info: opening the device hd0
grub-probe: info: the size of hd0 is 195371568
grub-probe: info: DOS partition 0 starts from 63
grub-probe: info: opening hd0,1
grub-probe: info: the size of hd0 is 195371568
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: opening the device `/dev/sda1'
ext2

gismo:~# grub-probe -v /
grub-probe: info: the size of hd0 is 195371568
grub-probe: info: opening the device `/dev/sda'
grub-probe: info: the size of hd0 is 195371568
grub-probe: info: opening the device `/dev/sda'
grub-probe: info: the size of hd0 is 195371568
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: the size of hd0 is 195371568
grub-probe: info: opening the device `/dev/sda2'
grub-probe: info: the size of hd0 is 195371568
grub-probe: info: the size of hd0 is 195371568
grub-probe: info: the size of hd0 is 195371568
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: the size of hd0 is 195371568
grub-probe: info: opening the device `/dev/sda2'
grub-probe: info: changing current directory to /dev/mapper
grub-probe: info: opening vggismo-lvroot
grub-probe: error: unknown device
gismo:~# 
=====

I'm here ready to test any patch, if needed :-)

Thx, bye,
Gismo / Luca

-- Package-specific info:

*********************** BEGIN /proc/mounts
rootfs / rootfs rw 0 0
none /sys sysfs rw,nosuid,nodev,noexec 0 0
none /proc proc rw,nosuid,nodev,noexec 0 0
udev /dev tmpfs rw 0 0
/dev/mapper/vggismo-lvroot / ext3 rw,data=ordered 0 0
/dev/mapper/vggismo-lvroot /dev/.static/dev ext3 rw,data=ordered 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid 0 0
varrun /var/run tmpfs rw,nosuid 0 0
usbfs /proc/bus/usb usbfs rw,nosuid,nodev,noexec 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,nosuid,noexec 0 0
/dev/sda1 /boot ext3 rw,data=ordered 0 0
/dev/mapper/vggismo-lvhome /home ext3 rw,data=ordered 0 0
/dev/mapper/vggismo-lvchroot /mnt/chroot ext3 rw,data=ordered 0 0
/dev/mapper/vggismo-lvlab /mnt/lab ext3 rw,data=ordered 0 0
/dev/mapper/vggismo-lvmovies /mnt/movies ext3 rw,data=ordered 0 0
/dev/mapper/vggismo-lvmusic /mnt/music ext3 rw,data=ordered 0 0
/dev/mapper/vggismo-lvpictures /mnt/pictures ext3 rw,data=ordered 0 0
*********************** END /proc/mounts

*********************** BEGIN /boot/grub/device.map
(hd0)	/dev/sda
*********************** END /boot/grub/device.map

*********************** BEGIN /boot/grub/grub.cfg
# grub.cfg - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
set default=0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
set timeout=5

# Pretty colours
# FIXME: use gfxterm here?

# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/mapper/vggismo-lvroot ro vga=792

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,1)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(single-user) single
# altoptions=(single-user mode) single

## controls how many kernels should be put into the grub.cfg
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## ## End Default Options ##

menuentry "Debian GNU/Linux, linux 2.6.18-4-amd64" {
	set root=(hd0,1)
	linux	/vmlinuz-2.6.18-4-amd64 root=/dev/mapper/vggismo-lvroot ro vga=792 
	initrd	/initrd.img-2.6.18-4-amd64
}

menuentry "Debian GNU/Linux, linux 2.6.18-4-amd64 (single-user mode)" {
	set root=(hd0,1)
	linux	/vmlinuz-2.6.18-4-amd64 root=/dev/mapper/vggismo-lvroot ro vga=792 single
	initrd	/initrd.img-2.6.18-4-amd64
}

### END DEBIAN AUTOMAGIC KERNELS LIST
*********************** END /boot/grub/grub.cfg

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

Kernel: Linux 2.6.18-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages grub-pc depends on:
ii  libc6                         2.5-9      GNU C Library: Shared libraries
ii  liblzo2-2                     2.02-2     data compression library

grub-pc recommends no packages.

-- no debconf information




More information about the Pkg-grub-devel mailing list