Debian telepítése EFI rendszeren, teljes titkosított lemez, Software RAID, LUKS, GRUB kititkosítás, jelszó kérés egyszer, boot képernyő meghagyása.

  1. netinst CD kép letöltése (current: 10.3.0)
  2. CD kép USB pendrive-ra írása1
    dd bs=4M if=path/to/debian-10.3.0-amd64-netinst.iso of=/dev/sdx status=progress oflag=sync
    
  3. Telepítés, extrák:
    • ESP partíció, 550 MB
    • Software RAID
    • Encrypted volume (dm-crypt)
      • LUKS1 !!!
      • GRUB
        • /etc/default/grub
          • GRUB_ENABLE_CRYPTODISK=y
          • grub-install –target=x86_64-efi –efi-directory=/boot/efi
            mkdir /root/secrets && chmod 700 /root/secrets
            head -c 64 /dev/urandom > /root/secrets/crypto_keyfile.bin && chmod 600 /root/secrets/crypto_keyfile.bin
            cryptsetup -v luksAddKey -i 1 /dev/<DEVICE> /root/secrets/crypto_keyfile.bin
            
      • /etc/crypttab
        cat /etc/crypttab
        md1_crypt UUID=eadf8510-d1cb-4c26-98e1-724db26e68d5 none luks,discard
        # change to
        md1_crypt UUID=eadf8510-d1cb-4c26-98e1-724db26e68d5 /root/secrets/crypto_keyfile.bin luks,discard,key-slot=1
        echo "KEYFILE_PATTERN=\"/root/secrets/crypto_keyfile.bin\"" >> /etc/cryptsetup-initramfs/conf-hook
        echo "UMASK=0077" >> /etc/initramfs-tools/initramfs.conf
        update-initramfs -u
        
    • LVM
  4. GRUB config módosítása
    • /etc/default/grub
      • GRUB_CMDLINE_LINUX_DEFAULT=”quiet” quiet törlése
      • update-grub2 parancs futtatása
    • noclear.conf létrehozás
      mkdir -p /etc/systemd/system/getty@tty1.service.d/
      cd /etc/systemd/system/getty@tty1.service.d/
      cat <<EOF >noclear.conf
      [Service]
      TTYVTDisallocate=no
      EOF
      

Docker telepítés