Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed a fresh 12.04 and tried to mimic what I had for 10.04. swap should be encrypted with a urandom key and there's another partition that will contain home and other directories.

# cat /etc/crypttab | grep -v '^#' | grep -v '^$'
cryptswap /dev/sda5 /dev/urandom swap
encriptado /dev/sda6

# grep -e 'cryptswap' -e 'encriptado' /etc/fstab
/dev/mapper/cryptswap swap swap defaults 0 0
/dev/mapper/encriptado /encriptado ext4 defaults 0 0

I also apt-get install cryptsetup

When I boot, the system says (try to translate) that either the partition is not found or is not ready. I should wait, press M for manual or S to jump over.

What am I missing here?

share|improve this question

What I did to solve this problem was the following.

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.

Hope this helps.

share|improve this answer

Actually I think your problem was an incomplete entry in /etc/crypttab. This line:

encriptado /dev/sda6

Should instead look like this:

encriptado /dev/sda6 none luks

The crypttab(5) man page states:

Note that all four fields are mandatory and that a missing field will lead to unspecified behaviour.

share|improve this answer

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.

share|improve this answer
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. – Luis Aug 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 entry exit 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

free -m

Your output should look something like this:

fuzzyq@Samsung-R710:~$ free -m

              total       used       free     shared    buffers     cached

 Mem:          3949       3806        143          0         86       1783

 -/+ buffers/cache:       1936       2013

 Swap:         4095          0       4095

The last line is the important one. If there's a positive value showing for total swap, your swap partition was being mounted successfully.

Please note: In your special case, you'd have to repeat the steps for your /dev/mapper/encriptado /encriptado ext4 defaults 0 0 partition to make this workaround do its magic.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.