0

How do I need to configure the NetworkManager to work with a read-only root filesystem?

I have an embedded device (using 16.04) and I'm trying to mount the root filesystem read-only. I've read numerous guides and have it 99% working. /var is mounted read-write, with / mounted read-only. When I try to join a wifi network, I get the following error:

# nmcli d wifi connect mySSID password myPassword
Error: Connection activation failed: (7) Secrets were required, but not provided.

If I reboot with / read-write:

# nmcli d wifi connect mySSID password myPassword
Device 'wlan0' successfully activated with 'aefcb407-86af-4b40-aaab-9913410ac305'.

I noticed it creates a file in /etc/NetworkManager/system-connections so I made the directory a symbolic link to /var/local/system-connections, and tried again with a fresh copy of the read-only / ...but same error.

I verified that when I receive the error, I can manually create a file in that directory:

# touch test_rw_fs
# ls test_rw_fs
test_rw_fs

What am I missing? How do I configure the NetworkManager in this configuraiton?

1
  • You can also configure the path in NetworkManager.conf file (see the manual). Of course, symlinking should work just as well. Ensure the directory has proper user and permissions. Look at NetworkManager's log file to see whats wrong.
    – thaller
    Dec 1, 2016 at 23:19

1 Answer 1

0

Read man strace. Then, in the Working condition,

strace -e trace=open nmcli d wifi connect mySSID password myPassword  

will show you each call to open, and if the file is opened for write.

Each of the files opened for write will have to be configured to live off /.

3
  • nmcli doesn't write any files. It tells NM via D-Bus to create a connection. You'd have to strace NM...
    – thaller
    Dec 1, 2016 at 23:16
  • how would I strace NM? It's a systemd service.
    – proximous
    Dec 2, 2016 at 20:41
  • You would either edit systemd's NetworkManager.service file to call strace in the Exec call, or start NetworkManager in a terminal (with strace, as root). Anyway, that will yield a lot of noise. Seems easier to look at the log file of NM (with debug logging enabled).
    – thaller
    Dec 2, 2016 at 22:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.