Problems with cryptsetup during update
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 find your device id, run:
lsblk
and locate the disk
which contains a part
ition mounted at /boot/*
. Note that you should use the device id (e.g. /dev/sda
), not the partition id (e.g. ) /dev/sda1
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.
This warning appeared inexplicably after I mounted two previously inactive disks as RAID 1, assigned a UUID to it, and later there was a kernel update.
To fix the warning, the first thing to do is
$ lsblk -f
to obtain the UUID value from the line "/".
This UUID is then entered in two files. In the file etc/fstab in the line containing the root "/", e.g: "/dev/sda3 / ext4 defaults 0 0". The part "dev/sda3" is replaced by "UUID=value":
UUID=cb2f354f-9e7a-44f8-8a01-2ef1e0b66c31 / ext4 defaults 0 0
In the file /etc/initramfs-tools/conf.d/resume the UUID is entered in this form:
RESUME=UUID=cb2f354f-9e7a-44f8-8a01-2ef1e0b66c31
Then the following command:
$ update-initramfs -u -k all
The warning should have disappeared and a reboot should be running.
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:
- 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! - This entry should be referred to in the
/etc/fstab
with/dev/mapper/root
. Check that the UUIDs are correctly set up - 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 - Run
update-grub
to fix any remaining grub issues - Now check the
/boot/grub/grub.cfg
. Go search for the firstmenuentry
which is the one that will be booted. Thesearch
part should contain the UUID of the boot partition (unencrypted!). Thelinux
part should have something saying thatroot=/dev/mapper/root
or pointing to the UUID of the unencrypted volume (in my setup the btrfs volume)
Good luck!