/dev/mapper/cryptswap1 is not ready yet or not present

I had this error going for a long time now (usually while my system was loading from a reboot) and my swap space would usually just not work…
I finally had some time to deal with that.
I couldnt even reformat it in gparted or something similar…

This is how I fixed it:

First you turn your swap space off

$ sudo swapoff -a

commented out the existing swap line in /etc/crypttab

comment out the swap line in /etc/fstab

# /dev/mapper/cryptswap1 none swap sw 0 0

reboot your pc/laptop

now you should be working without a swap space, try reformatting your partition in gparted to a linux-swap type (in my case it was /dev/sda3)

after successfully reformatting it, proceed this way:

create a new swap (in my case /dev/sda3)

$ sudo mkswap /dev/sda3

a swap space will be created, copy and paste somewhere your new UUID

update your /etc/initramfs-tools/conf.d/resume (coment our the old line) and add
Note: x-es represent your new UUID


update initramfs:

$ sudo update-initramfs -u

and now edit /etc/fstab again and add the new swap space in the bottom
Note: x-es represent your new UUID

UUID=xxxxxxxxxxxxx        none    swap    sw      0       0

reboot your pc/laptop and your new swap space should be automatically enabled…

to see that use:

$ free


$ swapon -s

Just in case: I was using Ubuntu 12.04.1 LTS
Hopefully this helps you ! :)

About these ads

About Altin

FLOSS Hacktivist, Board Member at FLOSSKosova, Mozilla Representative, Board President MOSSCon, CIO at sudo:base, Young Entrepreneur, GEEK

Posted on October 15, 2012, in Linux, Sysadmin, Tutorials and tagged , , , , , , , , , . Bookmark the permalink. 6 Comments.

  1. there is only one problem with this procedure, I think…..your swap partition will not be encrypted, while the rest of your home will be…..not the most secure thing to do if your intention in the first place was to encrypt everything.

    I think that after updating initramfs, instead of updating fstab you should run these two commands

    sudo swapon /dev/sdXX (XX depends on your setup)
    sudo ecryptfs-setup-swap

  2. Very helpful, thanks, solved my problem in Lubuntu 12.10.

  3. I think there is a much simpler solution. Just open up as root etc/crypttab (do this by entering gksudo nautilus in the terminal, or if you’re using KDE enter kdesudo dolphin) and check that the correct swap partition is being used. In my case, this file showed the following:

    cryptswap1 /dev/sdd6 /dev/urandom swap,cipher=aes-cbc-essiv:sha256

    – now, when I looked in gparted, I noticed that the actual swap partition was /dev/sdc6 (not /dev/sdd6 as stated above). Clearly a mistake of the installer. However, after saving the corrected form of the crypttab file, the swap now gets mounted during bootup (which can be checked via the System Monitor).

  4. Great! That works. gparted shows swap partition wasn’t recognized. After your workaround encrypted swap is in operation. Thank you!

  5. Ӏ like the helpful information you provide in your ɑrticles.
    I will bookmzrk your weblog and take ɑ lolok at once more here regularly.
    I’m rather certain I’ll bbe told plenty of new stuff
    right right here! Good luck for the following!

  6. Heya i’m for the first time here. I found this board and I find
    It really useful & it helped me out a lot. I hope to give something back and help others like you helped me.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.