grub and encrypted LVM

Asked by Rolf Leggewie

Most of my HD is an encrypted LVM (exception is /boot on unencrypted partition) with Ubuntu Lucid as my main OS. I want to test other OS and releases and created another LVM partition for it. I added a configuration for grub as /etc/grub.d/50_ubuntu+1 (see below). But this does not seem to be sufficient. What's missing? The secondary OS (Natty in this case) is completely inside its own partition (including /boot, so grub will need to unencrypt and mount the LVM).

$ cat /etc/grub.d/50_ubuntu+1
#!/bin/sh
exec tail -n +3 $0
# 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.
menuentry 'Ubuntu+1, next development release' --class ubuntu --class gnu-linux --class gnu --class os {
 recordfail
 insmod ext2
 insmod lvm
 set root='(1001P-Natty64)'
 linux /vmlinuz root=/dev/mapper/1001P-Natty64 ro quiet splash
 initrd /initrd.img
}

update-grub has no problem to see the partition although there are a few warnings about /dev/sdb (which actually is not present!) as "error: cannot open `/dev/sdb' while attempting to get disk size."

$ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.36-999-generic
Found initrd image: /boot/initrd.img-2.6.36-999-generic
Found linux image: /boot/vmlinuz-2.6.32-33-generic
Found initrd image: /boot/initrd.img-2.6.32-33-generic
Found linux image: /boot/vmlinuz-2.6.32-31-generic
Found initrd image: /boot/initrd.img-2.6.32-31-generic
Found linux image: /boot/vmlinuz-2.6.32-23-generic
Found initrd image: /boot/initrd.img-2.6.32-23-generic
Found memtest86+ image: /memtest86+.bin
Found Ubuntu Natty (development branch) (11.04) on /dev/mapper/1001P-Natty64
/usr/sbin/grub-probe: error: no mapping exists for `1001P-Natty64'.
/usr/sbin/grub-probe: error: no mapping exists for `1001P-Natty64'.
done

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.