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

Build fails with no useful error message when using iso-bios format on arm64 architecture #3930

Open
furious-luke opened this issue Jun 6, 2023 · 3 comments

Comments

@furious-luke
Copy link
Contributor

furious-luke commented Jun 6, 2023

Description

Building the "getty" example from the examples directory produces an error when specifying iso-bios as the format. I'm running on an Apple M2 Max, Ventura 13.3.1 (a). I've installed the latest version of Linuxkit via the go install command. Querying the version returns:

linuxkit version unknown
commit: unknown

Steps to reproduce the issue:

  • go install github.com/linuxkit/linuxkit/src/cmd/linuxkit@latest
  • Create a file getty.yml containing the contents of the LinuxKit reporsitory's examples/getty.yml.
  • linuxkit build -format iso-bios getty.yml

Describe the results you received:

Extract kernel image: docker.io/linuxkit/kernel:5.10.104
Add init containers:
Process init image: docker.io/linuxkit/init:14df799bb3b9e0eb0491da9fda7f32a108a2e2a5
Process init image: docker.io/linuxkit/runc:436357ce16dd663e24f595bcec26d5ae476c998e
Process init image: docker.io/linuxkit/containerd:eeb3aaf497c0b3f6c67f3a245d61ea5a568ca718
Process init image: docker.io/linuxkit/ca-certificates:4de36e93dc87f7ccebd20db616ed10d381911d32
Add onboot containers:
  Create OCI config for linuxkit/sysctl:e5959517fab7b44692ad63941eecf37486e73799
  Create OCI config for linuxkit/dhcpcd:2a8ed08fea442909ba10f950d458191ed3647115
Add service containers:
  Create OCI config for linuxkit/getty:06f34bce0facea79161566d67345c3ea49965437
  Create OCI config for linuxkit/rngd:331294919ba6d953d261a2694019b659a98535a4
Add files:
  etc/getty.shadow
Create outputs:
  getty.iso
FATA[0010] Error writing outputs: Error writing iso-bios output: docker pull linuxkit/mkimage-iso-bios:583857f93befadcc6d7dadca348bb862185e262b failed: exit status 1 output:

Describe the results you expected:

I would expect the correct ISO image to be produced without error.

Additional information you deem important (e.g. issue happens only occasionally):

This same command works as expected on my Arch Linux machine.

@deitch
Copy link
Collaborator

deitch commented Jun 9, 2023

I am guessing you are running on an M1 Mac or other arm64-based machine?

mkimage-iso-bios only works on amd64, restricted here, because of the dependency on syslinux, see here.

I get it; you should be able to target iso bios and cross-build from arm64; the tooling is the issue.

@furious-luke
Copy link
Contributor Author

Thanks for the reply @deitch, I appreciate it! Yeah, I would have expected to be able to produce an amd64 image regardless of the architecture of my host machine. I can work around for now by building images on a different machine.

@deitch
Copy link
Collaborator

deitch commented Jun 9, 2023

If you feel like figuring out how to make it work and open a PR, that would be great.

In the meantime, can you change the topic of this issue to reflect that building iso-bios doesn't work on arm64?

@furious-luke furious-luke changed the title Build fails with no useful error message when using iso-bios format Build fails with no useful error message when using iso-bios format on arm64 architecture Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants