Sunday, October 6, 2013

/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
RESUME=UUID=xxxxxxxxxxxxx
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
or
$ swapon -s

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

No comments:

Post a Comment