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

I just finished installing 12.04 on my system, configuring it with LUKS and LVM.

I can open the encrypted position just fine in a recovery disk, but I just can't seem to get it to boot.

It waits quite a while for the root partition, then explodes with errors on how it couldn't find the root device:

ALERT! /dev/mapper/vgcryptotop-lvcryptotoproot does not exist. Dropping to a shell!

I then get the initramfs prompt. I have tried running cryptsetup to open the disk from here, but it replies that cryptsetup isn't found by the shell.

I think that somehow, the OS was installed without LUKS and/or LVM. How do I fix this problem? How can I test my theory?

share|improve this question

1 Answer 1

Make sure dm-crypt.ko is in your initramfs. If it's NOT, it won't be able to mount the / filesystem and that's probably why you see the error.

chroot or just mount the /boot or / filesystem and do a /sbin/lsinitramfs initrd.img-$(uname -r)

You should see something like below (from a Debian wheezy box)

/boot# lsinitramfs initrd.img-`uname -r` | grep dm
...
lib/modules/3.2.0-4-amd64/kernel/drivers/md/dm-crypt.ko
...

If it's NOT, you may have to chroot into the system from a live CD (e.g. system rescue cd) and regenerate initramfs -> update-initramfs -u -k all.

Boot and see if it helps, if all good, you should be prompt to input the passphrase for the encryption key.

share|improve this answer
1  
I ran into the issue and your answer helped; thanks. I think what happened is that the first time I did ´update-initramfs´, it had a warning saying my crypttab was invalid, and I didn't notice the warning. As a result, ´dm-crypt.ko´ was not installed. Fixing my crypttab and running this command again fixed my situation. –  Jay Sullivan Jan 18 at 3:59
    
If you're using a live Debian CD, update-initramfs is disabled. Use /usr/sbin/update-initramfs.orig.initramfs-tools instead. –  z0r Jun 7 at 14:55
    
Instructions for getting to a chroot. You may also need to install lvm2 and cryptsetup in the live environment, and use them to gain access to your disks before chrooting. –  z0r Jun 7 at 14:56

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.