Vote Up 0 Vote Down

ubuntu linux swap not starts on boot

ubuntu linux swap not starts on boot. I have encrypted the home folder.
I found swap location at /etc/fstab

/dev/mapper/cryptswap1


It is not detecting. Only when I choose the "swapon" option in gparted it is working.
flag
edited on 11/10/15

Answers


Vote Up 0 Vote Down
The swap is not detecting because of the encrypted home folder. It is a bug in Ubuntu. Do like following :

So, here the solution is to restore the swap as a normal, unencrypted swap without having to reinstall the whole operating system.

1.Edit /etc/crypttab and delete the whole cryptswap1 line: $ sudo nano /etc/crypttab

2.Start GParted from the system Settings menu.

3.You will see a partition with an exclamation mark. This should be the faulty swap partition. Carefully select it and reformat it to a linux-swap partition. After having applied this operation, you are informed about the new UUID of the restored normal swap partition. You are offered an opportunity to save this information. Mark the UID.

4.Now, edit fstab : sudo nano /etc/fstab

5.Remove the entire line containing a reference to /dev/mapper/cryptswap1.

6.Uncomment the old swap line by removing the hash # in front of UUID=....

7.Now, replace the old UUID with the new one obtained earlier.

8.Once done all that, you can already start using the new unencrypted swap with: $ sudo swapon -a

This solution survives both hot reboots and shutdown with cold restart. Reboot the system and check "System monitor". You can see that swap is detected.
flag | link |

Your Answer

Login before answering

Login with facebook