Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a dual-boot machine, where I already set up Ubuntu in an encrypted lvm. I want to use the same lvm for Crunchbang (a debian derivative), since I designed that lvm with two root-Volumes, a swap-area and a data-volume.

I managed to get the lvm mounted in the Debian-installer (through the shell with cryptsetup and vgchange - that seemed the only possible way, since partman seems not able to do so on it's own) and I could install Crunchbang doing that.

Now the only proble I am having now is, that my Debian is not finding the lvm-group (thus not the root-Volume) - which seems only logical, because apparently it does not know it is behind an encrypted partition.

So the question is: How do I get my Debian to work now?

It seems to me that the bootloader (grub in this case) just does not know about the encryption, so if I could get it to know about it, everything would work fine. How would I achieve that?

Or - to be more to the thread-question - is there another (simpler) way of installing a Debian system onto an existing encrypted lvm?

share|improve this question
add comment

1 Answer

After much fiddling, I haven't found a way to restore my os. However I have found a way on how to install both OS's correctly:

First of all, there are (quite naturally) differences in the packages the debian-installer comes with, depending on the OS you want to install. This is pretty much the bottle-neck of the problem here:

In my case - ever since Canonical decided they wouldn't release an alternate cd for 12.10 and up anymore, thus leaving users with ubiquity, that is incapable of setting up a non-trivial partitioning scheme -, the alternate (i.e. debain-)installer of Ubuntu's 12.04 lts was able to detect encrypted drives and configured lvm's, while Crunchbang's debian-installer was not.

So my steps were:

  • Install Crunchbang first
  • Set up different partitions, one of them an encrypted one
  • (Here is another tricky part: The default encryption algorithm in Crunchbang was, I think, aes-xts-plain64, that however was not supported by the Ubuntu 12.04 installer) Choose an encryption algorithm that is supported by both OS's Debian-Installers
  • Install Crunchbang on one of the Volumes of the encrypted lvm
  • Install Ubuntu
  • In the partition manager, click on "Set up encrypted partition". The installer will ask if you want to finalize the partition scheme, click yes (it is already final), and then it will ask if you want to discover encrypted drives, click yes
  • If everything went well, you may pass in your passphrase for the partition and the installer will already list the available Volumes
  • Install Ubuntu on one of the Volumes of the encrypted lvm
  • Enjoy!

Now these steps were specific to my OS's, so may vary a lot to whatever someone else wants to install, but should in general give an idea on how to proceed.

One last friendly advice: Use a Virtual Machine (e.g. VirtualBox) before attempting such an installation. It will save you a lot of hairloss and will increase your productivity!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.