FreeNAS 8.0 Dhcpd 3 – Making The Installation Persistent
As FreeNAS 8.0 has been designed to run on a USB disk any changes which are made to the server are lost after a reboot.
Mounting the root filesystem as writtable in the first article allows you to install the ISC DHCP Server to the root filesystem but in order for the changes to be permanent after a reboot, the following steps need to be performed :-
- Logon to the FreeNAS server through SSH as root or open a shell on the console
- Copy the isc-dhcpd daemon to the /conf/base/etc/local/rc.d folder by executing the following command :-
cp /etc/local/rc.d/isc-dhcpd /conf/base/etc/local/rc.d/.
- Copy the rc.conf file to the /conf/base/etc folder by executing the following command :-
cp /etc/rc.conf /conf/base/etc/.
- Copy the dhcpd.conf file to /conf/base/etc folder by executing the following command :-
cp /etc/local/dhcpd.conf /conf/base/etc/local/.
- Copy the dhcpd folder to the /conf/base/var/db folders by executing the following command :-
cp -R /var/db/dhcpd /conf/base/var/db/.
Once the package finishes installing you then need to create the dhcpd user and group on the server. This has to be done through the web console so that the changes remain persistent after a reboot.
To create the dhcp user and group perform the following steps :-
- Logon to the FreeNAS Servers Web Console as the admin user
- Expand the Account branch in the Left Hand pane
- Expand the Users branch in the Left Hand pane and then click onView All Users
- Click on the Group tab and then click on Add New Group
- Create the dhcpd group as follows :-
Group ID – 136
Group Name – dhcpd
- Click on OK to the create the group
- Next click on the Users tab and then click on Add New User
- Create the dhcpd user as follows :-
User ID – 136
Username – dhcpd
Primary Group – dhcpd
Shell – nologin
Full Name – DHCP Daemon
Password – password
- Click on OK to the create the user