Make attended-sysupgrade use current rootfs size

Hi, im trying to use attended-sysupgrade on my nanopi r4s, image generated with imagebuilder with CONFIG_TARGET_ROOTFS_PARTSIZE=1024. Ext4 image.

Attended-sysupgrade fails to generate image because there is no space left on rootfs

Updated list of available packages in /home/aparcar/asu/worker1/cache/22.03.3/rockchip/armv8/build_dir/target-aarch64_generic_musl/root-rockchip/../../../../../../../../../../../home/aparcar/asu/worker1/cache/22.03.3/rockchip/armv8/dl/openwrt_telephony
Signature check passed.
Downloading file:packages/Packages
Updated list of available packages in /home/aparcar/asu/worker1/cache/22.03.3/rockchip/armv8/build_dir/target-aarch64_generic_musl/root-rockchip/../../../../../../../../../../../home/aparcar/asu/worker1/cache/22.03.3/rockchip/armv8/dl/imagebuilder
Downloading file:packages/Packages.sig
Signature check failed.
Remove wrong Signature file.
error: ext4_allocate_best_fit_partial: failed to allocate 1 blocks, out of space?
make[3]: *** [/home/aparcar/asu/worker1/cache/22.03.3/rockchip/armv8/include/ /home/aparcar/asu/worker1/cache/22.03.3/rockchip/armv8/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/root.ext4] Error 1
make[2]: *** [Makefile:188: build_image] Error 2
make[1]: *** [Makefile:126: _call_image] Error 2
make: *** [Makefile:242: image] Error 2

Not all buildbots have enough extra space, I'd recommend creating a smaller rootfs image and resizing after install.

Or get yourself a VM to build images with extra space to accommodate the larger image which needs to be built.

1 Like

Which VM hypervisor can be run on openwrt? I cant find qemu package

edit: Ok, nevermind, i found it, qemu-arm-softmmu. Which guest os should i use to be light on microsd writes?

But asu refuses to build image.

Or maybe there is option to build image with kernel only partition and leave rootfs update to opkg?

Oh, wait, I may have misunderstood you. So you have originally flashed the image generated with Image Builder with CONFIG_TARGET_ROOTFS_PARTSIZE=1024 parameter and you're trying to run asu on that?

Can you not use the image builder again to generate the new image?

1 Like

Bumping this. I know the api is capable of this.

rootfs_size_mb	integer
example: 100
maximum: 100
minimum: 1

Ability to specify a custom CONFIG_TARGET_ROOTFS_PARTSIZE for the resulting image. Attaching this optional parameter will cause ImageBuilder to build a rootfs with that size in MB.

Is there any reason, why the 100mb limit on the asu servers for ext4 builds are not increased at least a bit to 200 or 300mb, just to give some breathing room ? I know it can be used to ddos the build server if using squashfs due to the compression cpu cost. However for ext4 it does not matter much.