Comment 7 for bug 1186811

Revision history for this message
tres86dx (tres86dx-ubuntu) wrote :

Last week i had time to search a solution in google. First i discovered that the problem happen when the installation is made from usb stick. I realized that i started with the problem in 12.04 when i change from cd to usb. I guess the problem is in the installation program.
I found the next solution and it works for me.
Open a terminal windows:
1.- sudo swapoff -a
(the previous command turns off "swap" anyway it don't work)
2.-edit the crypttab file in /etc/crypttab
For do that use nautilus like superuser. In the terminal execute:
sudo nautilus
next go to /etc/crypttab and open the file. Search for:
cryptswap1 /dev/sdb8 /dev/urandom swap,cipher=aes-cbc-essiv:sha256

and put # at the begining to ignore the coomand when ubuntu start. Something like this:

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

save the file and close it.
3.- Do the same for another file named fstab
sudo nautilus
next go to /etc/fstab and open the file. Search for:

/dev/mapper/cryptswap1 none swap sw 0 0

put # again at the beginning.

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

save the file.

4.-Close all the programs and restart ubuntu.

5.- start gparted and reformat the correct partition like swap. Be sure the correct partition. In my case is:

/dev/sdb5

6.- open terminal and execute:

sudo mkswap /dev/sdXX

sdXX in my case is sdb5, this can vary from system to system. Pay attention to the system answer and copy to use later the UUID=xxxxxxxxxxxxxxxx For example:

setting up swapspace version 1, size = 4208636 KiB
no label, UUID=06a9be15-d05b-466d-bfe3-a086bb9cdba0

7.-edit the resume file in /etc/crypttab
For do that use nautilus like superuser. In the terminal execute:
sudo nautilus
next go to /etc/initramfs-tools/conf.d/resume and open the file. Search for:

RESUME=UUID=06a9be15-d05b-466d-bfe3-a086bb9cdba0

and change the numbers for yours numbers (previously saved):

RESUME=UUID=xxxxxxxxxxxxxxxxxxxx

save the file

8.- in the terminal execute:
sudo update-initramfs -u

this upgrade the configuration

9.- sudo swapon /dev/sdXX

this activate the swap

10.- sudo ecryptfs-setup-swap
this encrypt the swap partition

11.- to check the partition is working execute:

free -m

the report indicate the size of swapp partition.