7

I installed Ubuntu 13.10 64bit on my PC. I have single hard disk (/dev/sda) with LVM encrypted partition.

So the problem is that after reboot I cannot start Ubuntu (it dropped me to initramfs prompt with message: /dev/mapper/kubuntu....-root missing)

So I think it is because during boot it cannot open /dev/sda5 with cryptsetup. If I do chrooting I can open partition and mount encrypted root partition. I tried to add in grub parameter:

cryptopts=target=sda5_crypt,source=/dev/sda5,lvm=vg-root

But in cosole during boot I see that No LVM volume is found on sda5? I also find message:

scripts/local_top/cryptroot:line 1 /sbin/cryptsetup: not found

Can anybody have idea what is wrong?

I tried system upgrade, created cryptroot file, regenerated initram file.

1
  • 1
    I'm also affected by this problem, did you find any solution to it? – Naftuli Kay Jan 12 '15 at 5:54
8

The cryptsetup modules are only added to the initramfs image "when there is a device that needs to be unlocked at initramfs stage (such as root or resume devices)" (See: conf-hook). But this currently only works (reliably) if the root device is not in an (encrypted) LVM.

To force the cryptsetup modules to the initramfs image you have to set CRYPTSETUP=y in /etc/cryptsetup-initramfs/conf-hook.

You can also remove the cryptopts grub/kernel parameter when adding the initramfs option in /etc/crypttab:

sda5_crypt /dev/sda5 none luks,initramfs

I just answered a similar question at Unix & Linux, you might want to have a look there too.

1
  • 1
    Welcome to Ask Ubuntu! ;-) Excellent first answer! +1 already! – Fabby Jun 3 '18 at 22:56
2

I had this problem yesterday. I was using BTRFS and Ubuntu had automatically created root and home subvolumes on the filesystem that I wasn't aware of. I needed to edit my /etc/fstab to mount these volumes properly.

A tip: once you're in the initramfs shell, play around a bit and see if ls /root brings back anything. That led me to my answer.

1
  • Sounds like a different issue. The OP refers to cryptsetup issues. – mc0e Jun 14 '16 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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