Skip to content

Failed to build_image --board=arm64-usr on x86_64 host #2080

Closed

Description

@zhijianli88

Description

Failed to build_image --board=arm64-usr on x86_64 host

Impact

Failed to build_image --board=arm64-usr on x86_64 host

Environment and steps to reproduce

  1. Set-up: (environment)
  • image: ghcr.io/flatcar/flatcar-sdk-all:4628.0.0
  • scripts: alpha-4628.0.0
  1. Action(s): (inside the container)
  • ./build_packages --board=arm64-usr # succeed
  • ./build_image --board=arm64-usr # failed
  1. Error: [describe the error that was triggered]
pcap:x:377:377:User for capturing network traffic:/dev/null:/sbin/nologin
systemd-coredump:x:194:194:System user; systemd-coredump:/dev/null:/sbin/nologin
systemd-oom:x:198:198:System user; systemd-oom:/dev/null:/sbin/nologin
systemd-timesync:x:195:195:System user; systemd-timesync:/dev/null:/sbin/nologin
clock:x:550: 
pcap:x:377:
shadow:x:42:
systemd-coredump:x:194:
systemd-oom:x:198:
systemd-timesync:x:195:
pcap:!:20558::::::
systemd-coredump:!:20558::::::
systemd-oom:!:20558::::::
systemd-timesync:!:20558::::::
clock:!::
pcap:!::
shadow:!::
systemd-coredump:!::
systemd-oom:!::
systemd-timesync:!::
^[[1m^[[32mINFO    configure_bootloaders.sh: Installing legacy PV-GRUB configuration^[(B^[[m
^[[1m^[[32mINFO    configure_bootloaders.sh: Installing legacy SYSLINUX configuration^[(B^[[m
^[[1m^[[32mINFO    build_image: Writing first-boot flag^[(B^[[m
chroot: failed to run command ‘bash’: Exec format error
^[[1m^[[31mERROR   build_image: script called: build_image '--board=arm64-usr'^[(B^[[m
^[[1m^[[31mERROR   build_image: Backtrace:  (most recent call is last)^[(B^[[m
^[[1m^[[31mERROR   build_image:   file build_image, line 181, called: create_prod_image 'flatcar_production_image.bin' 'base' 'developer' 'coreos-base/coreos' 'containerd-flatcar|app-containers/containerd,docker-flatcar|app-containers/docker&app-containers/docker-cli&app-containers/docker-buildx'^[(B^[[m
^[[1m^[[31mERROR   build_image:   file prod_image_util.sh, line 182, called: finish_image 'flatcar_production_image.bin' 'base' '/mnt/host/source/src/build/images/arm64-usr/developer-4628.0.0+2026-04-15-0615-a1/prod-image-rootfs' 'flatcar_production_image_contents.txt' 'flatcar_production_image_contents_wtd.txt' 'flatcar_production_image.vmlinuz' 'flatcar_production_image_pcr_policy.zip' 'flatcar_production_image.grub' 'flatcar_production_image.shim' 'flatcar_production_image_kernel_config.txt' 'flatcar_production_image_initrd_contents.txt' 'flatcar_production_image_initrd_contents_wtd.txt' 'flatcar_production_image_disk_usage.txt' 'flatcar_production_image_realinitrd_contents.txt' 'flatcar_production_image_realinitrd_contents_wtd.txt'^[(B^[[m
^[[1m^[[31mERROR   build_image:   file build_image_util.sh, line 684, called: die_err_trap 'sudo chroot "${root_fs_dir}" bash -c "cd /usr/share/selinux/mcs && semodule -s mcs -i *.pp"' '126'^[(B^[[m
^[[1m^[[31mERROR   build_image: ^[(B^[[m
^[[1m^[[31mERROR   build_image: Command failed:^[(B^[[m
^[[1m^[[31mERROR   build_image:   Command 'sudo chroot "${root_fs_dir}" bash -c "cd /usr/share/selinux/mcs && semodule -s mcs -i *.pp"' exited with nonzero code: 126^[(B^[[m
^[[1m^[[31mERROR   build_image:   !!!!!!!!!!!!!!!!!!!!!!!!!^[(B^[[m
^[[1m^[[31mERROR   build_image:   !! BEGIN DEBUG OUTPUT: !!^[(B^[[m 
^[[1m^[[31mERROR   build_image:   !!!!!!!!!!!!!!!!!!!!!!!!!^[(B^[[m
^[[1m^[[31mERROR   build_image: ^[(B^[[m

Expected behavior

Succeed to build image

Additional information

Please add any information here that does not fit the above format.

Activity

  1. added
    kind/bug
    on Apr 15, 2026
  2. zhengrq-fnst commented on Apr 15, 2026

    @zhengrq-fnst
  3. zhijianli88 commented on Apr 15, 2026

    @zhijianli88
    Author

    Maybe you can follow this doc to solve your problem. https://www.flatcar.org/docs/latest/reference/developer-guides/sdk-modifying-flatcar/#select-the-target-architecture

    Good catch, I will install qemu-user-static and try again. thanks

  4. ader1990 commented on Apr 15, 2026

    @ader1990

    Hello, a little bit unrelated, but we are working on this PR here flatcar/scripts#3678 to add support for Flatcat builds on ARM64 environments natively. Would this feature be of interest for you to test it out or use it in the future?

    Thanks.

  5. zhijianli88 commented on Apr 17, 2026

    @zhijianli88
    Author

    Maybe you can follow this doc to solve your problem. https://www.flatcar.org/docs/latest/reference/developer-guides/sdk-modifying-flatcar/#select-the-target-architecture

    Good catch, I will install qemu-user-static and try again. thanks

    It works.
    thanks again.

  6. zhijianli88 commented on Apr 17, 2026

    @zhijianli88
    Author

    Hello, a little bit unrelated, but we are working on this PR here flatcar/scripts#3678 to add support for Flatcat builds on ARM64 environments natively. Would this feature be of interest for you to test it out or use it in the future?

    Thanks.

    Thank you for the information. This is indeed a valuable feature. However, I currently don't have a powerful AArch64 server to build Flatcar, so I may not be able to help with testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions