4 Answers
4

Deleted all the partitions set up with cryptsetup.
Then, installed cryptsetup via apt-get install. This must be another version of cryptsetup.
Created the partitions again with cryptsetup luksFormat and the normal procedure.
The boot process managed to detect and open the encrypted partitions!

My conclusion is that the cryptsetupversion that is installed by default doesn't do its work properly.

11.10 had exact same problem. There is nothing wrong with your setup, and in fact the system should continue to boot and then you can check and see that the swap partition is properly activated. I just live with it although it can be quite annoying. My guess is that we need to file a bug about it.

Thanks. I've already filled a bug. In 10.04 this worked flawlessly. The difference between our implementations is that none of encrypted partitions get mounted, not even swap.
–
LuisAug 16 '12 at 22:22

I happened to stumble upon this problem for 3 different releases of Ubuntu on two different computers. While most of the time the swap-partition was mounted despite the warning message, sometimes the GUI refused to start upon boot completion because of it.

Here's what I did as a workaround:

Open a terminal by pressing Ctrl + Alt + T.

Type gksudo gedit /etc/fstab and press Enter.

Search for the line that looks something like this:

/dev/mapper/cryptswap swap swap defaults 0 0

Now enter the value noauto right after defaults (separated by a comma), so it looks like this:

/dev/mapper/cryptswap swap swap defaults,noauto 0 0

Save and exit. This way, your swap partition won't be mounted while booting, thus the warning message won't appear or even hinder the login screen to appear.

Now type in a terminal

gksudo gedit /etc/rc.local

and enter the following lines before the entryexit 0:

sleep 10

swapon /dev/mapper/cryptswap

If there's no entry exit 0, you'll have to enter it right beneath those two lines.
Save and exit again. This will tell your system to wait 10 seconds after login to mount your encrypted swap partition.

Reboot your system. You should not get the warning message any longer. After login, wait some time, then open up a terminal again and type