diff --git a/e2e/e2e_test.go b/e2e/e2e_test.go index dbcf0e1..67d37f5 100644 --- a/e2e/e2e_test.go +++ b/e2e/e2e_test.go @@ -117,6 +117,9 @@ imgs: defer os.RemoveAll(dir) for _, img := range testImgs { + if strings.Contains(img.name, "centos") && tt.efi { + t.Skip("efi not supported for CentOS") + } t.Run(img.name, func(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/grub.go b/grub.go index da20edd..239a3b5 100644 --- a/grub.go +++ b/grub.go @@ -58,6 +58,9 @@ type grubProvider struct { } func (g grubProvider) New(c Config, r OSRelease) (Bootloader, error) { + if r.ID == ReleaseCentOS { + return nil, fmt.Errorf("grub (efi) is not supported for CentOS, use grub-bios instead") + } return grub{grubCommon: newGrubCommon(c, r)}, nil } diff --git a/grub_efi.go b/grub_efi.go index 75bd43a..e27c975 100644 --- a/grub_efi.go +++ b/grub_efi.go @@ -55,6 +55,9 @@ type grubEFIProvider struct { } func (g grubEFIProvider) New(c Config, r OSRelease) (Bootloader, error) { + if r.ID == ReleaseCentOS { + return nil, fmt.Errorf("grub-efi is not supported for CentOS, use grub-bios instead") + } return grubEFI{grubCommon: newGrubCommon(c, r)}, nil }