12

I think I was installing a bunch of updates, and after what seemed like an hour or so, I finally got this message in the Terminal window:

cryptsetup: WARNING: failed to detect canonical device of overlayfs
cryptsetup: WARNING: could not determine root device from /etc/fstab

What does this mean, and how do I fix it?

  • Also, it is still working on something. How long should this take? – Maegan Jul 4 '13 at 22:30
  • How are you updating? Are you using command line? – BiggJJ Jul 4 '13 at 22:46
  • check this out askubuntu.com/questions/87437/… – Projjol Jul 5 '13 at 5:43
  • "I think I was installing a bunch of updates" -- what exactly did you do? (which command, which program). Also, post the contents of the file /etc/fstab (open a terminal, and type cat /etc/fstab). – January Jul 5 '13 at 6:42
9

If you are not using enCRYPTED volumes or swap, then you don't need cryptsetup, just uninstall it and reboot using the following commands:

sudo apt-get remove cryptsetup
# it's better to update and reinstall GRUB before rebooting
sudo update-grub
sudo grub-install /dev/<your_device_id>
sudo reboot

To make sure you are not using crypted filesystems please check /etc/fstab, if you see the option 'crypt' anywhere, then you require cryptsetup and what you need is to configure it properly.

  • Note that <your_device_id> is indeed your device id (e.g. /dev/sda), not your partition (e.g. /dev/sda1)! – AstroFloyd Aug 20 '18 at 8:16
  • Could you explain why the update-grub and grub-install are needed. How do I determine which device(s) to grub-install? – Joe Murray Sep 19 '18 at 19:04
  • cryptsetup is required for more than just boot-time encrypted partitions. It is used for containerized encryption as well, and also as a native interface to VeraCrypt partitions and containers. It would be useful to know if the cryptsetup warnings can be ignored for people who have cryptsetup but who do not use boot-time encryption. – Kurt Fitzner Dec 20 '18 at 0:54
  • Maybe a little of topic but, how do you know for sure that cryptsetup/crypttab is not in used and thus you can safely remove it? – Fleuv Feb 6 at 23:35
1

Pre-information: I am using btrfs within LUKS with an unencrypted boot partition. For LVM or other setups the solution may differ!

If you actually are using cryptsetup and encounter this error, the fix for me was to:

  1. Make sure the /etc/crypttab file is set up correctly. 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)

Good luck!

  • I use btrfs too on mint tara ubuntu. a question please. the only swap entry, no root entry in crypttab, is it normal? – Yurij Oct 12 '18 at 8:53
  • That depends. My guess is that you only encrypted your swap during the setup. In that case it is fine. If your root is encrypted however and you cannot boot e.g. then you should probably add the entry. – matt3o Oct 16 '18 at 10:09
  • during install i choose encrypt whole disk, plus encrypt home. So at first glance that is not fine. – Yurij Oct 16 '18 at 15:04
  • But everything still works? Encrypt home is done differently, in that case it doesn't have to be there. If you really encrypted the whole disk then I'm not sure tbh. Maybe it works differently on your linux. – matt3o Oct 18 '18 at 9:45
  • 1
    So if you want your whole disk encrypted I fear you do have to run the setup again and reinstall your linux. (don't forget to backup etc!) However I cannot tell you 100% that your disk is not encrypted - it's simply that it's not encrypted with the two most common encryption techniques and I can't tell you if there's any more I don't know about. As Mint is based on Ubuntu I'd guess that no, your disk is not encrypted as a whole however. – matt3o Oct 20 '18 at 8:10

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.