Imagebuilder creating broken images resulting in soft brick

I have an issue with the image builder. When building, it complains about missing files and then creates empty files instead. The build process does exit successfully and an image is created. But important files are just empty resulting in a soft brick and TFTP recovery.

Build-System is Ubuntu 24.04.3 using WSL1.

wget https://downloads.openwrt.org/releases/25.12.0/targets/ramips/mt7621/openwrt-imagebuilder-25.12.0-ramips-mt7621.Linux-x86_64.tar.zst
# checksum verified
tar --zstd -x -f openwrt-imagebuilder-*.tar.*
cd openwrt-imagebuilder-*/

# fixing WSL PATH
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
make image PROFILE=ubnt_edgerouter-x PACKAGES="luci-ssl luci-app-attendedsysupgrade luci-app-sqm tcpdump luci-app-statistics collectd-mod-df collectd-mod-ping collectd-mod-uptime mtr ddns-scripts curl ca-bundle luci-app-ddns luci-proto-wireguard wireguard-tools qrencode kmod-ipt-nat6 htop owut"

ls -al bin/targets/ramips/mt7621/

Output

...Building images for ramips - Ubiquiti EdgeRouter X
Packages: luci-ssl luci-app-attendedsysupgrade luci-app-sqm tcpdump luci-app-statistics collectd-mod-df collectd-mod-ping collectd-mod-uptime mtr ddns-scripts curl ca-bundle luci-app-ddns luci-proto-wireguard wireguard-tools qrencode kmod-ipt-nat6 htop owut apk-mbedtls base-files ca-bundle dnsmasq dropbear firewall4 fstools kernel kmod-crypto-hw-eip93 kmod-gpio-button-hotplug kmod-leds-gpio kmod-nft-offload libc libgcc libustream-mbedtls logd mtd netifd nftables odhcp6c odhcpd-ipv6only ppp ppp-mod-pppoe procd-ujail uci uclient-fetch urandom-seed urngd "base-files=1693~f919e7899d" "libc=1.2.5-r5" "kernel=6.12.71~364f8debbcd4cddc1f038dea515bf8a5-r1"

WARNING: opening /home/user/openwrt-imagebuilder-25.12.0-ramips-mt7621.Linux-x86_64/packages/packages.adb: No such file or directory
OK: 0 B in 0 packages
Package list missing or not up-to-date, generating it.

Building package index...

Installing packages...
(  1/191) Installing libgcc1 (14.3.0-r5)
(  2/191) Installing libc (1.2.5-r5)
...
(189/191) Installing getrandom (2025.10.30~6f78fa49-r1)
(190/191) Installing urandom-seed (3)
(191/191) Installing urngd (2025.10.03~f17e33d9-r1)
OK: 20.2 MiB in 191 packages

Finalizing root filesystem...
add alternative: /usr/bin/ssh-keygen -> /usr/sbin/dropbear
add alternative: /usr/bin/scp -> /usr/sbin/dropbear
...
Enabling umount
Enabling urandom_seed
Enabling urngd

Building images...
Parallel mksquashfs: Using 8 processors
Creating 4.0 filesystem on /home/user/openwrt-imagebuilder-25.12.0-ramips-mt7621.Linux-x86_64/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/root.squashfs, block size 262144.
Pseudo file "dev" exists in source filesystem "/home/user/openwrt-imagebuilder-25.12.0-ramips-mt7621.Linux-x86_64/build_dir/target-mipsel_24kc_musl/root-ramips/dev".
Ignoring, exclude it (-e/-ef) to override.
[-                                                                                                     ]    1/1326   0%
Failed to read file /home/user/openwrt-imagebuilder-25.12.0-ramips-mt7621.Linux-x86_64/build_dir/target-mipsel_24kc_musl/root-ramips/etc/apk/arch, creating empty file
[-                                                                                                     ]    7/1326   0%
Failed to read file /home/user/openwrt-imagebuilder-25.12.0-ramips-mt7621.Linux-x86_64/build_dir/target-mipsel_24kc_musl/root-ramips/etc/apk/keys/openwrt-25.12.pem, creating empty file
... a lot of missing files ...

Exportable Squashfs 4.0 filesystem, xz compressed, data block size 262144
        compressed data, compressed metadata, compressed fragments,
        no xattrs, compressed ids
        duplicates are removed
Filesystem size 4840.34 Kbytes (4.73 Mbytes)
        23.14% of uncompressed filesystem size (20916.50 Kbytes)
Inode table size 9834 bytes (9.60 Kbytes)
        18.08% of uncompressed inode table size (54388 bytes)
Directory table size 16670 bytes (16.28 Kbytes)
        48.50% of uncompressed directory table size (34373 bytes)
Number of duplicate files found 548
Number of inodes 1645
Number of files 1252
...
4957184 bytes (5.0 MB, 4.7 MiB) copied, 0.259469 s, 19.1 MB/s
/home/sascha/openwrt-imagebuilder-25.12.0-ramips-mt7621.Linux-x86_64/staging_dir/host/bin/tar: Option --mtime: Treating date '@1772496855' as 2026-03-03 01:14:15
sysupgrade-ubnt_edgerouter-x/
sysupgrade-ubnt_edgerouter-x/CONTROL
sysupgrade-ubnt_edgerouter-x/kernel
sysupgrade-ubnt_edgerouter-x/root

As said above I was able to flash the image but the system was broken beyond repair. It booted but the empty files resulted in all sorts of errors and sysupgrade was also broken so I had to use TFTP to start fresh.

24.10.5 is building just fine with the exact same commands.