Another idea would be to temporarily exchange the encrypted swap device
for the real one. The resulting combination is of course no longer
safely encrypted. The user would have to be made aware.

I hacked up two scripts for the acpi daemon to do just that:

**** /etc/acpi/suspend.d/99-swap.sh:
#!/bin/bash
#
# Disable encrypted swap

swapoff /dev/mapper/cswap
dmsetup remove cswap
mkswap /dev/sda5
swapon /dev/sda5

**** /etc/acpi/resume.d/00-swap.sh:
#!/bin/bash
#
# Enable encrypted swap

swapoff /dev/sda5
/etc/init.d/cryptdisks start
swapon /dev/mapper/cswap

These script can be made general by using the output from commands like
'dmsetup info'.

-- 
encrypted swap partition causes data loss upon hibernation
https://bugs.launchpad.net/bugs/98680
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to