timebertt / pi-cloud-init

Minimal Raspberry Pi OS including cloud-init
Apache License 2.0
89 stars 13 forks source link

Failed install of core packages #8

Open cromefire opened 2 years ago

cromefire commented 2 years ago

When trying to build the an image, step "Installing core packages..." fails:

I: Installing core packages...
W: Failure trying to run: chroot "/home/vagrant/pi-gen/work/stage0/rootfs" dpkg --force-depends --install /var/cache/apt/archives/base-files_10.3+rpi1+deb10u11_armhf.deb
W: See /home/vagrant/pi-gen/work/stage0/rootfs/debootstrap/debootstrap.log for details (possibly the package base-files is at fault)
rmdir: failed to remove '/home/vagrant/pi-gen/work/stage0/rootfs/debootstrap': Directory not empty
[22:46:11] bootstrap failed: please check /home/vagrant/pi-gen/work/stage0/debootstrap.log

The log contains:

Setting up base-files (10.3+rpi1+deb10u11) ...
dpkg: error processing package base-files (--install):
 installed base-files package post-installation script subprocess was killed by signal (Segmentation fault)
Errors were encountered while processing:
 base-files

I'm not sure whether this a fault of the upstream builder or this script, but because I can't find something upstream and it seems I can just build an image with pi-gen on bare metal I suspect that this might be an issue with the build script/vagrant.

cromefire commented 2 years ago

Outside of vagrant this step seems to work fine (on ubuntu 20.04), also happened on an older debian box and with an older version of pi-gen.

cromefire commented 2 years ago

The failure is being produced by an AMD Zen 3 CPU, while a Intel Coffee Lake CPU ran it (at least this step) just fine, so I believe there is something wrong configured in vagrant that causes it to try and run unsupported instructions.

jeffreydivi commented 1 year ago

I can also reproduce this issue on an original AMD Zen CPU on Windows 10.