Re: Re: problem with file /etc/hosts after reboot

Forums Network Management ZeroShell problem with file /etc/hosts after reboot Re: Re: problem with file /etc/hosts after reboot


@biga wrote:

When i reboot the file /etc/hosts the file lost my entry.
I must edit the file hosts because i solve the name that non implemented in the dns like this
(an exalmple ip) (host name)
after reboot the system the file lost this line

How to add this entry in the file after reboot the system?

The “root” file system is created in a ram disk; it is created afresh when you boot ZS. Therefore your /etc/hosts will be overwritten with the ZS default, in the next boot.

For persistence, you can create a file, with the “extra” entries to your requirements, somewhere in the third partition (the DB partition) and you can link /etc/hosts to it using a post boot script. Make sure that you copy over ZS’s entries into this file as well, for it’s own operation!

rm /etc/hosts
ln -sf /DB/path/name/to/my.etc.hosts /etc/hosts

In the Web UI:

— Arun Khan