-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
overlay/15fcos: upgrade bootloader for Secure Boot-enabled systems
The 6.9 kernel won't boot on systems installed prior to F39, as the shim is too old. Add a systemd unit that updates the bootloader on those machines. Manually handle systems with mirrored ESPs. See also: coreos/fedora-coreos-tracker#1752 Fixes: fedora-silverblue/issue-tracker#543 Co-authored-by: Jonathan Lebon <jonathan@jlebon.com>
- Loading branch information
1 parent
7b89c45
commit 8dd5b81
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
overlay.d/15fcos/usr/lib/systemd/system/coreos-bootupctl-update-secureboot.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Remove after the next barrier release | ||
|
||
[Unit] | ||
Description=Update Bootloader for Secure Boot-enabled Systems | ||
Documentation=https://github.com/coreos/fedora-coreos-tracker/issues/1752 | ||
ConditionSecurity=uefi-secureboot | ||
|
||
# make sure to run after the aleph file is fixed | ||
# see https://github.com/coreos/fedora-coreos-tracker/issues/1724 | ||
After=coreos-fix-aleph-file.service | ||
Requires=coreos-fix-aleph-file.service | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/usr/libexec/coreos-update-bootloader | ||
RemainAfterExit=yes | ||
MountFlags=slave | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
# This script update the bootloader using bootupd | ||
# and also detect RAID-1 setups as those requires | ||
# extra steps | ||
|
||
if [ -e /dev/disk/by-label/EFI-SYSTEM ]; then | ||
echo "Found ESP; calling 'bootupctl update'" | ||
bootupctl update | ||
exit | ||
fi | ||
|
||
# handle RAID case manually since bootupd doesn't support it | ||
# https://github.com/coreos/bootupd/issues/132 | ||
i=1 | ||
while true; do | ||
if [ ! -e /dev/disk/by-label/esp-$i ]; then | ||
break | ||
fi | ||
echo "Found ESP (replica $i); updating" | ||
mount /dev/disk/by-label/esp-$i /boot/efi | ||
cp -rp /usr/lib/bootupd/updates/EFI /boot/efi | ||
umount /boot/efi | ||
i=$((i+1)) | ||
done | ||
sync |