Reform system image creation fails

Running mkimage.sh from https://source.mnt.re/reform/reform-system-image on the sysimage-v2 branch fails during the + sudo ./mkuserland.sh phase on Ubuntu server 20.04:

Errors were encountered while processing:
 libc-bin
E: /usr/sbin/chroot /home/sid/nsm/reform-system-image/reform2-imx8mq/target-userland env --unset=TMPDIR dpkg --install --force-depends --status-fd=<$fd> /var/cache/apt/archives//perl-base_5.32.1-4_arm64.deb /var/cache/apt/archives//libkeyutils1_1.6.1-2_arm64.deb /var/cache/apt/archives//base-passwd_3.5.51_arm64.deb /var/cache/apt/archives//libssl1.1_1.1.1k-1_arm64.deb /var/cache/apt/archives//libbz2-1.0_1.0.8-4_arm64.deb /var/cache/apt/archives//libgcrypt20_1.8.7-6_arm64.deb /var/cache/apt/archives//libdb5.3_5.3.28+dfsg1-0.8_arm64.deb /var/cache/apt/archives//debconf_1.5.77_all.deb /var/cache/apt/archives//base-files_11.1_arm64.deb /var/cache/apt/archives//hostname_3.23_arm64.deb /var/cache/apt/archives//bsdutils_1%3a2.36.1-7_arm64.deb /var/cache/apt/archives//libaudit1_1%3a3.0-2_arm64.deb /var/cache/apt/archives//ncurses-base_6.2+20201114-2_all.deb /var/cache/apt/archives//libgssapi-krb5-2_1.18.3-5_arm64.deb /var/cache/apt/archives//libdebconfclient0_0.260_arm64.deb /var/cache/apt/archives//coreutils_8.32-4_arm64.deb /var/cache/apt/archives//libblkid1_2.36.1-7_arm64.deb /var/cache/apt/archives//libk5crypto3_1.18.3-5_arm64.deb /var/cache/apt/archives//dpkg_1.20.9_arm64.deb /var/cache/apt/archives//libkrb5support0_1.18.3-5_arm64.deb /var/cache/apt/archives//libacl1_2.2.53-10_arm64.deb /var/cache/apt/archives//mawk_1.3.4.20200120-2_arm64.deb /var/cache/apt/archives//libnsl2_1.3.0-2_arm64.deb /var/cache/apt/archives//init-system-helpers_1.60_all.deb /var/cache/apt/archives//diffutils_1%3a3.7-5_arm64.deb /var/cache/apt/archives//libkrb5-3_1.18.3-5_arm64.deb /var/cache/apt/archives//libc-bin_2.31-13_arm64.deb /var/cache/apt/archives//libpam-modules_1.4.0-9_arm64.deb /var/cache/apt/archives//libpam-runtime_1.4.0-9_all.deb /var/cache/apt/archives//findutils_4.8.0-1_arm64.deb /var/cache/apt/archives//libuuid1_2.36.1-7_arm64.deb /var/cache/apt/archives//sed_4.7-1_arm64.deb /var/cache/apt/archives//liblzma5_5.2.5-2_arm64.deb /var/cache/apt/archives//libtinfo6_6.2+20201114-2_arm64.deb /var/cache/apt/archives//libzstd1_1.4.8+dfsg-2.1_arm64.deb /var/cache/apt/archives//libsmartcols1_2.36.1-7_arm64.deb /var/cache/apt/archives//grep_3.6-1_arm64.deb /var/cache/apt/archives//libtirpc3_1.3.1-1_arm64.deb /var/cache/apt/archives//libselinux1_3.1-3_arm64.deb /var/cache/apt/archives//libgmp10_2%3a6.2.1+dfsg-1_arm64.deb /var/cache/apt/archives//libattr1_1%3a2.4.48-6_arm64.deb /var/cache/apt/archives//libgcc-s1_10.2.1-6_arm64.deb /var/cache/apt/archives//bash_5.1-3_arm64.deb /var/cache/apt/archives//util-linux_2.36.1-7_arm64.deb /var/cache/apt/archives//libpcre3_2%3a8.39-13_arm64.deb /var/cache/apt/archives//zlib1g_1%3a1.2.11.dfsg-2_arm64.deb /var/cache/apt/archives//ncurses-bin_6.2+20201114-2_arm64.deb /var/cache/apt/archives//libgpg-error0_1.38-2_arm64.deb /var/cache/apt/archives//gzip_1.10-4_arm64.deb /var/cache/apt/archives//lsb-base_11.1.0_all.deb /var/cache/apt/archives//libpam0g_1.4.0-9_arm64.deb /var/cache/apt/archives//libcrypt1_1%3a4.4.18-4_arm64.deb /var/cache/apt/archives//libaudit-common_1%3a3.0-2_all.deb /var/cache/apt/archives//sysvinit-utils_2.96-7_arm64.deb /var/cache/apt/archives//libudev1_247.3-5_arm64.deb /var/cache/apt/archives//libsystemd0_247.3-5_arm64.deb /var/cache/apt/archives//libpam-modules-bin_1.4.0-9_arm64.deb /var/cache/apt/archives//libpcre2-8-0_10.36-2_arm64.deb /var/cache/apt/archives//libmount1_2.36.1-7_arm64.deb /var/cache/apt/archives//debianutils_4.11.2_arm64.deb /var/cache/apt/archives//libtirpc-common_1.3.1-1_all.deb /var/cache/apt/archives//libcom-err2_1.46.2-2_arm64.deb /var/cache/apt/archives//login_1%3a4.8.1-1_arm64.deb /var/cache/apt/archives//libcap-ng0_0.7.9-2.2+b1_arm64.deb /var/cache/apt/archives//libc6_2.31-13_arm64.deb /var/cache/apt/archives//tar_1.34+dfsg-1_arm64.deb /var/cache/apt/archives//dash_0.5.11+git20210120+802ebd4-1_arm64.deb /var/cache/apt/archives//gcc-10-base_10.2.1-6_arm64.deb /var/cache/apt/archives//liblz4-1_1.9.3-2_arm64.deb failed

The master branch fails with the same error after fixing the repo URL in mkuboot.sh. I didn’t see any prebuilt images available anywhere.

Until this is investigated, you can download the latest prebuilt image here:

Also, I’m not sure if the image can be built on Ubuntu. It is tested only on Debian.

I encountered this issue as well. It would be great to add this to the documentation and remove this misleading line reform2-imx8mq/mkimage.sh · 99f5758526088ebb39c465dde911f272d01fd4b6 · Reform / reform-system-image · GitLab

Sorry for that, removed this line.

1 Like

I ran into the same problem. What ended up working for me was creating a Debian Sid chroot with debootstrap, building an image from the chroot after commenting out the “mkuserland2.sh” and “mkuserland3.sh” lines in “mkimage.sh”, then flashing the image to an SD card, booting into it on the Reform, and starting the build process over again from in there.

1 Like