Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image.Load tries using system xz binary #2750

Open
navidpaya opened this issue Aug 28, 2023 · 0 comments
Open

image.Load tries using system xz binary #2750

navidpaya opened this issue Aug 28, 2023 · 0 comments
Labels
Feature Request Feature Request

Comments

@navidpaya
Copy link

Is your feature request related to a problem? Please describe.

I have this code to use kexec to install the latest version of my image on machines that are outdated.

func loadImage(image *boot.LinuxImage, verbose bool) error {
	err := image.Load(boot.WithVerbose(verbose))
	if err != nil {
		log.Printf("Failed to load kernel: %v. Retrying with LoadSyscall=true.", err)
		image.LoadSyscall = true
		err = image.Load(boot.WithVerbose(verbose))
	}
	if err != nil {
		return fmt.Errorf("Kexec load of %v failed: %v", image.Label(), err)
	}
	return nil
}

The reason I have the Load bit twice is that some of the machines have a kernel that's compiled without the CONFIG_KEXEC_FILE flag.

I'm hitting this error on some machines:

Failed to load image: Kexec load of Installer failed: parsing bzImage Linux kernel: error decompressing payload: error starting decompressor: exec: "unxz": executable file not found in $PATH

Is there a way to bundle the needed libraries into u-root itself instead of relying on the machine having this binary?

Describe the solution you'd like
The needed libraries would be bundled into u-root so that it doesn't have to shell out to the system.

@navidpaya navidpaya added the Feature Request Feature Request label Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Feature Request
Projects
None yet
Development

No branches or pull requests

1 participant