Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I just installed Ubuntu 12.04 and used gparted to erase and enlarge my swap partition. When I rebooted, gparted said that the file partition for the swap was unknown. Gparted doesn't let me change the file partition to "linux-swap". It does let me change it to NTFS, but when I reboot, it goes back to "unknown". Thanks in advance for your help.

Output from sudo swapon -s:

Filename                Type        Size    Used    Priority
/dev/mapper/cryptswap1                  partition   9025532 0   -1

Output from sudo fdisk -l:

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x9d63ac84

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     2459647     1228800    7  HPFS/NTFS/exFAT
/dev/sda2         2459648   197836472    97688412+   7  HPFS/NTFS/exFAT
/dev/sda3       466890752   488395119    10752184    7  HPFS/NTFS/exFAT
/dev/sda4       197836798   466890751   134526977    5  Extended
/dev/sda5       197836800   448837631   125500416   83  Linux
/dev/sda6       448839680   466890751     9025536   82  Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/mapper/cryptswap1: 9242 MB, 9242148864 bytes
255 heads, 63 sectors/track, 1123 cylinders, total 18051072 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x951b7f53

Disk /dev/mapper/cryptswap1 doesn't contain a valid partition table
share|improve this question
2  
Have a look at this - help.ubuntu.com/community/EnableHibernateWithEncryptedSwap –  Elfy Jun 23 '12 at 10:03
    
Thanks, Elfy. It's fixed. –  Kayla Jun 23 '12 at 11:56
1  
@Kayla,@Elfy : Can you elaborate the comment as an answer? –  IgnitE Feb 17 '13 at 8:36

1 Answer 1

It looks as though you are using encrypted swap because of the "cryptswap1." A random access key is generated on suspend to access encrypted swap upon resume. Sometimes this random key is lost in the system. I would suggest creating a passphrase that you will need to enter manually upon resume. This will show you step by step how to create an encrypted swap partition and set it's pass phrase.

http://ubuntulinuxknowhow.blogspot.com/2013/02/make-ubuntu-1204-recognize-encrypted.html

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.