mkaczanowski / packer-builder-arm

Packer plugin to build ARM images

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker install failing

trolleybusses opened this issue · comments

I'm attempting to create an Ubuntu 21.04 arm64 image to run on a Raspberry Pi. Currently the build is failing when installing Docker, and I'm getting a segmentation fault from qemu-aarch64-static, apparently when it's trying to run some post-install triggers for libc-bin. This is happening both with the Docker install convenience script and when adding the Docker apt registry manually and installing that way.

I'm building on Ubuntu 20.04 amd64 using Docker. Does anyone know what might be going on here and how I can get around it?

Here's a snippet from the end of the logs when the error happens:

2021-06-13T07:18:14Z:     arm.fwibbibity: Setting up update-notifier-common (3.192.40.3) ...
2021-06-13T07:18:18Z:     arm.fwibbibity: Processing triggers for libc-bin (2.33-0ubuntu5) ...
2021-06-13T07:18:19Z:     arm.fwibbibity: qemu: uncaught target signal 11 (Segmentation fault) - core dumped
2021-06-13T07:18:19Z:     arm.fwibbibity: Segmentation fault (core dumped)
2021-06-13T07:18:19Z:     arm.fwibbibity: qemu: uncaught target signal 11 (Segmentation fault) - core dumped
2021-06-13T07:18:19Z:     arm.fwibbibity: Segmentation fault (core dumped)
2021-06-13T07:18:19Z:     arm.fwibbibity: dpkg: error processing package libc-bin (--configure):
2021-06-13T07:18:19Z:     arm.fwibbibity:  installed libc-bin package post-installation script subprocess returned error exit status 139
2021-06-13T07:18:19Z:     arm.fwibbibity: Processing triggers for rsyslog (8.2102.0-2ubuntu1) ...
2021-06-13T07:18:19Z:     arm.fwibbibity: Running in chroot, ignoring request.
2021-06-13T07:18:19Z:     arm.fwibbibity: Processing triggers for man-db (2.9.4-2) ...
2021-06-13T07:18:24Z:     arm.fwibbibity: Processing triggers for dbus (1.12.20-1ubuntu3) ...
2021-06-13T07:18:24Z:     arm.fwibbibity: Errors were encountered while processing:
2021-06-13T07:18:24Z:     arm.fwibbibity:  libc-bin
2021-06-13T07:18:26Z:     arm.fwibbibity: needrestart is being skipped since dpkg has failed
2021-06-13T07:18:35Z: ==> arm.fwibbibity: E: Sub-process /usr/bin/dpkg returned an error code (1)
2021-06-13T07:18:35Z: ==> arm.fwibbibity: error while running provision hook: Script exited with non-zero exit status: 100.Allowed exit codes are: [0]
2021-06-13T07:18:35Z:     arm.fwibbibity: optional (please ignore) `fuser -k` failed with exit status 1:
2021-06-13T07:18:35Z: Build 'arm.fwibbibity' errored after 5 minutes 5 seconds: build was halted

The project can be found here: https://github.com/trolleybusses/rpi-fwibbibity with the source and builder defined in HCL in the Ubuntu directory. I've tried using the Docker container I built from the Dockerfile in there, and also directly using the Docker Hub version of packer-builder-arm, and get the same issue

Thanks.

[Update]

I've switched to build Ubuntu 20.04 like the sample for the RPi4 board, and have switched it to use a resize build method, as I think previously it may have been running out of space. I'm now getting a failure in a different area. These are the logs I'm seeing now. It seems there's an issue installing flash-kernel and/or initramfs-tools.

2021-06-14T14:04:21Z:     arm.fwibbibity: Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
2021-06-14T14:04:21Z:     arm.fwibbibity: Processing triggers for rsyslog (8.2001.0-1ubuntu1.1) ...
2021-06-14T14:04:22Z:     arm.fwibbibity: Running in chroot, ignoring request.
2021-06-14T14:04:22Z:     arm.fwibbibity: Processing triggers for ufw (0.36-6) ...
2021-06-14T14:04:22Z:     arm.fwibbibity: Processing triggers for man-db (2.9.1-1) ...
2021-06-14T14:04:44Z:     arm.fwibbibity: Processing triggers for dbus (1.12.16-2ubuntu2.1) ...
2021-06-14T14:04:44Z:     arm.fwibbibity: Processing triggers for install-info (6.7.0.dfsg.2-5) ...
2021-06-14T14:04:45Z:     arm.fwibbibity: Processing triggers for flash-kernel (3.103ubuntu1~20.04.1) ...
2021-06-14T14:04:47Z:     arm.fwibbibity: Unsupported platform.
2021-06-14T14:04:47Z:     arm.fwibbibity: dpkg: error processing package flash-kernel (--configure):
2021-06-14T14:04:47Z:     arm.fwibbibity:  installed flash-kernel package post-installation script subprocess returned error exit status 1
2021-06-14T14:04:47Z:     arm.fwibbibity: Processing triggers for mime-support (3.64ubuntu1) ...
2021-06-14T14:04:47Z:     arm.fwibbibity: Processing triggers for ca-certificates (20210119~20.04.1) ...
2021-06-14T14:04:47Z:     arm.fwibbibity: Updating certificates in /etc/ssl/certs...
2021-06-14T14:05:03Z:     arm.fwibbibity: 0 added, 0 removed; done.
2021-06-14T14:05:03Z:     arm.fwibbibity: Running hooks in /etc/ca-certificates/update.d...
2021-06-14T14:05:03Z:     arm.fwibbibity: done.
2021-06-14T14:05:03Z:     arm.fwibbibity: Processing triggers for initramfs-tools (0.136ubuntu6.5) ...
2021-06-14T14:05:03Z:     arm.fwibbibity: update-initramfs: Generating /boot/initrd.img-5.4.0-1028-raspi
2021-06-14T14:07:30Z:     arm.fwibbibity: Unsupported ioctl: cmd=0x5331
2021-06-14T14:08:40Z:     arm.fwibbibity: Unsupported platform.
2021-06-14T14:08:40Z:     arm.fwibbibity: run-parts: /etc/initramfs/post-update.d//flash-kernel exited with return code 1
2021-06-14T14:08:40Z:     arm.fwibbibity: dpkg: error processing package initramfs-tools (--configure):
2021-06-14T14:08:40Z:     arm.fwibbibity:  installed initramfs-tools package post-installation script subprocess returned error exit status 1
2021-06-14T14:08:40Z:     arm.fwibbibity: Errors were encountered while processing:
2021-06-14T14:08:40Z:     arm.fwibbibity:  flash-kernel
2021-06-14T14:08:40Z:     arm.fwibbibity:  initramfs-tools
2021-06-14T14:08:55Z: ==> arm.fwibbibity: E: Sub-process /usr/bin/dpkg returned an error code (1)
2021-06-14T14:08:56Z: ==> arm.fwibbibity: error while running provision hook: Script exited with non-zero exit status: 100.Allowed exit codes are: [0]
2021-06-14T14:08:56Z:     arm.fwibbibity: optional (please ignore) `fuser -k` failed with exit status 1:
2021-06-14T14:08:56Z: Build 'arm.fwibbibity' errored after 16 minutes 52 seconds: build was halted