burmilla / os

Tiny Linux distro that runs the entire OS as Docker containers
https://burmillaos.org
Apache License 2.0
210 stars 13 forks source link

Udev rules not loaded after restart #155

Closed toussii closed 1 year ago

toussii commented 1 year ago

BurmillaOS Version: (ros os version) v2.0.0-beta6 Where are you running BurmillaOS? (docker-machine, AWS, GCE, baremetal, etc.) baremetal Which processor architecture you are using? amd64 Do you use some extra hardware? (GPU, etc)? no Which console you use (default, ubuntu, centos, etc..) default Do you use some service(s) which are not enabled by default? no Have you installed some extra tools to console? no Do you use some other customizations? no

I try to change the udev rules so created the following config.yml:

cloud-config

bootcmd:

This creates a symlink for this specific usb device. To reload these changes I run the following command: sudo system-docker exec -it udev udevadm trigger

The problem is these changes are not saved and I need to run this command if the machine reboots. Is it possible to automate this?

olljanat commented 1 year ago

Try with https://burmillaos.org/docs/configuration/advanced/write-files/

toussii commented 1 year ago

Yeah did try that but it didn't work (with and without sudo):

cloud-config

bootcmd:

write_files:

olljanat commented 1 year ago

I mean that instead of whole bootcmd thing you provably should use write file for that file.

If it is not enough then maybe you need restart udev container in rc.local. Sudo is not needed on those

toussii commented 1 year ago

that is also not working :(

`#cloud-config write_files:

olljanat commented 1 year ago

Perhaps it just run too early. Try add wait-for-docker to rc.local before that udev command.

toussii commented 1 year ago

Resolved the issue did run some logging and found that I need to remove the -i option because script is not a interactive terminal. Also the rule needs to be created inside the system-docker udev container. This is the working example:

cloud-config

write_files: