If you run into this make sure when you are mounting and repairing in a chroot via `cryptsetup open /dev/whatever mapper-name` that the `mapper-name` matches what you have in your `/etc/crypttab`. You can get this by booting from the LiveCD and manually mounting the encrypted partition.
Or try something like the script below which was tested on 18.04, but may work for earlier versions as hopefully the APIs haven't changed much for things like critical boot path.
If you run into this make sure when you are mounting and repairing in a chroot via `cryptsetup open /dev/whatever mapper-name` that the `mapper-name` matches what you have in your `/etc/crypttab`. You can get this by booting from the LiveCD and manually mounting the encrypted partition.
Or try something like the script below which was tested on 18.04, but may work for earlier versions as hopefully the APIs haven't changed much for things like critical boot path.
https:/ /gist.github. com/dragon788/ e777ba64d373210 e4f6306ad40ee0e 80