Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I one drive in my computer. it is encrypted with LUKS, and I almost successfully installed Ubuntu 12.04 onto it. the only issue is the bootloader - GRUB2 would not install anywhere. tried an external USB drive and the internal drive.

I also tried to make my own grub, which worked better, but still didn't actually boot the drive. that fell back into busybox or initramfs or something.

so is there any way to boot into an LUKS-encrypted drive?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

The alternate install has support for Luks-Encrypted LVM roots. It even has a "Guided" partition mode for encrypted LVM

You will need your /boot partition mounted on non-encrypted media. This means either a separate /boot partition (the "Guided" default), or a USB drive holding your boot partition (if using the latter, you can also store your encryption key on it). This is because your computer cannot execute encrypted code. You need some unencrypted code to unlock the encrypted drive. If you use the USB drive option, make sure you have it inserted and mounted at /boot any time you update. (You could probably make a script to remind you, too...)

A special note: Using a separate boot partition on the same drive to store your bootloader code opens you up to the possibility of an "evil maid" attack, whereby someone with persistent access to your computer can modify your bootloader to record your password, then come back and retrieve it after next time you type your password. If you're just using encryption to protect your files in case of theft, then you don't have to worry about this. If this is a concern for you, keep your /boot on a thumb drive, and keep the thumb drive safe.

P.S: I'm writing this from a LUKS-Encrypted Archlinux system, with a drive that looks something like this:

/dev/sda:
    sda1: /boot - ext2 128M
    sda2: LUKS encrypted partition ~300GB
        LVM Physical Volume ~300GB
            logical volume: /root ext4 296GB
            logical volume: swap 4GB

I highly recommend this setup.

Hibernate is working fine, even though swap is on an encrypted partition (but it might not on Ubuntu). If you want a separate /home partition, that's easily done by adding another volume to the LVM. All of this should be achievable from the Ubuntu alternate install.

share|improve this answer
1  
Can you post a sample of your GRUB(2)? boot commands? –  Eero Aaltonen Sep 6 '13 at 12:55

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.