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.

Recently ran through EnableHibernateWithEncryptedSwap and ran the following command: swapon --all --verbose and received: 'read swap header failed: Invalid argument'

How do I fix this? Here's some more pertinent output...

Output of sudo fdisk -l:

Disk /dev/sda: 80.0 GB, 80026361856 bytes 
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 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: 0x00006d20 

   Device Boot      Start         End      Blocks   Id  System 
/dev/sda1   *        2048      499711      248832   83  Linux 
/dev/sda2          501758   156301311    77899777    5  Extended 
/dev/sda5          501760   156301311    77899776   8e  Linux LVM 

Disk /dev/mapper/ubuntu--t10194-root: 75.5 GB, 75539415040 bytes 
255 heads, 63 sectors/track, 9183 cylinders, total 147537920 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: 0x00000000 

Disk /dev/mapper/ubuntu--t10194-root doesn't contain a valid partition table 

Disk /dev/mapper/ubuntu--t10194-swap_1: 4227 MB, 4227858432 bytes 
255 heads, 63 sectors/track, 514 cylinders, total 8257536 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: 0x08040000 

Disk /dev/mapper/ubuntu--t10194-swap_1 doesn't contain a valid partition table 

Disk /dev/mapper/cryptswap1: 4225 MB, 4225761280 bytes 
255 heads, 63 sectors/track, 513 cylinders, total 8253440 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: 0xd2236983 

Disk /dev/mapper/cryptswap1 doesn't contain a valid partition table 

Thanks for any and ALL help!

share|improve this question
    
Thanks for the edit, Mitch! –  user66088 Aug 13 '12 at 19:33

1 Answer 1

Pretty simple fix actually. Looks like you haven't made cryptswap1 into a swap partition yet.

mkfs.swap /dev/mapper/cryptswap1

Then you will be able to initialize it:

swapon /dev/mapper/cryptswap1

Now finish the instructions.

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.