Installing Ubuntu 10.0.4 on already existing lvm logical volume on the encrypted partion

Asked by Sergey Spiridonov

Hi. I have notebook with several small unencrypted partitions (to be used as /boot partitions) and one big encrypted partition "rawdata". This "rawdata" partition is used for LVM. I have alreay installed Debian on this encrypted partition. Now I want to install Ubuntu 10.0.4 there.

After booting from the installation CD I did not see a way to mount existing encrypted partition and to activate LVM logcial volumes on it. What is a right way to go? Is it possible at all with Ubuntu? I did not find an direct answer or FAQ about this...

So far I managed to install Ubuntu 10.0.4 by booting into the Ubuntu Live, manually activating encrypted partition, mounting LVM logical volumes and starting installation. Installer crashes when it tries to install grub, so skipped grub installation. Later I reinstalling grub from Debian.

Problem now is to boot the system, because initrd seems not to have scripts to activate encrypted partition+LVM...

Question information

English Edit question
Ubuntu ubiquity Edit question
No assignee Edit question
Solved by:
Sergey Spiridonov
Last query:
Last reply:
Revision history for this message
Sergey Spiridonov (sena-hurd) said :

Finally. I made it working. Here it is:

# Boot from live cd
# Install lvm2
# cryptsetup luksOpen /dev/sdX cryptroot (please note, name "cryptroot" is a must, it will not work if you specify another name)
# at this point lvm volumes appeared in /dev/mapper
# mount root partition: mount /dev/mapper/lvm-ubuntu-root /mnt/u
# mount -o bind /dev /mnt/u/dev
# chroot /mnt/u
# mount /proc
# mount /boot
# Install lvm2 and cryptsetup packages
# aptitude install lvm2 cryptsetup
# regenerate initrd (if it is not done automatically) using update-initramfs