0

I have an embedded linux environment which has a read only root file system on it. I am unable to edit files and create new directory in the read only root file system as expected.

However, I see that I am still able to change the contents of file /etc/resolv.conf How is that possible? This actually works out for me. But I was just wondering why am I able to edit it?

Edit1: I am even able to create a write into /sys/class/pwm/$module_name/export Edit 2: So I see that

resolv.conf -> /etc/resolv-conf.systemd

And

resolv-conf.systemd -> ../run/systemd/resolve/resolv.conf
3
  • does the change survive a reboot? – jsotola Aug 17 '20 at 19:26
  • Run ls -l /etc/resolv.conf and see how it's a symlink somewhere, possibly /run/systemd/resolve/stub-resolv.conf or /usr/lib/systemd/resolv.conf. – ilkkachu Aug 17 '20 at 19:32
  • @jsotola no the change does not survive reboot – thesillywhat Aug 17 '20 at 19:35
3

However, I see that I am still able to change the contents of file /etc/resolv.conf How is that possible?

It's either a symbolic link to a tmpfs filesystem mounted e.g. in /run or /var or you're working with a virtual COW filesystem like UnionFS/aufs/overlayfs/etc.

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.