bootdeploy: fallback to vmlinuz* kernels when zboot is set (MR 47)
Some kernel packages (e.g. linux-lts in Alpine) don't ship linux.efi, so this needs to fallback to "vmlinuz" or else it won't be able to find a kernel for boot-deploy.
This commit is contained in:
@@ -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))
|
||||
|
Reference in New Issue
Block a user