Flashing multiple devices with mender installed

I m trying to create the base OS image that I can use to flash multiple Jetson Orin NX devices.

I m trying to follow the steps here Nvidia Jetson Orin L4T image Update
However, the raw image is not something that I can reuse on other devices as the disk partitioning is lost in the raw image.

Has someone the steps to create the base image for flashing many devices? Also is there any way to add environment variables to each device separately while flashing? I m looking for something similar to what Balena does. On Balena, it creates the OS to be flashed, and we have the possibility to set some env variables for devices on a single fleet.

Since mender convert doesnt work, how can i extend the method on the link for creating the image for all machines?

Hi @vini,

As Balenas approach is Yocto-based, you can go this route too. In that case, look at the builds in meta-mender-community.
I’m not sure I correctly understand the requirement, though.

So you want to build one image which gets deployed across a variety of devices. How would they differ?

Greetz,
Josef

Hey Josef,

currently we are using Balena, where we are able to get the flashable OS for every device we add to the fleet. Each machine in the fleet has a different set of environment variables which can be thought of as identifiers for each device. Also the API keys used for each device should be different, the tag for taislcale etc would be different.

Right now I create a base image for mender, by updating the rootfs and every machine for instance has the same user name and password, since I run the sudo ./tools/l4t_create_default_user.sh -u mender -p mender -n jetson --accept-license before changing the rootfs.

Right now I have added a boot script to preserve the disk partitioning and some associated steps, and I m not using mender snapshot approach to get the rootfs.

I am wondering if this is the approach everyone uses for creating the image to flash? Since on Balena I find it easier to select the device and get the corresponding OS to be used for flashing, I was looking if there is any easy way of doing this?

I will only have 100s of Orin NX 16GB device atm.

Hi @vini,

Like said, I don’t know about the Balena provisioning process. But in a nutshell you expect something like this, right?

  1. create image in some way
  2. use the flashing process with image from step 1 on multiple devices

Is there a specific reason why you’re sticking with the interactive, Ubuntu-based process? Do you have any dependencies or requirements for that? Because the Yocto-based process is meant to give you exactly that. There is already one Orin NX variant supported at meta-mender-community/kas/tegra at scarthgap · mendersoftware/meta-mender-community · GitHub, and I’m quite sure that the deviations to your setup are rather small. Then you would end up with a preconfigured image to flash, including Mender client, tenant token, and whatever common software or configuration you want to deploy.

Greetz,
Josef