From 417e63279d838cc6f8c17e63f2134a01e4bba403 Mon Sep 17 00:00:00 2001 From: George Mileka Date: Fri, 20 Dec 2024 15:45:12 -0800 Subject: [PATCH] Working --- .../pkg/imagecustomizerlib/grubcfgutils.go | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/toolkit/tools/pkg/imagecustomizerlib/grubcfgutils.go b/toolkit/tools/pkg/imagecustomizerlib/grubcfgutils.go index f6886a985..b44c0ec84 100644 --- a/toolkit/tools/pkg/imagecustomizerlib/grubcfgutils.go +++ b/toolkit/tools/pkg/imagecustomizerlib/grubcfgutils.go @@ -817,16 +817,17 @@ func regenerateInitrd(imageChroot *safechroot.Chroot) error { err := imageChroot.UnsafeRun(func() error { // The 'mkinitrd' command was removed in Azure Linux 3.0 in favor of using 'dracut' directly. - mkinitrdExists, err := file.CommandExists("mkinitrd") - if err != nil { - return fmt.Errorf("failed to search for mkinitrd command:\n%w", err) - } - - if mkinitrdExists { - return shell.ExecuteLiveWithErr(1, "mkinitrd") - } else { - return shell.ExecuteLiveWithErr(1, "dracut", "--force", "--regenerate-all") - } + // mkinitrdExists, err := file.CommandExists("mkinitrd") + // if err != nil { + // return fmt.Errorf("failed to search for mkinitrd command:\n%w", err) + // } + + // if mkinitrdExists { + // return shell.ExecuteLiveWithErr(1, "mkinitrd") + // } else { + return shell.ExecuteLiveWithErr(1, "dracut", "--force", "--regenerate-all", + "--include", "/usr/lib/locale", "/usr/lib/locale") + // } }) if err != nil { return fmt.Errorf("failed to rebuild initramfs file:\n%w", err)