grub2 doesn't recognize installations with encrypted /

Bug #532838 reported by hvoss
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: grub-common

After installing Ubuntu 10.04 (Lucid Lynx) Alpha 3, my previous Ubuntu installation is not listed in grub boot menu when its root partition (/) is encrypted (dm-crypt). "sudo grub-mkconfig" does not find my previous installation either. One has to edit grub config files manually to boot the previous installation.

To reproduce this bug:
Install any version of Ubuntu to a "dm-crypt"-encrypted root partition (/) using a un-encrypted /boot-Partition.
Install Lucid Lynx Alpha 3 to a different "dm-crypt"-encrypted root-partition (/) using a different un-encrypted /boot-Partition.
(You have to use the alternate CD to install Ubuntu to a "dm-crypt"-encrypted root partition (/).)
Try to find the Ubuntu you installed first in your grub boot menu.
Try to find the primarily installed Ubuntu by executing "sudo grub-mkconfig".

Revision history for this message
hvoss (hvoss) wrote :

This error still occurs in Ubuntu 10.04 (Lucid Lynx) Beta 1.

On my test system, I've got two installations of Lucid ("Test" and "Work"):
/dev/sda1 (hd0,1) = "dm-crypt"-crypted ext3, /-Partition for Lucid Test
/dev/sda2 (hd0,2) = unencrypted ext2, /boot-Partition for Lucid Work
/dev/sda3 (hd0,3) = unencrypted ext2, /boot-Partition for Lucid Test
/dev/sda5 (hd0,5) = "dm-crypt"-encrypted ext3, /-Partition for Lucid Work
First I installed "Test", then I installed "Work". I'm currently working in "Work".

$ mount
/dev/mapper/sda5_crypt on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
none on /var/lib/ureadahead/debugfs type debugfs (rw,relatime)
/dev/sda2 on /boot type ext2 (rw)

$ sudo update-grub2
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-16-generic
Found initrd image: /boot/initrd.img-2.6.32-16-generic
Found memtest86+ image: /memtest86+.bin
done

$ sudo mkdir /lucid-test

$ sudo cryptsetup luksOpen /dev/sda1 lucid-test
Enter passphrase for /dev/sda1:
Key slot 0 unlocked.

$ sudo mount /dev/mapper/lucid-test /lucid-test

$ sudo mount /dev/sda3 /lucid-test/boot

$ mount
/dev/mapper/sda5_crypt on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
none on /var/lib/ureadahead/debugfs type debugfs (rw,relatime)
/dev/sda2 on /boot type ext2 (rw)
/dev/mapper/lucid-test on /lucid-test type ext3 (rw)
/dev/sda3 on /lucid-test/boot type ext2 (rw)

$ sudo update-grub2
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-16-generic
Found initrd image: /boot/initrd.img-2.6.32-16-generic
Found memtest86+ image: /memtest86+.bin
done

$ sudo ls -A /lucid-test/
bin boot cdrom dev etc home initrd.img lib lost+found media mnt opt proc root sbin selinux srv sys tmp usr var vmlinuz

$ sudo ls -A /lucid-test/boot/
System.map-2.6.32-16-generic config-2.6.32-16-generic initrd.img-2.6.32-16-generic memtest86+.bin vmlinuz-2.6.32-16-generic
abi-2.6.32-16-generic grub lost+found vmcoreinfo-2.6.32-16-generic

Revision history for this message
hvoss (hvoss) wrote :

This error still occurs in Ubuntu 10.10 (Maverick Meerkat) Beta.

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in grub2 (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for grub2 (Ubuntu) because there has been no activity for 60 days.]

Changed in grub2 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.