Skip to content

Commit

Permalink
kexec-sign-config: mount rw, write things to /boot, mount ro after
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Laurion <[email protected]>
  • Loading branch information
tlaurion committed Dec 5, 2024
1 parent 444ff3e commit 835b7ac
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions initrd/bin/kexec-sign-config
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ assert_signable

confirm_gpg_card

# remount /boot as rw
mount -o remount,rw /boot

# update hashes in /boot before signing
if [ "$update" = "y" ]; then
(
Expand Down Expand Up @@ -81,8 +84,15 @@ for tries in 1 2 3; do
; then
# successful - update the validated params
check_config $paramsdir

# remount /boot as ro
mount -o remount,ro /boot

exit 0
fi
done

# remount /boot as ro
mount -o remount,ro /boot

die "$paramsdir: Unable to sign kexec hashes"

0 comments on commit 835b7ac

Please sign in to comment.