Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TPM2 LUKS setup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Robotka István Adrián
TPM2 LUKS setup
Commits
923d8132
Verified
Commit
923d8132
authored
Aug 5, 2020
by
Robotka István Adrián
Browse files
Options
Downloads
Patches
Plain Diff
fix initramfs-hook
parent
b42ebd59
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+2
-1
2 additions, 1 deletion
README.md
initramfs-hook
+2
-2
2 additions, 2 deletions
initramfs-hook
passphrase-from-tpm
+2
-2
2 additions, 2 deletions
passphrase-from-tpm
with
6 additions
and
5 deletions
README.md
+
2
−
1
View file @
923d8132
...
@@ -7,7 +7,8 @@ Source: https://threat.tevora.com/secure-boot-tpm-2/
...
@@ -7,7 +7,8 @@ Source: https://threat.tevora.com/secure-boot-tpm-2/
DO NOT COPY IN ONE!!!
DO NOT COPY IN ONE!!!
```
sh
```
sh
sudo
apt
install
tpm2-tools
sudo
apt
install
tpm2-tools
# if you want
#tpm2_clear
./setup-tpm.sh
./setup-tpm.sh
sudo cp
passphrase-from-tpm /usr/local/bin/passphrase-from-tpm
sudo cp
passphrase-from-tpm /usr/local/bin/passphrase-from-tpm
...
...
This diff is collapsed.
Click to expand it.
initramfs-hook
+
2
−
2
View file @
923d8132
...
@@ -5,5 +5,5 @@
...
@@ -5,5 +5,5 @@
if
[
"
$1
"
=
"prereqs"
]
;
then
exit
0
;
fi
if
[
"
$1
"
=
"prereqs"
]
;
then
exit
0
;
fi
.
/usr/share/initramfs-tools/hook-functions
.
/usr/share/initramfs-tools/hook-functions
copy_exec /usr/
local/
bin/tpm2_unseal
copy_exec /usr/bin/tpm2_unseal
copy_exec /
usr/local/lib
/libtss2-tcti-device.so
copy_exec /
lib/x86_64-linux-gnu
/libtss2-tcti-device.so
.0
This diff is collapsed.
Click to expand it.
passphrase-from-tpm
+
2
−
2
View file @
923d8132
...
@@ -12,7 +12,7 @@ user_pass() {
...
@@ -12,7 +12,7 @@ user_pass() {
}
}
tpm_pass
()
{
tpm_pass
()
{
/usr/
local/
bin/tpm2_unseal
\
/usr/bin/tpm2_unseal
\
--object-context
0x81000000
\
--object-context
0x81000000
\
--auth
pcr:sha256:0,5,7
\
--auth
pcr:sha256:0,5,7
\
|
tr
-d
'\n'
|
tr
-d
'\n'
...
@@ -25,5 +25,5 @@ else
...
@@ -25,5 +25,5 @@ else
echo
"Unlocking via TPM"
>
&2
echo
"Unlocking via TPM"
>
&2
tpm_pass
tpm_pass
[
$?
-eq
0
]
&&
exit
# successful TPM unseal
[
$?
-eq
0
]
&&
exit
# successful TPM unseal
user
+
pass
user
_
pass
fi
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment