web-dev-qa-db-fra.com

swapon --all --verbose: 'échec de lecture d'en-tête d'échange: argument invalide'

Récemment exécuté à travers EnableHibernateWithEncryptedSwap et a exécuté la commande suivante: swapon --all --verbose et reçu: "Échec de lecture de l'en-tête d'échange: argument incorrect"

Comment puis-je réparer ça? Voici quelques résultats plus pertinents ...

Sortie de 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 

Merci pour toute aide!

3
user66088

Solution assez simple en fait. On dirait que vous n'avez pas encore transformé cryptswap1 en partition de swap.

mkfs.swap/dev/mapper/cryptswap1

Ensuite, vous pourrez l'initialiser:

swapon/dev/mapper/cryptswap1

Maintenant, terminez les instructions.

1
Cain