Instalar en un disco cifrado

Éste manual describe como instalar Trisquel en un disco duro cifrado:

  • swap se cifrará.
  • root (/) se cifrará.
  • boot (/boot) no puede ser cifrado pero podría estar en una llave USB o en un CD no regrabable (no incluidos aquí).

Instrucciones

  • Arranca el LiveCD
  • Conecta Internet usando NetworkManager (se encuentra en el lado derecho del Panel).
  • Abre la terminal y conviértete en root:

sudo su
  • Instala cryptsetup y gparted:

apt-get update
apt-get install gparted
apt-get install cryptsetup
  • Lanza gparted y particiona tu disco duro como lo harías normalmente (creando el sistema de archivos en la partición, etc...) creando particiones válidos sin cifrar.
  • Utilice la Wikipedia para hallar un buen bloque de cifrado. Un ejemplo es AES, xts, essiv:256.
  • Carga los módulos de cifrado que escogiste:

modprobe xts
modprobe aes_i586
modprobe sha256
Nota: aes_i586 es una versión optimizada de aes para los procesadores i586 o posteriores.
  • Formatea la partición que escogiste para root(/) con cryptsetup:

cryptsetup -y --cipher aes-xts-essiv:sha256 --key-size 512 luksFormat /dev/PARTITION
  • Reemplace /dev/PARTITION por su partición. Se sobrescribirán todos los datos de la partición.
  • Abre la partición (reemplazar /dev/PARTITION es necesario):

cryptsetup luksOpen /dev/PARTITION crypto_root
  • Formatee la partición usando el sistema de archivos que desee (preferentemente ext, o XFS si no te importa que las particiones no se puedan reducir en XFS):

mkfs.ext4 /dev/mapper/crypto_root
  • Ejecuta el instalador de Trisquel y ve al paso 4, particionamiento del disco duro.
  • Selecciona el particionamiento manual, a continuación selecciona tu partición root (/) /dev/mapper/crypto_root
  • Selecciona tus particiones swap y /boot de la misma manera.
  • Tenga cuidado de no volver a crear la tabla de particiones.
  • Continua con la instalación. Cuando ésta termina, elije seguir probando Trisquel. No reiniciar.
  • Monta tu partición root y chroot con ésto:

mkdir /mnt/root
mount /dev/mapper/crypto_root /mnt/root
mount /dev/ /mnt/root/dev -o bind
chroot /mnt/root mount /proc
chroot /mnt/root mount /sys
chroot /mnt/root
  • Crea el /etc/crypttab (reemplazar /dev/PARTITION es necesario):

echo "root /dev/disk/by-uuid/$(blkid -o value -s UUID /dev/PARTITION) none luks" >> /etc/crypttab
  • Agrega los módulos de cifrado que elegiste antes de /etc/modules para que sean cargados en el arranque e inclúyelos en el initd:

echo xts >> /etc/initramfs-tools/modules
echo aes_i586 >> /etc/initramfs-tools/modules
echo sha256 >> /etc/initramfs-tools/modules
  • Instala cryptsetup:

apt-get update
apt-get install cryptsetup
  • Reconstruye el initrd:

mount /boot
update-initramfs -u
  • Sal del chroot y desmonta todo:

exit
umount /mnt/root/boot
umount /mnt/root/proc
umount /mnt/root/dev
umount /mnt/root/sys
  • Finalmente, reinicia Trisquel. Te preguntará por tu contraseña del disco duro cifrado.

EN EDICION EN EDICION EN EDICION EN EDICION EN EDICION

NOTA: Este manual describe los pasos para instalar Trisquel GNU/Linux en un LVM cifrado. El objetivo es mejorar la seguridad del usuario y proteger tus datos a salvo de miradas indiscretas. Las capturas de pantallas son de la version inglesa del instalador.

Empezando por el principio

  • Arranca el liveCD y desde el menu de instalacion selecciona "Instalar Trisquel en modo texto"

Encrypted_Install_01.png

  • Selecciona un idioma.

Encrypted_Install_02.png

  • Selecciona tu localización geográfica.

Encrypted_Install_03.png

  • Decide si quieres que el instalador detecte tu teclado.

Encrypted_Install_04.png

  • Escoge el país y el tipo de teclado.

Encrypted_Install_05.png

  • Selecciona la distribución de tu teclado.

Encrypted_Install_06.png

  • Escoge un nombre para tu computadora.

Encrypted_Install_07.png

  • Elije tu país o un lugar cercano.

Encrypted_Install_08.png

  • Selecciona un servidor espejo de Trisquel.

Encrypted_Install_09.png

  • Si necesitas configurar un proxy para conectarte a internet, aquí es donde debes introducir los datos.

Encrypted_Install_10.png

  • Asegúrate que el instalador detecta tu zona horario correctamente.

Encrypted_Install_11.png

  • Escoge la opción "Guiado - Usa el disco entero y usa un LVM cifrado".

Encrypted_Install_12.png

  • Selecciona el disco para instalar Trisquel.

Encrypted_Install_13.png

  • Confirm that you are willing to write the changes to disk and configure the LVM.

Encrypted_Install_14.png

  • Enter an encryption passphrase.

Encrypted_Install_15.png

  • Resubmit the passphrase to verify it.

Encrypted_Install_16.png

  • Choose the amount of the volume group to use for guided partitioning.

Encrypted_Install_17.png

  • Confirm that you want to write changes to the disk.

Encrypted_Install_18.png

  • Select a kernel to install.

Encrypted_Install_19.png

  • Enter the full name for the use account that will be created.

Encrypted_Install_20.png

  • Choose a username for the user account.

Encrypted_Install_21.png

  • Choose a password for the user.

Encrypted_Install_22.png

  • Re-enter the password to verify it.

Encrypted_Install_23.png

  • Choose if you want to also encrypt your home directory. This can be useful for a computer with multiple users even if the LVM itself is encrypted.

Encrypted_Install_24.png

  • Decide how you want to manage upgrades on your system.

Encrypted_Install_25.png

  • Choose the software sets you want to install. For this tutorial we will be installing the default Trisquel desktop environment.

Encrypted_Install_26.png

  • Select continue to continue software configuration.

Encrypted_Install_27.png

  • Configure postfix (if you wish to have an email server).

Encrypted_Install_28.png

  • Decide if you want to install the GRUB boot loader to the master boot record.

Encrypted_Install_29.png

  • Select if your system clock is set to UTC.

Encrypted_Install_30.png

  • Remove the boot media (e.g. Trisquel CD) and press continue to reboot.

Encrypted_Install_31.png

  • Enter your encryption passphrase to decrypt the LVM.

Encrypted_Install_32.png

  • Login with your user credentials to enter your Trisquel GNU/Linux system.

Encrypted_Install_33.png

Additional Information

  • The steps outlines for this example system may differ based on your needs. For example if you live in Spain you should not select that you live in the United States.
  • For instructions on how to accomplish this via terminal see the corresponding manual.

Revisiones

01/23/2011 - 05:21
Herion
10/18/2011 - 18:17
anonymous
01/17/2014 - 02:33
ljpaez