Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions system_files/bluefin/usr/share/ublue-os/just/system.just
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,35 @@ alias rollback-helper := rebase-helper
[group('System')]
rebase-helper:
@/usr/bin/ublue-rollback-helper

# Check Secure Boot status and key enrollment
[group('System')]
check-sb-key:
#!/usr/bin/bash
echo "== Secure Boot Status =="
if [ -d /sys/firmware/efi ]; then
if command -v mokutil &> /dev/null; then
mokutil --sb-state
else
echo "mokutil not available — checking EFI vars..."
if [ -f /sys/firmware/efi/efivars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c ]; then
SB=$(od -An -t u1 /sys/firmware/efi/efivars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c | awk '{print $NF}')
[ "$SB" = "1" ] && echo "SecureBoot is enabled" || echo "SecureBoot is disabled"
else
echo "Cannot determine Secure Boot status"
fi
fi
echo ""
echo "== Machine Owner Key (MOK) Status =="
if command -v mokutil &> /dev/null; then
mokutil --list-enrolled 2>/dev/null | head -6 || echo "No MOK keys enrolled or mokutil requires sudo"
fi
echo ""
echo "== Kernel Signature =="
uname -r
if command -v sbverify &> /dev/null; then
sbverify --list /boot/vmlinuz-$(uname -r) 2>/dev/null || echo "sbverify not available (install sbsigntools)"
fi
Comment thread
hanthor marked this conversation as resolved.
else
echo "Not an EFI system — Secure Boot does not apply."
fi
Loading