I was in a situation similar to akwala's, post #13
(http://unix.stackexchange.com/questions/1367/how-to-test-swap-
partition). In my case I use Mint 17 Rebecca (based on Trusty).

In this case, both "encrypt home" and "encrypt the full partition" have
been selected during installation.

I believe that the need for an encrypted swap in this case is not that
important if the system is to be used by a single user: the swap
partition (in akwala's case, /dev/mapper/kubuntu--vg-swap_1) resides in
an encrypted disk anyway.

Of course, one could choose to reinstall and select only "encrypt the
full partition" and not "encrypt home". In my particular case, I am
interested in also encrypting home because I use rsync to back up my
(encrypted) home dir (i.e., /home/.ecryptfs/my_username/.Private) to an
untrusted machine.

So, my fix consists in configuring my fresh Mint 17 installation to use
/dev/mapper/mint--vg-swap_1 (which is encrypted) as a non-encrypted swap
partition:

* Format the swap partition:
sudo mkswap /dev/mapper/mint--vg-swap_1

(for ubuntu, replace mint--vg-swap_1 by ubuntu--vg-swap_1, for other
releases, run "sudo fdisk -l" and adapt the name accordingly)

* Edit /etc/fstab:
  - comment out the line starting with: /dev/mapper/cryptswap1
  - if not there, add a line for mounting mint--vg-swap_1 as a regular swap 
partition:
/dev/mapper/mint--vg-swap_1 none swap sw 0 0
(if needed, replace mint--vg-swap_1 as described above)

* Edit /etc/crypttab and comment out the line starting with: cryptswap1

* Reboot

* After reboot verify that the swap was mounted:

$ swapon -s
Filename                                Type            Size    Used    Priority
/dev/mapper/mint--vg-swap_1             partition       4075516 0       -1

$ free
             total       used       free     shared    buffers     cached
Mem:       4000156    1266520    2733636      15452      25604     524712
-/+ buffers/cache:     716204    3283952
Swap:      4075516          0    4075516

$ sudo swapoff /dev/mapper/mint--vg-swap_1

(no errors)

$ sudo swapon -a

(no errors)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/953875

Title:
  Encrypted swap no longer mounted at bootup

To manage notifications about this bug go to:
https://bugs.launchpad.net/ecryptfs/+bug/953875/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to