Delta Updates without a initial rootfs update

If I understood the guide correctly you need to apply a initial rootfs update before you can use the delta updates.

Source: Robust delta update rootfs

Our process is right now:

  1. Create a .uefi image with yocto
  2. Flash the image on an SSD
  3. Install the SSD
  4. Boot the device
  5. Apply a full rootfs update manually via ethernet connection
  6. Ship the device to the customer
  7. Apply delta-updates via a mobile connection

If we skip step 5. we can’t apply any delta updates later because the device does not provide the right rootfs.checksum.

My question is: Why we are doing this? The initial image (.uefi) is exactly the same as the first full rootfs update (.mender)

Or is there a workaround that I did not see?

Thanks for all the help!

Hello, the reason is that the database is not populated at build-time, and hence, an update is needed in order to populate it.

More information, and the fix, when it is prioritized, can be found here:

https://tracker.mender.io/browse/MEN-2582

Thanks for the quick update. Is there a known work around e.g. remove the depends on property of the first delta-update artefact ?

Unfortunately not :slightly_frowning_face:

But @eystein (Product Owner) will likely be interested in this discussion.

Thanks for the feedback @B-Stefan !
It is something we plan to improve and I have noted your request for it as well.

Currently you need to do the process you outlined above for a while longer I think.

Thanks for the quick response @eystein.

Unfortunately, the process described above was not an option for us.
I found a workaround, so for everybody that encounter this issue here is a potential process to avoid the initial full rootfs update:

  1. Create a .uefi image with yocto
  2. Flash the image on an SSD
  3. Install the SSD
  4. Boot the device

In case of the first delta update:

  1. Create a delta update via mender-delta binary, according to documentation
  2. Read the delta update via mender-artefact read yourDeltaUpdateName.mender
  3. Create a new Script update with an empty script that provides the required rootfs.checksum
  4. Apply the script update to your devices
  5. Apply the delta update to your devices

Create script update

mender-artifact write module-image  -T script \
 -n release-45-rootfs-fix \
  -t <device_type> \
  -o ./release-45-rootfs-fix.mender \
  --provides rootfs-image.checksum:3d009272e05a2fdbb37b98775a73ec788f34fcea67446d76ee26e6f36c9a4d6b \
  --depends artifact_name:release-6.45 \
  --provides rootfs-image.version:release-6.45 \
  --clears-provides artifact_group \
  --clears-provides "rootfs-image.*" \
   -f ./blank.bash

1 Like