jtesta
Posts: 3
Joined: Thu Oct 05, 2017 4:21 pm

RPI as a DHCP Server with a Read-only FS

Fri Oct 06, 2017 3:04 pm

I am using an RPI 3 with Raspbian Jessie to create a DHCP server for a closed network. Since this is a lights-out installation, I would also like to set up the RPI with a read-only file system. Following various postings in various forums, I have successfully set up the unit as an DHCP server and have separately set it up with a read-only FS. However, when I attempt to do both at the same time, the unit stops providing IP addresses to the network. I am only using the wired connection (eth0) for this project.

Is doing both together possible and, if so, what additional configuration steps are needed? Any advice will be greatly appreciated.

epoch1970
Posts: 1154
Joined: Thu May 05, 2016 9:33 am

Re: RPI as a DHCP Server with a Read-only FS

Fri Oct 06, 2017 8:18 pm

The server probably wants to write to the leases file somewhere. Can you set it to write to a tmpfs partition?
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Heater
Posts: 8123
Joined: Tue Jul 17, 2012 3:02 pm

Re: RPI as a DHCP Server with a Read-only FS

Sat Oct 07, 2017 9:57 am

How have you set up your read only root?

I recently set up a bunch of Pi with read only root using an overlay file system such that any and every program can still write any files it wants to. But the overlay fs causes all those writes to go to copies of file in RAM. On reboot the RAM overlay is reinstated with the underlying, read-only, files.

I used the instructions here: viewtopic.php?f=63&t=161416

This is a really elegant and simple solution to the read only root problem.

jtesta
Posts: 3
Joined: Thu Oct 05, 2017 4:21 pm

Re: RPI as a DHCP Server with a Read-only FS

Sun Oct 08, 2017 8:27 pm

NEVER MIND: I cleaned up the indents some of the blank lines and that solved the problem of the script not running.

Thank you for pointing me to the other thread. I am trying to run the script created by spock and am getting the following result:
RO Script Errors.jpg
RO Script Errors.jpg (108.83 KiB) Viewed 382 times
Any idea what is wrong?

jtesta
Posts: 3
Joined: Thu Oct 05, 2017 4:21 pm

Re: RPI as a DHCP Server with a Read-only FS

Mon Oct 09, 2017 4:33 pm

Got it working. Thank you!

Return to “Networking and servers”

Who is online

Users browsing this forum: No registered users and 13 guests