Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: plug on November 18, 2014, 12:07:50 PM
-
Sorry if I post the same post already revived, but unfortunately I find myself in the same situation as many and seamless.
After I configure the PC with TCL, for example:
- Ifconfig eth0 192.168.10.1 netmask 255.255.255.0 broadcast 192.168.10.255 up
- Route add default gw 192.168.10.1;
.. Network is seen in the PC with the command 'ping'.
Unfortunately, this does not remain after rebooting the PC.
I do not know how to solve it, and if anyone knows the solution can help me?
Thanks to the solution.
-
If you use the Network program from cpanel, the configuration will be added to bootlocal.sh and saved at backup time.
If you want to do it yourself then you need to add it to bootlocal.sh yourself also.
-
Hi Gerald,
how do I backup? I've never had a way to use it
-
You need to read the book.
http://distro.ibiblio.org/tinycorelinux/book.html
-
I wrote in bootlocal.sh manual configuration:
sudo ifconfig eth0 192.168.10.1 netmask 255.255.255.0 broadcast 192.168.10.255 up
sudo route add default gw192.168.10.1
I did backup in cpanel is now everything !!!
Thanks Gerald
-
Hi plug,
as fas as I know, commands in bootlocal.sh are executed with root access permission.
'sudo' should not be necessary.
regards
xyz-worx
-
I wrote in bootlocal.sh manual configuration:
sudo ifconfig eth0 192.168.10.1 netmask 255.255.255.0 broadcast 192.168.10.255 up
sudo route add default gw192.168.10.1
You are missing /etc/resolv.conf
-
thanks xyz-worx and bmarkus,
already done...but i have a huge problem:
it isn't permanent the file /etc/hosts.
I written the file bootlocal.sh the content of file hosts but .. nothing. It it is not written.
I attempted with also with root privilege, but nothing ....know how to do this?
Thanks
-
We can't identify the problem when you don't show us what you have done.
Show us your bootlocal.sh.
Instead of writing files in bootlocal.sh, why not add the modified files to .filetool.lst and do a backup ?
-
ok,
bootlocal.sh
------------------------
#!/bin/sh
ifconfig eth0 192.168.10.1 netmask 255.255.255.0 broadcast 192.168.10.255 up
route add default gw 192.168.10.1
echo pc1 > /etc/hostname
echo 127.0.0.1 localhost localhost.local > /etc/hosts
echo 192.168.10.1 pc1 > /etc/hosts
echo 192.168.10.2 pc2 > /etc/hosts
echo nameserver 192.168.10.1 > /etc/resolv.conf
/opt/eth0.sh &
-
Your echo stuff > /etc/hosts overwrites the file.
Just include
echo 192.168.10.1 pc1 >> /etc/hosts
echo 192.168.10.2 pc2 >> /etc/hosts
And leave the original contents alone.
Note the use of >> instead of >.
Unless you have configured a nameserver on this machine, you cannot have it be its own nameserver.
Why are you manually setting the IP address and then running /opt/eth0 ?
-
ok, i deleted /opt/eth0 and it is the same for the script.
Sorry, i don't understand the meaning of '>>' Can you explain to me better on symbol, gerald?
-
It is very basic.
http://linux.die.net/man/1/ash lookup redirections
Also Linux basics
http://rute.2038bug.com/index.html.gz
-
in the meantime, I solved.
The PCs are seen in the network with the use of ping.
thanks gerald