Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
IT Nachrichten22. September(22.09.2026 um 00:05 Uhr)
IT NachrichtenLizenzprobleme: AnyDesk und TeamViewer(22.09.2026 um 00:30 Uhr)
Apple iOS & macOSApple's iOS 27.2 beta 2 reveals new anti-snatching protections(22.09.2026 um 00:27 Uhr)
AI & KI NachrichtenUC Irvine to Study AI for Writing Instruction(21.09.2026 um 23:31 Uhr)
AI & KI NachrichtenBurnham to call for global effort to control threats posed by AI(21.09.2026 um 23:30 Uhr)
IT Nachrichten22. September(22.09.2026 um 00:05 Uhr)
IT NachrichtenLizenzprobleme: AnyDesk und TeamViewer(22.09.2026 um 00:30 Uhr)
Apple iOS & macOSApple's iOS 27.2 beta 2 reveals new anti-snatching protections(22.09.2026 um 00:27 Uhr)
AI & KI NachrichtenUC Irvine to Study AI for Writing Instruction(21.09.2026 um 23:31 Uhr)
AI & KI NachrichtenBurnham to call for global effort to control threats posed by AI(21.09.2026 um 23:30 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Unlocking LUKS Volume with TPM2 - How To

Unlocking LUKS Volumes with TPM2 Unlocking your LUKS volume with a Trusted Platform Module 2.0 (TPM2) provides a secure way to enable automatic decryption during boot, usually eliminating the need to type a passphrase unless the system…

0
↗ Quelle (reddit.com)
Reagiere als Erste:r — dein Feedback zählt!

Unlocking LUKS Volumes with TPM2


Unlocking your LUKS volume with a Trusted Platform Module 2.0 (TPM2) provides a secure way to enable automatic decryption during boot, usually eliminating the need to type a passphrase unless the system state changes.

The most common and recommended way to achieve this on modern Linux systems, especially those using LUKS2 and systemd, is by using the systemd-cryptenroll tool.


Prerequisites:

  1. TPM2 Chip: Your computer must have an active TPM2 chip. Most modern hardware does, but you may need to enable in UEFI settings.
  2. LUKS2: Your encrypted volume must be using LUKS2 format.
    • You can check this with: cryptsetup luksDump /dev/your_device
    • If your block device is LUKS1 you may need to convert it. This is a high-risk operation, so back up your data first.
  3. Packages: Ensure you have the necessary packages installed.
    • systemd-cryptenroll
    • tpm2-tss
  4. Initramfs Support: Your system's initial ramdisk (initramfs) must be configured to include the necessary components to perform the unlock early in the boot process.
    • Initial ramdisk generated by tools like: dracut (Fedora/Arch) and mkinitcpio (Debian/Ubuntu)
    • tpm2-tss and sd-encrypt perform the unlock early in the boot process

Step-by-step Configuration

  1. Identify your LUKS device.
    • Find the partition or block device that contains your LUKS volume.
    • You can use lsblk or fdisk -l
    • Example: /dev/nvme0n1p3
  2. Enroll the TPM2 key.
    • The systemd-cryptenroll command adds a new random key to one of your LUKS key slots and seals it with the TPM2, binding it to a set of Platform Configuration Registers (PCRs).
    • The PCRs record a cryptographic hash of the boot-time state (firmware, bootloader, kernel, etc.).
    • If an attacker alters the boot chain, the PCR values change, and the key will not be released.
    • Run the enrollment command as root. Replace /dev/your_device with your actual device path. Bash sudo systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0+7 /dev/your_device
    • --tpm2-device=auto: Automatically detects the TPM2 device.
    • --tpm2-pcrs=0+7: Specifies the PCRs to bind to.
      • PCR 0 typically covers the firmware/BIOS.
      • PCR 7 covers the Secure Boot state.
    • When prompted, enter an existing passphrase for your LUKS volume to authorize the new key slot.
  3. Configure crypttab

    • Edit the /etc/crypttab file to tell the boot process to use the TPM2 device.
    • Find the line for your LUKS volume and append tpm2-device=auto to the options field (the fourth column).

      Before (Example): Bash luks-UUID-HERE UUID=... none luks
      After (Example): Bash luks-UUID-HERE UUID=... none luks,tpm2-device=auto

    • If your encrypted volume contains the root filesystem, you might need to add this option to the kernel command line in your bootloader configuration using a format like rd.luks.options=tpm2-device=auto.

      1. Open /etc/default/grub with a text editor as a superuser. (e.g., using nano or vim) Bash sudo nano /etc/default/grub
      2. Find the line that starts with GRUB_CMDLINE_LINUX_DEFAULT or GRUB_CMDLINE_LINUX.
      3. Append the new option inside the quotation marks, separated by a space from any existing parameters:

        Example (If you only use this option): Bash GRUB_CMDLINE_LINUX="rd.luks.options=tpm2-device=auto" Example (If other options already exist): Bash GRUB_CMDLINE_LINUX="quiet splash rd.luks.options=tpm2-device=auto" Note: Some distributions may require a separate option for the UUID, such as rd.luks.options=UUID-OF-YOUR-LUKS-PARTITION=tpm2-device=auto. Check your distribution's documentation for the exact syntax if the simpler option above doesn't work. I needed to use this syntax on Fedora 42.

      4. Save and close the /etc/default/grub file.

      5. Update the GRUB configuration.

        • The change you made in /etc/default/grub will not take effect until you regenerate the main GRUB configuration file, which is usually located at /boot/grub2/grub.cfg.
        • Run the appropriate command for your distribution:
          • For Debian/Ubuntu use update-grub: Bash sudo update-grub
          • For Fedora/Arch use grub2-mkconfig: Bash sudo grub2-mkconfig -o /boot/grub/grub.cfg
  4. Regenerate the initramfs.

    • The boot unlocking happens in the early boot stage (initramfs/initrd), so you must rebuild it to include the new configuration and the necessary TPM modules.
      • For Fedora/RHEL/Arch use dracut command: Bash sudo dracut -f
      • For Debian/Ubuntu systems use mkinitcpio command: Bash sudo mkinitcpio -P --- ## Important Notes
  • Backup a key: Always keep at least one regular passphrase or a recovery key for your LUKS volume as a backup. If the TPM fails, the UEFI is updated, or your boot configuration changes in a way that alters the PCR values, the TPM will not release the key.
    • To enroll a recovery key: sudo systemd-cryptenroll --recovery-key /dev/your_device
  • Wiping the slot: If you update your firmware, kernel, or bootloader and the automatic unlock stops working, you will need to use your backup passphrase and then wipe and re-enroll the TPM key. ```Bash sudo systemd-cryptenroll --wipe-slot=tpm2 --tpm2-device=auto --tpm2-pcrs=0+7 /dev/your_device

    sudo dracut -f # or mkinitcpio -P ```

  • Security: This method trades a bit of security for convenience. If an attacker can physically access your machine and modify the non-encrypted boot partition (but not the sealed PCRs), certain "Evil Maid" attacks might be possible.

    • Using a TPM PIN in addition to the PCRs can mitigate some of these risks. This can be done by using the flag --tpm2-with-pin=yes with the enrollment command.

      Example: Bash sudo systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0+7 --tpm2-with-pin=yes /dev/your_device

submitted by /u/benhaube
[link] [comments]
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Unlocking LUKS Volume with TPM2 - How To

Thematisch verwandte Begriffe: Unlocking, LUKS, Volume, with · 6 Treffer

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-49449 | Joplin is an open source note-taking and to-do application that organise…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick