Skip to content

Commit

Permalink
Workaround for Trusted boot Fedora kernel
Browse files Browse the repository at this point in the history
Signed-off-by: Itxaka <[email protected]>
  • Loading branch information
Itxaka committed Jan 30, 2025
1 parent e5289e4 commit ff3d061
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/stages/stages.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,15 @@ func GetKernelStage(_ values.System, logger types.KairosLogger) ([]schema.Stage,
fmt.Sprintf("rm /boot/vmlinux-%s", kernel),
},
},
{ // On Fedora, if we dont have grub2 installed, it wont copy the kernel and rename it to the /boot dir, so we need to do it manually
// TODO: Check if this is needed on AlmaLinux/RockyLinux/RedHatLinux
Name: "Copy kernel for Fedora Trusted Boot",
OnlyIfOs: "Fedora.*",
If: fmt.Sprintf("test ! -f /boot/vmlinuz-%s && test -f /usr/lib/modules/%s/vmlinuz", kernel, kernel),
Commands: []string{
fmt.Sprintf("cp /usr/lib/modules/%s/vmlinuz /boot/vmlinuz-%s", kernel, kernel),
},
},
{
Name: "Link kernel",
If: fmt.Sprintf("test -f /boot/vmlinuz-%s", kernel),
Expand Down

0 comments on commit ff3d061

Please sign in to comment.