0

My computer started freezing with the message cryptswap not ready, and so i tried following this tutorial

http://punygeek.blogspot.de/2012/10/ubuntu-1204-how-to-solve-disk-drive-for.html

Everything works, except that when i run the last command (to encrypt my swap), it freezes

ubuntu-gnome@ubuntu-gnome:~$ sudo ecryptfs-setup-swap
WARNING:
An encrypted swap is required to help ensure that encrypted files are not leaked to disk in an unencrypted format.

HOWEVER, THE SWAP ENCRYPTION CONFIGURATION PRODUCED BY THIS PROGRAM WILL BREAK HIBERNATE/RESUME ON THIS SYSTEM!

NOTE: Your suspend/resume capabilities will not be affected.

Do you want to proceed with encrypting your swap? [y/N]: y

INFO: Setting up swap: [/dev/sda5]
WARNING: Commented out your unencrypted swap from /etc/fstab
cryptdisks stop/waiting

I tried running it both in the live cd and by booting it to the console, but I keep getting the same results.

fdisk-l

Device     Boot     Start       End   Sectors  Size Id Type
/dev/sda1            2048    206847    204800  100M  7 HPFS/NTFS/exFAT
/dev/sda2  *       206848 191309823 191102976 91.1G  7 HPFS/NTFS/exFAT
/dev/sda3       191311872 820518903 629207032  300G  7 HPFS/NTFS/exFAT
/dev/sda4       820518910 976771071 156252162 74.5G  5 Extended
/dev/sda5       968962048 976771071   7809024  3.7G 82 Linux swap / Solaris
/dev/sda6       820518912 849815551  29296640   14G 83 Linux
/dev/sda7       849817600 968959999 119142400 56.8G 83 Linux

blkid

/dev/sda1: LABEL="System Reserved" UUID="0840DED940DECD16" TYPE="ntfs" PARTUUID="41a2ecc6-01" 
/dev/sda2: UUID="256353E503552314" TYPE="ntfs" PARTUUID="41a2ecc6-02" 
/dev/sda3: LABEL="userfiles" UUID="0462DB864AF41256" TYPE="ntfs" PARTUUID="41a2ecc6-03" 
/dev/sda6: UUID="c9c2da50-642e-4f3c-98e8-9614ac42c8d3" TYPE="ext4" PARTUUID="41a2ecc6-06" 
/dev/sda7: UUID="ebe11704-0f34-43a0-bd8b-23afc9cc6f18" TYPE="ext4" PARTUUID="41a2ecc6-07" 
/dev/sdb1: UUID="47C0-22BC" TYPE="vfat" PARTUUID="000f0dac-01" 
/dev/sda5: UUID="b7316db6-3032-4700-af08-584aadbe0bf1" TYPE="swap" PARTUUID="41a2ecc6-05"

fstab

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda6 during installation
UUID=c9c2da50-642e-4f3c-98e8-9614ac42c8d3 /               ext4    errors=remount
-ro 0       1
# /home was on /dev/sda7 during installation
UUID=ebe11704-0f34-43a0-bd8b-23afc9cc6f18 /home           ext4    defaults      
  0       2
# swap was on /dev/sda5 during installation
#UUID=d35dd961-0ebb-47b0-a163-d487cd77d97f none            swap    sw           
   0       0
#/dev/mapper/cryptswap1 none swap sw 0 0

/dev/sda3 /mnt/userfiles ntfs-3g rw,auto,user,fmask=0111,dmask=0000 nls=utf8 0 0
/dev/sda2 /mnt/windows ntfs-3g rw,auto,user,fmask=0111,dmask=0000 nls=utf8 0 0

my crypttab is empty

what am I missing? why is ecryptfs freezing?

1 Answer 1

2

The message "cryptdisks stop/waiting" is issued when the /etc/init.d/cryptdisks demon is stopped, and the demon then hangs when there's an attempt to restart the service.

I had the same problem (after a fresh install of Ubuntu 14.10, and running ecryptfs-setup-swap), except that for me, I did have a new entry added to /etc/crypttab, and I did have a new entry added to /etc/fstab.

The problem seems to be due to the "Known Bug" related to UUIDs described in Swap not working on clean 14.04 install using encrypted home

I suggest you try the following: (Warning: these instructions assume your swap partition is /dev/sda5 - adjust if necessary. You could loose data if you enter it wrongly.)

  1. Uncomment the line in /etc/fstab for /dev/mapper/cryptswap1. It should read:

    /dev/mapper/cryptswap1 none swap sw 0 0
    
  2. Add the following line to /etc/crypttab:

    cryptswap1 /dev/sda5 /dev/urandom swap,cipher=aes-cbc-essiv:sha256
    
  3. Then make the swap space

    $ sudo mkswap /dev/sda5
    
  4. Restart the cryptdisks daemon:

    $ sudo /etc/init.d/cryptdisks stop
    cryptdisks stop/waiting # or you may get: Job is not running: cryptdisks
    $ sudo /etc/init.d/cryptdisks force-start
     * Starting remaining crypto disks...
     * cryptswap1 (running)...
    
  5. Check that crypt is running:

    $ sudo cryptsetup status cryptswap1
    /dev/mapper/cryptswap1 is active and is in use.
    
  6. Check that you have some swap space:

    $ swapon -s
    

I found that the swap filename was /dev/dm-0 at this stage.

Now the full test. Reboot, and check again that cryptswap1 is still active, and check the swap space. This time, you should find that the swap space filename is /dev/mapper/cryptswap1. Good luck!

Note that gparted will show the partition as "unknown".

1
  • After trying a lot of stuff. I just gave up encryption and used a non-encrypted home folder. Thanks anyway! :)
    – drpexe
    Dec 1, 2014 at 12:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .