Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I have a Ubuntu Server 13.10 machine. Its root partition is encrypted with LUKS, which is then stored in a logical volume. On boot, the LV is mounted and then cryptsetup requests my passphrase; once that is entered correctly the boot proceeds as usual.

Following a tutorial (here, among others), I have attempted to utilize a bit of random data stored in the MBR area of a USB thumb drive to unlock the root partition automatically on boot. Unfortunately, all the previous examples I have seen involve entire LVM's encrypted by LUKS, as opposed to my case of each LV being encrypted individually. When I boot after following the available tutorials, the normal cryptsetup routine requests my passphrase and only then does the keyscript I added to get the keyfile from the USB drive take over. It attempts to open the LUKS device again, but obviously fails and I am trapped at the second passphrase prompt again.

I am a complete newcomer to modifying Grub2 and the ramfs. Are there any good sources of information on how to do what I propose? A complete solution would be awesome, but I am willing to read and learn if pointed in the right direction.

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.