www.zeroshell.org Forum Index www.zeroshell.org
Linux Distribution for server and embedded devices
 
 SearchSearch  RegisterRegister  UsergroupsUsergroups 
 ProfileProfile  Log inLog in  Log in to check your private messagesPrivate Message 

problem with file /etc/hosts after reboot

 
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell
View previous topic :: View next topic  
Author Message
biga



Joined: 03 Sep 2012
Posts: 1

PostPosted: Mon Sep 03, 2012 5:34 pm    Post subject: problem with file /etc/hosts after reboot Reply with quote

Hi i am a new user of zeroshell, and i have a big problem.
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)
90.8.23.12 www.mytest.it
242.243.234.234 www.mystes2.com
after reboot the system the file lost this line

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

Thanks for your help.
Back to top
View user's profile Send private message
knura



Joined: 24 Jan 2011
Posts: 10

PostPosted: Sun Sep 30, 2012 5:36 am    Post subject: Re: problem with file /etc/hosts after reboot Reply with quote

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)
90.8.23.12 www.mytest.it
242.243.234.234 www.mystes2.com
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!

<entry into post boot script>
rm /etc/hosts
ln -sf /DB/path/name/to/my.etc.hosts /etc/hosts
</entry into post boot script>

In the Web UI:
System>Setup>Startup/Cron

HTH,
-- Arun Khan
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group