I am trying to make a symlink for my rs232 device (for which I am using a usb convertor). I have a udev rule in my service which does that as the following:
This works fine in normal conditions. However, when I try to reboot the system, udev rule no longer works. More precisely, the device gets mounted but it is not symlinked. In such a case I should either trigger the udev rules manually or simply replug the device. What is strange is that I have other udev rules e.g., for mounting external storage disks and those work fine on reboots as well, but for the rs232 it fails. I have even tried a different device and it’s the same. I have also tested this on two different BalenaOS versions: balenaOS 3.0.17 and balenaOS 2.115.8+rev1 and both were the same.
Does anyone know what could be causing it and how I can solve it (without manual intervention)?
I have also other rules in the same place for automatically mounting/unmounting external storage disks and they work always fine.
Regarding the dmesg, I tried rebooting (hence the unsuccessful udev rule) and then replugging my convertor (successful udev rule) and as you can see the same output is being shown:
@mpous I’m using a Lenovo ThinkStation P360 Tower computer with Intel® Core™ i9-12900K-processor for which I have installed the Generic x86_64 (GPT) BalenaOS on it.
@mpous Thanks a lot for the hint. adding the change to my udev rule solved the problem! It seems like the device’s properties change on startup. The updated rule: