I’m deploying Legato onto a custom Linux distro where the root file system is mounted read-only. However, we still want Legato to be writable.
This trick requires we build our filesystem with Legato somewhere non-standard, and then symlink from the new non-standard directories to /mnt/legato, /data/le_fs, /mnt/flash, etc… It almost works.
The sticking point is /etc/group and /etc/passwd. Our /etc directory is read-only, so you can’t just re-rewrite those files. My current ideas are:
- put the new group and passwd files somewhere else and mount them into /etc. But this file might be temporary, and I suspect it will be a problem. Files created by apps might have the wrong userid for a future invocaiton of the app.
- have supervisor ignore the copy-file error, then refuse the launch an app whose user and groups do not already exist. In effect, this means our group and passwd files must include all the IDs needed by Legato applications “out of the box”.
Both require supervisor changes.
Is there a known/preferred solution to this problem? And what are my chances of getting such modifications added to a future release?