Partição SWAP na instalação criptografada do LVM sem montagem

0

Eu instalei o Ubuntu 14.04 e verifiquei a opção de partição criptografada do LVM, deixando o instalador fazer o seu trabalho com o comportamento padrão para ele. Quando eu iniciei a inicialização, houve uma reclamação durante a tela inicial, depois de colocar minha senha, que a partição SWAP não pôde ser montada, me dizendo para esperar, pressione S para ignorar ou pressione M para montar manualmente.

Esta é toda a informação que eu consegui reunir sobre isso:

vmatir@vmatir-X200MA:~$ sudo swapon -a
swapon: /dev/mapper/ubuntu--vg-swap_1: la lectura de la cabecera de intercambio falló: Argumento inválido
swapon: /dev/mapper/cryptswap1: stat falló: No existe el archivo o el directorio
vmatir@vmatir-X200MA:~$

/////////////////////////////////////
The first line says: the reading of the swap header failed: invalid argument
The second line says: stat failed: the file or directory doesn't exist
////////////////////////////////////

vmatir@vmatir-X200MA:~$ lsblk
NAME                           MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                              8:0    0 465,8G  0 disk  
├─sda1                           8:1    0   512M  0 part  /boot/efi
├─sda2                           8:2    0   244M  0 part  /boot
└─sda3                           8:3    0   465G  0 part  
  └─sda3_crypt (dm-0)          252:0    0   465G  0 crypt 
    ├─ubuntu--vg-root (dm-1)   252:1    0 463,1G  0 lvm   /
    └─ubuntu--vg-swap_1 (dm-2) 252:2    0   1,9G  0 lvm   
vmatir@vmatir-X200MA:~$ 

// swap_1 not mounting.

vmatir@vmatir-X200MA:~$ free -m
             total       usado       libre     compart.    búffers     almac.
Mem:          1888       1814         73        302         56        885
-/+ buffers/cache:        872       1015
Intercambio:          0          0          0
vmatir@vmatir-X200MA:~$ 

vmatir@vmatir-X200MA:~$ mountall -v
/ es local
/proc es virtual
/proc/sys/fs/binfmt_misc es virtual
/sys es virtual
/sys/fs/cgroup es virtual
/sys/fs/fuse/connections es virtual
/sys/kernel/debug es virtual
/sys/kernel/security es virtual
/sys/firmware/efi/efivars es virtual
/dev es virtual
/dev/pts es virtual
/tmp es local
/run es virtual
/run/lock es virtual
/run/shm es virtual
/run/user es virtual
/sys/fs/pstore es virtual
/boot es local
/boot/efi es local
/dev/mapper/ubuntu--vg-swap_1 es swap
/dev/mapper/cryptswap1 es swap
/sys/fs/cgroup/systemd es virtual
/home/vmatir es virtual
/run/user/1000/gvfs es local
mountall: No es posible escuchar conecciones privadas: Failed to bind socket "/com/ubuntu/mountall/server/": La dirección ya se está usando
mounting event sent for /tmp
mountall: Desconectado de Upstart
vmatir@vmatir-X200MA:~$ 

vmatir@vmatir-X200MA:~$ cat /etc/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>
/dev/mapper/ubuntu--vg-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda2 during installation
UUID=264a8a19-71da-4f00-b3f9-f90bd565b531 /boot           ext2    defaults        0       2
# /boot/efi was on /dev/sda1 during installation
UUID=D764-71B4  /boot/efi       vfat    defaults        0       1
/dev/mapper/ubuntu--vg-swap_1 none            swap    sw              0       0
/dev/mapper/cryptswap1 none swap sw 0 0
vmatir@vmatir-X200MA:~$ 

Eu realmente preciso que esta partição SWAP seja montada, já que este notebook tem apenas 1.8GB de RAM, e mal posso ver meus e-mails sem o PC congelar completamente.

    
por Víctor Matía Rodríguez 18.10.2015 / 13:35

1 resposta

0

Obrigado ao @Palantir, a correção estava em execução:     sudo mkswap / dev / mapeador / ubuntu - vg-swap_1

E comentando a última linha ou excluindo a última linha do / etc / fstab:

vmatir@vmatir-X200MA:~$ cat /etc/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>
/dev/mapper/ubuntu--vg-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda2 during installation
UUID=264a8a19-71da-4f00-b3f9-f90bd565b531 /boot           ext2    defaults        0       2
# /boot/efi was on /dev/sda1 during installation
UUID=D764-71B4  /boot/efi       vfat    defaults        0       1
/dev/mapper/ubuntu--vg-swap_1 none            swap    sw              0       0
vmatir@vmatir-X200MA:~$ 

E agora a partição swap é montada na inicialização:

vmatir@vmatir-X200MA:~$ free -m
             total       usado       libre     compart.    búffers     almac.
Mem:          1888       1619        268        201         57        781
-/+ buffers/cache:        780       1107
Intercambio:       1931          0       1931
vmatir@vmatir-X200MA:~$ lsblk
NAME                           MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                              8:0    0 465,8G  0 disk  
├─sda1                           8:1    0   512M  0 part  /boot/efi
├─sda2                           8:2    0   244M  0 part  /boot
└─sda3                           8:3    0   465G  0 part  
  └─sda3_crypt (dm-0)          252:0    0   465G  0 crypt 
    ├─ubuntu--vg-root (dm-1)   252:1    0 463,1G  0 lvm   /
    └─ubuntu--vg-swap_1 (dm-2) 252:2    0   1,9G  0 lvm   [SWAP]
vmatir@vmatir-X200MA:~$
    
por Víctor Matía Rodríguez 18.10.2015 / 17:27