read only root file system

hello experts,

i am completely new to linux world. My job is to make debian linux root read only which will be mounted on compact flash. i created symlinks to mtab,resolv.conf,adjtime from tmpfs mounted folder and they are fine. but the problem is with /etc/network and /etc/hotplug directories and their contents which will be used during run time. during booting /etc/network.. no such file or folder errors, on shutting down deconfiguring network .. operation failed errors.
please help me with this. i am implementing ramfs.
Who is Participating?
ramlinuxConnect With a Mentor Author Commented:
a script to mount the ramfs and create the folders/files required for rw during boot time solved this issue.
kyleb84Connect With a Mentor Commented:
Do you want the changes to be persistent? - Do you want the changes made to the folder to be kept when the system reboots?

If not:
What you need to do is create a couple of images of the contents of /etc/network and /etc/hotplug, then mount them as ro and -loop on boot and symlink /etc/network to the mounted image directory.

If so:
Do the same, but make the ext2 images with rw access.

I think I'm on the right track, but I'm pretty sure that there's a filesystem specifically for that purpose, maybe someone else can elaborate?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.