Using TPM 2.0 to Protect Encrypted Storage on Raspberry Pi @LeonAnavi
Using TPM 2.0 to Protect Encrypted Storage on Raspberry Pi  @LeonAnavi
Uploaded September 2026 | Updated November 2026, 10 minutes ago
This guide walks you through setting up an encrypted data partition on Raspberry Pi OS Trixie and binding it to a TPM 2.0 for automatic unlocking. The tutorial uses a Raspberry Pi 5 with Raspberry Pi OS and the ANAVI TPM 2.0, a user-friendly add-on board for Raspberry Pi single-board computers that interfaces via SPI and is based on the Infineon OPTIGAโ„ข SLB 9672 TPM 2.0 chip. The steps include creating an ext4 data partition, enabling SPI and TPM kernel support, installing Cryptsetup, formatting the data partition with LUKS2, binding the encrypted volume to the TPM 2.0, and configuring automatic unlocking and mounting. The exact commands are available as part of ANAVI TPM 2.0 add-on board user's manual:
github.com/AnaviTechnology/anavi-docs/blob/main/anavi-tpm-20/anavi-tpm-20.md#encrypted-data-partition


๐Ÿ”— Useful Links
===
ANAVI SPI TPM 2.0 for Raspberry Pi (used in the video)
crowdsupply.com/anavi-technology/anavi-tpm-2-0-for-raspberry-pi
ANAVI SPI TPM 2.0 User's Manual
github.com/AnaviTechnology/anavi-docs/blob/main/anavi-tpm-20/anavi-tpm-20.md
ANAVI TPM 2.0 OSHWA UID BG000152
certification.oshwa.org/bg000152.html

ANAVI I2C TPM 2.0 for Raspberry Pi (if you prefer I2C over SPI for the TPM)
crowdsupply.com/anavi-technology/anavi-i2c-tpm-2-0


๐Ÿ“š Chapters
===
0:00 Intro
0:22 Hardware
1:31 Raspberry Pi OS
3:24 Data Partition
4:26 Enable SPI
6:56 DTBO
8:28 Verify
10:47 Encrypt
12:43 Bind
13:14 Automount
15:20 Test
18:21 Conclusions
Using TPM 2.0 to Protect Encrypted Storage on Raspberry PiRaspberry Pi 400 Teardown #raspberrypi #rpiOlimex STM32MP157 SoM and Evaluation Board for embedded Linux Research and Develoment #linux #stm32Unboxing Raspberry Pi Compute Module 5 IO Board SC1751 #raspberrypi #linuxCustom Meshtastic Firmware: Add I2C and BMP280 Sensor Telemetry on XIAO nRF52840 & Wio-SX1262NeoPixel WS2812B LED Panels with WLED and ESP32. Demo featuring XIAO ESP32C3 with 32-bit RISC-V CoreLenovo ThinkPad USB-C Dock type 40A9 #thinkpad #shorts
Leon Anavi |

Using TPM 2.0 to Protect Encrypted Storage on Raspberry Pi

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER