Describe the bug
Partition sizes must be aligned to 4K. Rauc needs for faster installation of bundles with block-hash-indexes partition sizes that are multiples of 4096 bytes.
Bitbake has variable IMAGE_ROOTFS_ALIGNMENT = "4" for this, which must be set for minimal, full and rescue images.
But images sizes can differ and are not always dividable by 4096.
To Reproduce
Steps to reproduce the behaviour:
Build distro for one of the machines, e.g. Qemu-arm64
Run Qemu out of eclipse-leda-qemu-arm64.tar.xz.zip (Image-qemuarm64.bin, sdv-image-all-qemuarm64.wic.qcow2)
In Qemu install with Rauc the rescue image out of same file, which should succeed (same content and size as in wic, e.g.
journal shows a warning log message of Rauc that the size is not a multiple of 4K:
journalctl -u rauc
...
Updating /dev/vda3 with /run/rauc/bundle/sdv-image-rescue-qemuarm64.ext4
Continuing after adaptive mode error: failed to open target slot hash index for rescue.0: data file size (**167528448**) is not a multiple of 4096 bytes
...
Installation takes longer than expected.
Compare image size out of manifest
rauc info .../sdv-rauc-bundle-rescue-qemuarm64.raucb
... 163258368 / 4096 = 39858.0
with partition size
fdisk -l
...
/dev/vda3 323584 650787 327204 159.8M Linux filesystem (650787-323584+1)*512=**167528448**, /4096=40900**.5**
/dev/vda4 655360 1728575 1073216 524M Linux filesystem partition for full image ... =134152.0
/dev/vda5 1736704 2678527 941824 459.9M Linux filesystem partition for minimal image ... = 117728.0
In the wic file sdv-image-all-qemuarm64.wic.qcow2 you can directly check the partition sizes (7-Zip):
"2.rescue.img" **167528448** / 4096 = 40900**.5** size not ok
"3.root_a.img" 549486592 / 4096 = 134152.0 partition size for full image ok
"4.root_b.img" 482213888 / 4096 = 117728.0 partition size for minimal image ok
The full-image and minimal-image sizes are in the bundle manifests ok, but also differ from partition sizes:
rauc info sdv-rauc-bundle-full.raucb
size: 494252032 / 4096 = 120667.0 ok
rauc info sdv-rauc-bundle-minimal.raucb
size: 426606592 / 4096 = 104152.0 ok
In eclipse-leda-raspberrypi.tar.xz.zip in sdv-image-all-raspberrypi4-64.wic the partitions for full and minimal image violate the 4K-rule:
Expected behaviour
The size of partitions for rescue.img, root_a.img and root_b.img must be multiple of 4096 to guarantee fast block-hash-index Rauc bundle installations.
Screenshots / Logfiles
Leda Version (please complete the following information):
Describe the bug Partition sizes must be aligned to 4K. Rauc needs for faster installation of bundles with block-hash-indexes partition sizes that are multiples of 4096 bytes. Bitbake has variable IMAGE_ROOTFS_ALIGNMENT = "4" for this, which must be set for minimal, full and rescue images. But images sizes can differ and are not always dividable by 4096.
To Reproduce Steps to reproduce the behaviour:
Installation takes longer than expected.
with partition size
In the wic file sdv-image-all-qemuarm64.wic.qcow2 you can directly check the partition sizes (7-Zip):
The full-image and minimal-image sizes are in the bundle manifests ok, but also differ from partition sizes:
In eclipse-leda-raspberrypi.tar.xz.zip in sdv-image-all-raspberrypi4-64.wic the partitions for full and minimal image violate the 4K-rule:
Expected behaviour The size of partitions for rescue.img, root_a.img and root_b.img must be multiple of 4096 to guarantee fast block-hash-index Rauc bundle installations.
Screenshots / Logfiles
Leda Version (please complete the following information):