Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Ubuntu 13.04 system using encryption for /, /home, and swap. This used to work flawlessly, but then I needed to resize the swap partition. After doing that, and manually trying to set it up, the swap partition no longer gets activated at boot.

I can however activate it by doing a:

# cryptsetup luksOpen /dev/sda6 sda_crypt
# swapon -a

after boot.

I have a feeling that I am missing something like a commandline option for the kernel. Does anyone have a hunch?

For completeness, here are my fstab and crypttab:

# cat /etc/crypttab 
sda6_crypt UUID=dc259cc3-cb4a-44d2-8b1e-3636ef294b94 none luks,swap
sdb5_crypt UUID=a8f5cfdd-a17c-448f-8ecf-24ba48d843c1 none luks
sdb7_crypt UUID=bd50ceca-8bff-421d-b91a-783659fedca6 none luks
# egrep -v '^(#|$)' /etc/fstab
/dev/mapper/sdb5_crypt /               ext4    errors=remount-ro 0       1
UUID=04ad0dee-887f-400f-bf87-2086bd3e4cbf /backup         ext4     defaults        0       2
UUID=06be7d34-7990-4dbe-9c29-e0fec9812149 /boot           ext4    defaults        0       2
/dev/mapper/sdb7_crypt /home           ext4    defaults        0       2
/dev/mapper/sda6_crypt none            swap    sw              0       0

EDIT: I already tried "update-initramfs -u -k all" and "dpkg-reconfigure grub-pc" to resolve the problem - this did not help.

share|improve this question
Did you update your initramfs after altering the configuration files? sudo update-initramfs -u -k all – gertvdijk May 31 '13 at 8:08
@gertvdijk: Yup, forgot to mention that. Will edit my question. – user163280 May 31 '13 at 8:11
Not trying to state the obvious, but did you verify the UUID? After changing the size of the partition this may have changed. Run sudo blkid to verify. – gertvdijk May 31 '13 at 8:17
@gertvdijk: yup, the UUID is correct. I deleted the old entries in fstab and crypttab when I resized the partition, and added new ones afterwards. – user163280 May 31 '13 at 8:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.