Ethernet module not available after deployment

We have created an image with the mender-convert tool (based on the raspbian) at the end of last year. Now we created a new image with the mender-convert. When we burn the image on the sd card and then run a deployment (with the created mender-artifact) it is working as expected. When we deploy the new mender-artifact to the old image after rebooting the ethernet module is missing (therefore there is no connection and the deployment can’t be finished). Under /sys/class/net there is no link to the ethernet only to the loopback and the wlan.

Versions:
Old Image:
mender-convert: 1.0.0b1
raspbian-lite: Raspbian Stretch of december 2018

New Image:
mender-convert: 1.1.0b1
raspbian-lite: Raspbian Stretch of april 2019

Is this a known bug? Do you know how it can be workarounded or from where it is coming?

Thanks in advance.

My initial guess would be that either the kernel module or the linux firmware blob for the ethernet device is missing.

Does a pre-Mender Stretch from April 2019 have an ethernet device?

Drew

we burn the image on the sd card and then run a deployment (with the created mender-artifact) it is working as expected. When we deploy the new mender-artifact to the old image after rebooting…

This probably relates to the boot firmware files not being updated, check the “Boot Firmware files” section under “Known Issues”,

I have replaced the 9 files which are mentioned in the post, but it is the same behavior. Do I have to replace more files?

Probably a good idea to replace all the dtb and dtbo files as well

I have replaced also the dtb and dtbo files and now it is working. In the mentioned article this problem could be solved with a state script. I haven’t written any state scripts so long. Would you mind to show haw this could be solved with a state script?

I did do an reference implementation back then which can be used for inspiration,

This was created for Yocto, but should be fairly easy to transfer to other platforms.

Because I am not familiar with the state scripts I have more questions:

  • Is it meaningful to do this task in the state “Download_Leave” or in which state is it the “good way to do”?
  • Is there no problem in copying the files during running the device or do we have to stop some services before?
  • Is it meaningful to do this task in the state “Download_Leave” or in which state is it the “good way to do”?

Even if it works in Download_Leave the most correct is probably to do it in ArtifactInstall_Leave, because here the Mender client would have setup all the bootloader variables to make a switch to the updated image.

  • Is there no problem in copying the files during running the device or do we have to stop some services before?

Should not need to stop any services as the files in the boot partition are only used during boot of the device.

Thanks. I have another question. In the documentation (see https://docs.mender.io/2.0/artifacts/state-scripts) it is written, that the “ArtifactInstall_Leave” has to be in the Artifact and not in the root-filesystem. I would copy the files before the mender-convert to the directory /etc/mender/scripts. Is that the right way?

The Artifact* scripts need to be embedded in the Mender Artifact, and should not be present in the rootfs.

The way it is done using the mender-artifact tool and providing the scripts using the ‘-s’ option. So you will need to create your own Mender Artfact using the ‘ext4’ ouput image you got from the mender-convert process. This section in the docs might be helpful,

https://docs.mender.io/2.0/artifacts/modifying-a-mender-artifact#create-an-artifact-from-a-raw-root-file-system

On my mobile so can not provide a full example