diff --git a/internal/bootdeploy/bootdeploy.go b/internal/bootdeploy/bootdeploy.go index 593c696..d91d2b2 100644 --- a/internal/bootdeploy/bootdeploy.go +++ b/internal/bootdeploy/bootdeploy.go @@ -95,13 +95,16 @@ func (b *BootDeploy) Run() error { } func getKernelPath(outDir string, zboot bool) ([]string, error) { - kernFile := "vmlinuz*" - + var kernels []string if zboot { - kernFile = "linux.efi" + kernels, _ = filepath.Glob(filepath.Join(outDir, "linux.efi")) + if len(kernels) > 0 { + return kernels, nil + } + // else fallback to vmlinuz* below } - var kernels []string + kernFile := "vmlinuz*" kernels, _ = filepath.Glob(filepath.Join(outDir, kernFile)) if len(kernels) == 0 { return nil, errors.New("Unable to find any kernels at " + filepath.Join(outDir, kernFile))