Tiny Core Linux
Tiny Core Base => TCB Talk => Topic started by: ashok.das8 on August 03, 2012, 01:17:05 AM
-
Hi all,
I am very new to tiny core. It came into my attention when i tried to create a virtual network of computers inside vmware. I installed in HD in vmware and it works fine. I just wanted to know how do I keep the static IPs assigned to interfaces after reboot. This question may looks like stupid but for a newbie like me its do or die situation. I am experienced with Ubuntu and it took my cli skills away but now I am back to stick with cli.
-
Hi ashok.das8
Open the control panel and click on the Network button. Enter your settings and click Apply. A script called
/opt/eth0.sh will be created to setup your network connection. A line will be added to /opt/bootlocal.sh to
call that script every time you boot.
-
Thank you for the replay. I am sorry that I could not make myself clear. Actually I am using CLI version and i dont want to install any GUI. So how to achieve the same in CLI?
-
"ifconfig <interface> <address>"
-
Hi ashok.das8
Createan /opt/eth0.sh script containing:
#!/bin/sh
pkill udhcpc
ifconfig eth0 192.168.1.30 netmask 255.255.255.0 broadcast 192.168.1.255 up
route add default gw 192.168.1.1
echo nameserver 68.237.161.12 > /etc/resolv.conf
echo nameserver 71.243.0.12 >> /etc/resolv.conf
Change the addresses to match your system.
Make it executable like this:
sudo chmod 775 /opt/eth0.sh
The route line is the gateway (your router) and the last two lines are name servers.
Add this to your /opt/bootlocal.sh file:
/opt/eth0.sh
-
Hi Rich
I did as you told but there is another thing, whenever i restart the system, the file eth0.sh is missing. I have /tce directory in /dev/sda1/tce. Now i think i am missing something in persistence. I have following in boot
kernel /boot/vmlinuz quiet tce=hda1
what could have gone wrong?
-
Hi ashok.das8
That should be kernel /boot/vmlinuz quiet tce=sda1
-
One needs to edit /opt/.filetool.lst
and add
/opt/eth0.sh
Add above script to startup script /opt/bootlocal.sh
Edit /opt/shutdown.sh
#!/bin/sh
# put user shutdown commands here
/usr/bin/filetool.sh -b
Now static IP stays as expected
As per this tutorial (http://blog.matchgenius.com/tinycore-nginx-server-with-php-cgi-and-vsftpd/#comment-5866)
-
Hi,
I'm new to Tiny Core linux, and I have the same problem as descibed here. I can't keep my IP setting after a reboot. I only have CLI, and trying all of the above doesn't help. All my modifications get erased, whatever I try. I'm running TC in a VM in VirtualBox to simulate hosts on a vlab.
Regards,
Stef
-
You need a persistent tce directory so you can run backup to save your changes.
Please check the wiki.