Page 3 of 3 FirstFirst 123
Results 21 to 25 of 25

Thread: Discussion - https://help.ubuntu.com/community/EnableHibernateWithEncryptedSwap

  1. #21

    Re: Discussion - https://help.ubuntu.com/community/EnableHibernateWithEncryptedSwap

    Quote Originally Posted by andreas-rabus View Post
    This Wiki Guide seems to be for upstart not systemd, or all ubuntu versions before 15.04.

    systemd seems to try to mount the swap partition before the crypt stuff is setup and fails if the encrpyted swap is tried after crypt setup.
    On an arch wiki i found the hint to make the type of the swap partition not "swap", but this did no work for me.
    Encrypted swap (and hibernate) continues to work for me on Ubuntu 16.04. Granted I set it up a while ago, but that was the procedure I used.

    I don't see anything upstart- or systemd-specific with those instructions... Did you set up "regular" encrypted swap (using ecryptfs-setup-swap) before starting? Did you follow the instructions exactly (especially step 8, editing /etc/crypttab)? What do you see when your computer boots?

  2. #22
    Join Date
    Aug 2006
    Location
    Portugal
    Beans
    46
    Distro
    Lubuntu 16.10 Yakkety Yak

    Re: Discussion - https://help.ubuntu.com/community/EnableHibernateWithEncryptedSwap

    This tutorial does not work for 16.10. I am able to hibernate my computer, but when resuming, it automatically reboots after/when copying the swap contents to RAM (after password input).
    Is there any log where I can check what is going wrong? I've been scouring through /var/log/syslog, /var/log/pm-powersave.log and /var/log/pm-suspend.log and found nothing relevant.

    At Hibernation with Ubuntu 16.10 fails - AskUbuntu people are pointing out that pm-utils no longer works and we should now use systemd hibernate service. Bullet 5 from crysman's answer implies that hibernation through systemd cannot handle an encrypted swap setup like the tutorial proposes.
    Still, I tried adding "pci=nomsi resume=/dev/mapper/cryptswap1" to GRUB_CMDLINE_LINUX_DEFAULT and triggered hibernation with "systemctl hibernate", but the result was the same as above.

    Perhaps we should dive into some alternatives:
    How to use hibernation without a swap partition - Debian Wiki
    dm-crypt/Swap encryption with suspend-to-disk support - Arch Wiki

    Which one do you think is best?

  3. #23
    Join Date
    Jun 2017
    Beans
    1

    Re: Discussion - https://help.ubuntu.com/community/EnableHibernateWithEncryptedSwap

    Quote Originally Posted by thelinuxkidd View Post
    Thanks for the guide. It was very helpful. There was just one extra thing I had to add in order for the passphrase prompt to always show up during start-up. In /etc/default/grub I edited GRUB_CMDLINE_LINUX_DEFAULT to look like:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash cryptopts=target=cryptswap1,source=/dev/sda6 resume=swap:/dev/mapper/cryptswap1"


    Similar situation here. Guide is helpful, thx, but it wasn't working until i've read this
    http://chriseiffel.com/uncategorized...suming-session
    [here is google copy of above page]

    I've updated /etc/default/grub adding following
    Code:
    GRUB_CMDLINE_LINUX=”resume=/dev/sdXN other-option=value”
    than
    Code:
    $ sudo update-grub
    and now its working as a charm.

    Can anyone add it to wiki page? It seems I have no permission to do that.
    Last edited by tworec; June 8th, 2017 at 10:24 AM.

  4. #24
    Join Date
    Jun 2018
    Beans
    2

    Re: Discussion - https://help.ubuntu.com/community/EnableHibernateWithEncryptedSwap

    I have my HOME folder encrypted.

    I get stuck at this step:

    Code:
    swapon --summary
    All I get is:

    Code:
    Filename                Type        Size    Used    Priority
    /dev/sda1                                  partition    31249404    0    -2
    I'm using a swap partition, and the article seems to assume swapfiles. So I don't know how to continue.

  5. #25
    Join Date
    Jun 2006
    Location
    Buenos Aires, Argentina
    Beans
    129
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Discussion - https://help.ubuntu.com/community/EnableHibernateWithEncryptedSwap

    Quote Originally Posted by amcsi2 View Post
    All I get is:

    Code:
    Filename                Type        Size    Used    Priority
    /dev/sda1                                  partition    31249404    0    -2
    I'm using a swap partition, and the article seems to assume swapfiles. So I don't know how to continue.
    No. The article assume swap partitions, however, it assumes the swap partition is already encrypted (I don't recall 'cause I've done this too long ago, but maybe when you configure encryption during installation it encrypts the swap partition by default).

    Anyway, the only thing you should do is encrypt the swap partition which is quite simple to do. Assuming /dev/sda1 is your swap partition (which is what your command shows), just type:
    Code:
    sudo ecryptfs-setup-swap
    This will warn you that hibernate/resume will no longer work (because it will use a random generated encryption key at power-on). Go ahead, since after you finish the rest of the instructions, you should be able to hibernate/resume (assuming you remember the passphrase you'll create afterwards).

    After you do this,
    Code:
    swapon --summary
    should give you the expected output.
    Mariano Absatz - "el baby" (clueless...)
    Linux User #479955 Ubuntu user #24300
    Nostalgia: The good old days multiplied by a bad memory...
    This message transmitted on 100% recycled electrons

Page 3 of 3 FirstFirst 123

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •