Ubuntu is not booting but printing weird things, either

  • /run/lvm/lvmetad.socket: connect failed: No such file or directory
  • or /sbin/cryptsetup not found

then falls back to busybox after a few minutes (sometimes..).

The error appeared after moving onto a new hard disk where I had to delete an encrypted partition. After chrooting into the root partition and running udpate-initramfs -u the error mentioned here popped up:

cryptsetup: WARNING: could not determine root device from /etc/fstab

My setup: I followed the setup proposed here. Now I have a / btrfs volume inside LUKS with an unencrypted /boot partition. All this running on EFI with secure boot disabled.


All the default hacks and fixes are putting you on a good track, however none of them was complete. This was the solution in my case:

  1. Make sure the /etc/crypttab file is set up correctly. All entries have to refer to existing partitions. There should be at least one entry named "root", this is the root / entry. This was crucial for me - and nobody mentioned it so far!
  2. This entry should be referred to in the /etc/fstab with /dev/mapper/root. Check that the UUIDs are correctly set up
  3. Now run update-initramfs -u which udpates only your most recent kernel. If a cryptsetup warning pops up, you failed on the previous steps. Review all files and try figure out the problem
  4. Run update-grub to fix any remaining grub issues
  5. Now check the /boot/grub/grub.cfg. Go search for the first menuentry which is the one that will be booted. The search part should contain the UUID of the boot partition (unencrypted!). The linux part should have something saying that root=/dev/mapper/root or pointing to the UUID of the unencrypted volume (in my setup the btrfs volume)
  6. Try to boot. If the lvm errors still pop up, silence them as mentioned in this answer

One last advice: Care for any little warning popping up. Usually they are meaningless, in this case they are very important.

Good luck!

| improve this answer | |

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.