Hi,
I just want to know how do I include\use a custom\different mender client version when I custom build the RPi image.
Hi,
I just want to know how do I include\use a custom\different mender client version when I custom build the RPi image.
Hi @nishad1092 at the moment thatās not easily done. Itās all integrated into mender-convert. When new Mender releases are done then mender-convert is updated with the latest Mender client version.
Do you have a need to change it differently?
Drew
Hi @drewmoseley
Oh !!
Yes, Actually I needed a very important change, so I have rebuilt the mender-client according to my use case. Now I want this mender-client to be used while building using mender-convert.
So far, I have used the normal installation of mender-client using the variable parameters, but as u said earlier, for a stable and rigid system update I was looking at this article, but this looks like an issue for me to build with the default client.
It would be great if I can build image with my custom mender-client, Actually the change is extremly simple, just a line is altered in the custom client I need.
Hi @drewmoseley
So I just have one small change here in this file
So, It will be great to have this edit before building.
the change I need is in line 60, replace that line to ā
echo āhostname=$(cat /etc/hostname)ā
Please submit this as a pull request against https://github.com/mendersoftware/mender-convert
Drew
Hi @drewmoseley
So Do I need to create a pull request through this link?
What should I mention in the write section and it will be a pull request under ā2.2.xā, Is that right?
I donāt think we are accepting changes to 2.2.x so it should go against master.
ok. so create a pull request at master@{1day}ā¦master
is it? @drewmoseley and Ill mention what changes I required?
Hi @drewmoseley
I have created a pull request to the master, please could you check once if its okay.
Hi @drewmoseley
I just wanted to make this clear, because I donāt think I mentioned that this file mender-device-identity which Im modifying is from this Mender-Client file https://d1b0l86ne08fsf.cloudfront.net/2.4.0/dist-packages/debian/armhf/mender-client_2.4.0-1_armhf.deb,
I was thinking the branch file which is responsible for this change is under https://github.com/mendersoftware/mender/blob/master/support/mender-device-identity
this link,
So, I need to create pull request to this repo isnāt it?
Please correct me if Im wrong.
If all you are modifying is mender-device-identity, then you only need a PR if itās a general change that should be applied to the default provided by the links you referenced. If itās specific to your use case then you can just provide your own version of the file in your integration setup whether that is using mender-convert or yocto.
Hi @drewmoseley
I thought of the taking the mender-convert repo and making changes to my own version as required to this file Mender-device-identity, because thatās the only change I need for my Mender-Client before it installs, But then the Mender-Convert repo I couldnāt find this file nor couldnāt find the source were it binds this file.
I can see this file only in this line https://github.com/mendersoftware/mender/blob/master/support/mender-device-identity
But while doing custom RPi Pi 0 built its mentioned Mender-convert link.
This is my confusion here @drewmoseley, If you can guide me where this Mender-device-identity file is inside mender-convert, then Iāll make my changes and then start building, else I have to do a PR for the master branch of the link you provided.
mender-convert initially pulls the default /usr/share/mender/identity/mender-device-identity from the Mender sources as you have noticed. But then it applies your root filesystem overlay so if you have one in there with the full path embedded (and made executable) then your local one will override the default.
Hi @drewmoseley,
Okay, I understood little bit, I went thru https://docs.mender.io/system-updates-debian-family/convert-a-mender-debian-image/customization#rootfs-overlays
And according to this, I should place the mender-device-identity inside here before building is it?
Or like you mentioned above, mender-convert pulls the default /usr/share/mender/identity/mender-device-identity from the Mender sources, if you could tell me where is that pulling script/ is mentioned, I can modify it there itself, it will easier rgt, to change the source to my own local source or my repository source,
Mender-convert installs mender as a prebuilt binary using the deb package and does not build it from source. You are best off using the rootfs overlay here.
Drew
Sure @drewmoseley, Iām trying it now, I shall update you,
Thanks so much for your support
Hi @drewmoseley
I was trying to build it, and Iām facing this issue while building :::
Applying rootfs overlay: /home/mender/custom_image/mender-convert/rootfs_overlay_demo
rsync: change_dir ā/home/mender/custom_image/mender-convert/rootfs_overlay_demoā failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]
All files and folders have the user permission as default.
And for the Mender-device-identity, I have placed the file structure of /usr/share/ inside rootfs_overlay_Demo
FYI file structure, I have followed the guide as it is:
The error here indicates that /home/mender/custom_image/mender-convert/rootfs_overlay_demo does not exist or is not visible from within the docker container running the build. If you can provide a full log of your conversion process, starting with the creation of the rootfs_overlay_demo, building of the container, and invocation of mender-convert that may tell us something.
Also, please copy any paste text rather than providing screenshots. Itās much easier if we can search and copy text in our discussions.
Drew
Sure @drewmoseley Iāll make sure it will be copied as text from next time. I actually could compile it by just giving ```
āoverlay rootfs_overlay , instead of --overlay ${PWD}/rootfs_overlay but pretty strange because PWD points to my current directory and rootfs_overlay exist,
Anyways, I have build the image, going to test it now.
Thanks for your huge support.
Hi @drewmoseley
I have build and flashed the Image to theSD card, and booted also to my RPi zeroW.
It booted fine, got hit to the mender server also.
But when checking the free space in the RPI, I can see only 334 MB left (But my sd card is 16GB) , I saw different partition filesystem while checking the sd card, I understand it has different partitions,
But If Iām seeing only 334 MB,
FYI: Sorry I couldnāt type, its the screenshot frm the RPi: