# How to say mender client that artifact contains ubi image?

**URL:** <https://hub.mender.io/t/how-to-say-mender-client-that-artifact-contains-ubi-image/4440>\
**Category:** OpenWrt\
**Created:** [January 3, 2022, 5:14pm UTC](https://hub.mender.io/t/how-to-say-mender-client-that-artifact-contains-ubi-image/4440 "2022-01-03T17:14:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kele6ra](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kele6ra/32/1375_2.png) [@kele6ra](https://hub.mender.io/u/kele6ra)\
**Post date:** [January 3, 2022, 5:14pm UTC](https://hub.mender.io/t/how-to-say-mender-client-that-artifact-contains-ubi-image/4440/1 "2022-01-03T17:14:19Z")

</div>

Hello, I am trying to integrate mender with OpenWRT. I can’t understand where should I set parameter about ubi layout, because mender doesn’t understand artifact ubi image.`ubiupdatevol` command works normally.  
I have nand flash, ubi layout and 5 ubi volumes:

1. u-boot-env-1
2. u-boot-env-2
3. rootfsA(squashFS)+FIT image (kernel+dtb)
4. rootfsB(squashFS)+FIT image (kernel+dtb)
5. rootfs\_data partition

It successfully connects to the mender server, can see mender-artifact and works well. But when I want to update it downloads artifact and tries to update it as a simple partition, not ubi:

> **Summary**
>
> ```auto
> time="2022-01-03T12:34:37Z" level=warning msg="Could not resolve path link: overlayfs:/overlay Attempting to continue"
> time="2022-01-03T12:34:37Z" level=info msg="Opening device \"/dev/ubi0_3\" for writing"
> time="2022-01-03T12:34:37Z" level=info msg="Native sector size of block device /dev/ubi0_3 is 126976 bytes. Mender will write in chunks of 2031616 bytes"
> time="2022-01-03T12:34:38Z" level=error msg="Failed to write 37814784 bytes to the new partition"
> time="2022-01-03T12:34:38Z" level=info msg="The optimized block-device writer wrote a total of 2 frames, where 2 frames did need to be rewritten (i.e., skippe
> time="2022-01-03T12:34:38Z" level=error msg="Artifact install failed: Payload: can not install Payload: openwrt-layerscape-armv7-fsl_ls1021a-squashfs-aeration not permitted"
> 
> ```

I create artifact with command:  
`mender-artifact write rootfs-image -n fsl_ls1021a-1641064824 -t fsl_ls1021a --software-version r51-bba1547a513 -f openwrt-layerscape-armv7-fsl_ls1021a-squashfs-artifact-1641064824.mender -o openwrt-layerscape-armv7-fsl_ls1021a-squashfs-artifact-1641064824.mender.new`  
openwrt-layerscape-armv7-fsl\_ls1021a-squashfs-artifact-1641064824.mender - ubi volume image with rootfs(squashFS)+FIT image (kernel+dtb)

---

<div class="post-metadata">

**Author:** ![kele6ra](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kele6ra/32/1375_2.png) [@kele6ra](https://hub.mender.io/u/kele6ra)\
**Post date:** [January 3, 2022, 7:43pm UTC](https://hub.mender.io/t/how-to-say-mender-client-that-artifact-contains-ubi-image/4440/2 "2022-01-03T19:43:36Z")

</div>

I found the problem, it is mender.conf file. There should be ubi0\_2 or ubi0\_3 without dev prefix.
