Secure Boot Investigation Playbook

A firmware engineer playbook for Secure Boot failures involving PK, KEK, db, dbx, SetupMode, signatures, and EFI_SECURITY_VIOLATION.

2 min read
Shell & Firmware Tools cover

An EFI application runs on one machine but fails on another.

The only clue is EFI_SECURITY_VIOLATION or a silent return to the boot menu.

Do not start by resigning everything. First, classify Secure Boot state.

01 Mode

Check SecureBoot and SetupMode

A platform can have SecureBoot disabled, enabled, or be in setup mode depending on PK state.

02 Keys

Check PK and KEK

PK controls platform owner state. KEK authorizes updates to signature databases.

03 DB

Check allowed signatures

db contains trusted certificates or hashes.

04 DBX

Check revoked signatures

dbx can block an image even when it otherwise looks trusted.

05 Image

Check the EFI binary signature

Verify whether the image is signed, by whom, and whether the chain matches db.

06 BDS

Check boot path and error handling

Confirm whether BDS logs EFI_SECURITY_VIOLATION, skips the option, or falls back.

Secure Boot investigation path

Shell checks

Shell> dmpstore SecureBoot
Shell> dmpstore SetupMode
Shell> dmpstore PK
Shell> dmpstore KEK
Shell> dmpstore db
Shell> dmpstore dbx

Symptom map

Item Value Note
SecureBoot=0 Policy disabled Signature enforcement may not be active even if keys exist.
SetupMode=1 No platform key enrolled Platform is in setup mode; key enrollment state matters.
PK missing No platform owner key Usually means setup mode, not normal user mode.
Image unsigned Expected block when enforcement active Needs signing or policy change.
Hash/cert in dbx Revoked image dbx can override an otherwise trusted chain.
EFI_SECURITY_VIOLATION Authentication failed Check image signature, db/dbx, and BDS error handling.

Debug Diary: USB boot works only after disabling Secure Boot

dmpstore SecureBoot: 1
SetupMode: 0
PK/KEK/db present
USB loader unsigned
BDS returns EFI_SECURITY_VIOLATION
Root cause: expected policy block, not storage failure

Now the fix is clear: sign the loader with a trusted key, enroll the right key, use a trusted loader, or change platform policy for the target use case.

Found this useful?

Save it or share it with someone learning firmware, BIOS/UEFI, and embedded systems.

Nội dung liên quan

Một số bài viết, ghi chú hoặc project có liên quan đến nội dung bạn vừa đọc.

Biến note thành bài viết hoàn chỉnh

Notes là nơi ghi nhanh khái niệm.