Skip to content

Commit

Permalink
initrd/bin/kexec-save-default: remove mount-usb --mode rw and dmesg.t…
Browse files Browse the repository at this point in the history
…xt output to usb thumb drive

Really handy btw. Would be nice to add that into sysrq magic to output to usb thumb drive and have ctrl-alt-delete output dmesg to external storage when in debug mode. Would work also for headless debug when porting

TODO: squash allrelated commits together.

Signed-off-by: Thierry Laurion <[email protected]>
  • Loading branch information
tlaurion committed Jan 19, 2024
1 parent 30e52ef commit e33af25
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 32 deletions.
6 changes: 0 additions & 6 deletions initrd/bin/kexec-save-default
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,6 @@ if [ "$CONFIG_TPM" = "y" ] && [ "$CONFIG_TPM_NO_LUKS_DISK_UNLOCK" != "y" ] && [
save_key_params+=("${key_devices[*]}")
fi
#TODO REMOVE THIS TROUBLESHOOTING HACK
DEBUG "Outputting logs to USB drive. Please wait..."
mount-usb --mode rw
dmesg >/media/dmesg.txt
DEBUG "Done. You can CTRL-Alt-Delete now to reboot, files will be synced to USB drive before rebooting"
kexec-save-key "${save_key_params[@]}" ||
die "Failed to save the TPM Disk Unlock Key"
fi
Expand Down
2 changes: 1 addition & 1 deletion initrd/bin/kexec-seal-key
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ for dev in $(cat "$KEY_DEVICES" | cut -d\ -f1); do
$dev 1 ||
warn "$dev: removal of TPM Disk Unlock Key in LUKS slot 1 failed: might not exist. Continuing"

echo "++++++ $dev: Adding TPM DISK Unlock Key to LUKS slot 1"
echo "++++++ $dev: Adding TPM Disk Unlock Key to LUKS slot 1"
cryptsetup luksAddKey \
--key-file "$RECOVERY_KEY" \
--key-slot 1 \
Expand Down
25 changes: 0 additions & 25 deletions prompt

This file was deleted.

0 comments on commit e33af25

Please sign in to comment.