Tiny Core Linux
		Tiny Core Extensions => TCE Talk => Topic started by: amonel on January 05, 2017, 06:15:27 PM
		
			
			- 
				Hi there.
 
 I am thinking of using  Tiny Core, as DHCP server and client DHCP.
 
 Is have an example config file by chance?
 
 THX.
- 
				Hi,
 busybox'  udhcpd  is part of base.
 
 For a sample config file, see: https://udhcp.busybox.net/udhcpd.conf
 Goes to  /etc/udhcpd.conf .
 
 Remember to add this file to  /opt/.filetool.lst  and do a backup.
- 
				dnsmasq Can also be used for a very little dhcp server.
 
 And dnsmasq can be run in foreground for testing.
 And when done with correct config, just save the parameters and run as daemon.
- 
				Hi,
 Thank you for your answers,
 I saw that it was possible with dsnmasq, someone would have an example file by chance ???
 Thanks
- 
				Hi there
 
 Despite that I can not seem to recover an ip address on the extensions.
 this is my configuration:
 tc@box:$ sudo vi /usr/local/etc/dnsmasq.conf
 
 bogus-priv
 filterwin2k
 no-poll
 interface=eth0
 domain=xxxx.com
 dhcp-authoritative
 dhcp-leasefile=/tmp/dhcp.leases
 dhcp-option=3,192.168.1.1
 dhcp-option=19,8.8.8.8
 dhcp-range=192.168.4.10,192.168.4.200,255.255.255.0,12h
 dhcp-host=@mac,192.168.1.11
 dhcp-host=@mac,192.168.1.2
 
 :wq
 
 tc@box:$ sudo vi /opt/filetool.lst
 /usr/local/etc/dnsmasq.conf
 
 :wq
 
 tc@box:$ sudo filetool.sh -b
 
 tc@box:$ sudo reboot
 
 It doesn't work
 I am very new to tiny core.
 Could someone help me?
 thanks
- 
				For entries in  /opt/.filetool.lst  the leading "/" must be omitted.
 i.e.:
 usr/local/etc/dnsmasq.conf
 
- 
				Hi,
 
 sudo vi /opt/.filetool.lst
 
 opt/eth0.sh
 opt/eth1.sh
 usr/local/etc/dnsmasq.conf
 etc/hostname
 
 It doesn't work
- 
				Note that hostname is set in  /opt/bootsync.sh .
			
- 
				BTW,  sudo  shouldn't be needed for  filetool.sh .
			
- 
				Hi,
 It still doesn't work,
 Thanks,
- 
				I have this
 
 ls /opt/bootsync.sh
 /opt/bootsync.sh
 
 is it ok????
- 
				sudo vi /opt/bootsync.sh
 
 /usr/bin/sethostname box
 /opt/bootlocal.sh &
- 
				From  http://tinycorelinux.net/7.x/x86/tcz/dnsmasq.tcz.info
 [...]
 Example config file located at /usr/local/etc/dnsmasq.conf.example
 dnsmask defaults to /etc/dnsmask.conf. To override the default, use:
 dnsmasq --conf-file=/usr/local/etc/dnsmasq.conf
 [...]
 
- 
				I will also mention that use filetool.sh -bvto see verbose what files being backed up.
- 
				Hi,
 
 filetool.sh -bv
 
 home/tc/.xsession
 home/tc/.setbackground
 home/tc/.Xdefaults
 home/tc/.wbar
 home/tc/.local/
 home/tc/.local/bin/
 home/tc/.X.d/
 home/tc/.fltk/
 home/tc/.fltk/fltk.org/
 home/tc/.fltk/fltk.org/filechooser.prefs
 opt/
 opt/.filetool.lst
 opt/tcemirror
 opt/filetool.lst
 opt/eth0.sh
 opt/eth1.sh
 opt/backgrounds/
 opt/bootsync.sh
 opt/.xfiletool.sh
 opt/shutdown.sh
 opt/bootlocal.sh
 gzip: short write
 Done
- 
				You may see: gzip: short write... at the end of this.
 Do you have enough disc space ??
- 
				Yes, what should I do
			
- 
				Yes I have, what should I do??????
			
- 
				Hello
 How i do to solve the gzip problem,
 I also have an error message:
 Tce is not writable
 Could someone help me?
 Thanks,
- 
				Fatal Error:TCE directory is no writable
			
- 
				The fact that you get this: $ filetool.sh -bv
 
 home/tc/.xsession
 home/tc/.setbackground
 ...
 opt/shutdown.sh
 opt/bootlocal.sh
 gzip: short write
 Done
 ..would seem to indicate that you were able to write some of your backup to your /tce folder, but then the partition became full.
 
 Unless you deleted some files or increased the partion size on which your /tce folder resides, the partition will still be full, which might then explain the "Fatal Error:TCE directory is not writable" message.
 
 This should show how much free space you have:$ df -h /dev/sda1..where you need to substitute "sda1" with the name of the device you are using.
- 
				I have another problem,
 I reinstall tiny core but when I create a file with the command:
 
 Sudo touch /usr/local/etc/dnsmasq.conf
 
 After rebooting, I lose the dnsmasq.conf file I created.
 It can come from what?
 
 Someone can help me?
- 
				I have another problem,
 I reinstall tiny core but when I create a file with the command:
 
 Sudo touch /usr/local/etc/dnsmasq.conf
 
 After rebooting, I lose the dnsmasq.conf file I created.
 It can come from what?
 
 Someone can help me?
 
 Seems like same issue as earlier, You will need to add " usr/local/etc/dnsmasq.conf " to /opt/filetool.lst  then make a backup
 otherwise the file will be missing on reboot.
 
- 
				Hi,
 
 I just do this but I still lose the file at startup,
 
 Cat /opt/filetool.lst
 Usr / local / etc / dnsmasq.conf
 
 further
 Ls -l / usr / local / etc /
 I can't find my  file  dnsmasq.conf
 
 It can come from what?
 Please
 
 thanks,
- 
				Hi,
 When I put it in
 /opt/.filetool.lst
 
 After reboot,
 I find my file, now I hope I will run this dnsmasq,
 thanks,
- 
				From  http://tinycorelinux.net/7.x/x86/tcz/dnsmasq.tcz.info
 [...]
 Example config file located at /usr/local/etc/dnsmasq.conf.example
 dnsmask defaults to /etc/dnsmask.conf. To override the default, use:
 dnsmasq --conf-file=/usr/local/etc/dnsmasq.conf
 [...]
 
 To prevent further errors, read the info files of extensions carefully (via tce-ab and/or Apps GUI), too.
 i.e.
 [...] defaults to /etc/dnsmask.conf. [...]"
 
 
- 
				Hi,
 thanks,
 I see the doc,
 Is what you have a sample configuration already test ???
 It will allow me to see my mistakes ???
 thanks,
- 
				Hi,
 At what level can I find the dnsmasq leases in tiny core to configure my dhcp ??
 someone can help me???
 Thanks
- 
				Hi,
 
 In the sample file dnsmasq.conf.example
 I have the line dhcp-leasefile = /var/lib/misc/dnsmasq.leases
 
 I do not find the file /misc/
 Is it possible to bypass it?
 Is there another alternative ??
 
 I assume that dnsmasq.leases can be created
 
 Thanks for helping me.
- 
				Maybe the directory  /var/lib/misc/  needs to be created (it doesn't exist by default) so that  dnsmasq  can create files there?
			
- 
				thanks,
 I will see if dnsmasq will create it but for dnsmasq.leases, I have to create it ???
 thanks again,
- 
				Good morning,
 I have a question, when I configure an ip address with
 Ifconfig 192.168.99.14 netmask 255.255.255.0 gw 192.68.99.1
 
 
 After reboot,
 I lose my configuration.
 
 What can cause this?
 
 On Tiny core,
 I can not get this command:
 Sudo service dnsmasq restart ?????
 
 someone can help me please???.
 
 Thank you,
- 
				Hi,
 In Tiny Core,
 Is there some other way to execute the network setup that is in /etc/network/interfaces?or /etc/networking restart????
 
 Thanks for helping me.
- 
				The cause is the nature of Tiny Core.
 You really should read the Core book.
 http://tinycorelinux.net/corebook.pdf
 
 If the connection has been configured via  network  tool, then a script with the name of the interface (e.g. eth0.sh) is stored in  /opt  and a respective entry is written to  /opt/bootlocal.sh  (so it's started at boot).
 
 As always, refreshing the backup is needed in order to survive reboots.
 The directory  /opt  is configured to be included in the backup by default.
 
 If you have created the connection manually, directly in the console via commands, then there is nothing to be saved.
 If you have created a script to start your connection, then you have to add this script to your backup manually (except for files in /opt) and create a respective entry, for example in  /opt/bootlocal.sh , if you want it to be started at boot.
 
 Services are managed differently on Core:
 sudo /usr/local/etc/init.d/dnsmasq restart
 
For most services, you can also use the  services  tool.
- 
				Hi there,
 I have a problem,
 When I put information in
 /opt/resolv.conf
 / Etc / hosts
 
 After reboot,
 I dont find this information,
 
 someone Could  help me?
 
 thanks
- 
				/etc/hosts  is recreated at boot to include the hostname.
 You could add something like this to  /opt/bootsync.sh
 cat /path/to/your-custom-hosts-file >> /etc/hosts &
 
just below
 /usr/bin/sethostname box
 
- 
				Hi,
 I didn't understand,
 Please,
- 
				Maybe I misunderstood you.
 I thought you have edited  /etc/hosts , added it to  /opt/.filetool.lst  and made a backup but your edits were gone after reboot.
 If that's correct, then I don't know how to give better instructions.
 Otherwise, please rephrase your question.
- 
				I dit this,
 But i lose my data after reboot
- 
				Here is my configuration:
 
 cat /opt/bootsync.ch
 /etc/hosts
 /usr/bin/sethostname box
 /etc/resolv.conf
 
 
 cat /etc/hosts
 127.0.0.1  localhost
 @ip        name1.domain.com
 @ip        name2.domain.com
 
 
 cat /etc/resolv.conf
 domain    domain.com
 search    domain.com
 
 cat /opt/eth0.sh
 echo nameserver @ip > /etc/resolv.conf
 echo nameserver @ip >> /etc/resolv.conf
 I lose this after reboot
 
 cat /etc/hosts
 @ip        name1.domain.com
 @ip        name2.domain.com
 
 cat /etc/resolv.conf
 domain    domain.com
 search    domain.com
 
 cat /opt/eth0.sh
 echo nameserver @ip > /etc/resolv.conf
 echo nameserver @ip >> /etc/resolv.conf
 
 I try to understand why I lose my configuration, that's my question or my questions????
 
 Thanks for help
- 
				cat /opt/bootsync.ch
 /etc/hosts
 /usr/bin/sethostname box
 /etc/resolv.conf
 
 
 Sorry, this doesn't make sense to me.
 
 I suggest you read this
 http://tinycorelinux.net/book.html
 to get an understanding how Core Linux works.
- 
				Hello,
 Do you have the same documentation in French?
 I ask a lot of questions, it's true
 I had never worked on Linux distributions.
 please,
 Thanks
- 
				Good evening,
 
 On tiny core,
 There is a command to get an ip address from a dhcp server ??
 
 thanks,
- 
				The documentation is English only, I'm afraid.
 
 Core Linux tries to get an IP via DHCP for ethernet at boot by default unless the  nodhcp  boot code is used.
 
 To get an IP assigned via DHCP after boot, you can use something like this:
 #!/bin/sh
 
 [ "`id -u`" -eq 0 ] || { echo "Must be root." ; exit 1 ; }
 
 pkill udhcpc
 udhcpc -b -i eth0 -x hostname:box -p /var/run/udhcpc.eth0.pid
 
 
You could safe it as, for example,  /opt/eth0-dhcp.sh  and it needs to be run with  sudo .
 
 Or use the  Network  GUI tool.
- 
				Thanks,
 
 On tiny core,
 There is a command to configure an ipv6 address
 
 thanks,
- 
				It is /sbin/ifconfig eth0 inet6 add 2001:abcd::1/64