grub2 doesn't recognize installations with encrypted /
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"
Install Lucid Lynx Alpha 3 to a different "dm-crypt"
(You have to use the alternate CD to install Ubuntu to a "dm-crypt"
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".
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"): -encrypted ext3, /-Partition for Lucid 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"
First I installed "Test", then I installed "Work". I'm currently working in "Work".
$ mount sda5_crypt on / type ext3 (rw,errors= remount- ro) nosuid, nodev) nosuid, nodev) fuse/connection s type fusectl (rw) security type securityfs (rw) nosuid, gid=5,mode= 0620) mode=0755) nosuid, nodev) mode=0755) ureadahead/ debugfs type debugfs (rw,relatime)
/dev/mapper/
proc on /proc type proc (rw,noexec,
none on /sys type sysfs (rw,noexec,
none on /sys/fs/
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,
none on /var/lock type tmpfs (rw,noexec,
none on /lib/init/rw type tmpfs (rw,nosuid,
none on /var/lib/
/dev/sda2 on /boot type ext2 (rw)
$ sudo update-grub2 2.6.32- 16-generic img-2.6. 32-16-generic
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
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 sda5_crypt on / type ext3 (rw,errors= remount- ro) nosuid, nodev) nosuid, nodev) fuse/connection s type fusectl (rw) security type securityfs (rw) nosuid, gid=5,mode= 0620) mode=0755) nosuid, nodev) mode=0755) ureadahead/ debugfs type debugfs (rw,relatime) lucid-test on /lucid-test type ext3 (rw)
/dev/mapper/
proc on /proc type proc (rw,noexec,
none on /sys type sysfs (rw,noexec,
none on /sys/fs/
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,
none on /var/lock type tmpfs (rw,noexec,
none on /lib/init/rw type tmpfs (rw,nosuid,
none on /var/lib/
/dev/sda2 on /boot type ext2 (rw)
/dev/mapper/
/dev/sda3 on /lucid-test/boot type ext2 (rw)
$ sudo update-grub2 2.6.32- 16-generic img-2.6. 32-16-generic
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
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/ 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 32-16-generic grub lost+found vmcoreinfo- 2.6.32- 16-generic
System.
abi-2.6.