Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: ananix on September 20, 2012, 08:00:56 AM

Title: Terminal Server no DHCP
Post by: ananix on September 20, 2012, 08:00:56 AM
Hello im trying to make my first Terminal Server and pretty much just filled in /dev/sda1 the rest i just took default values (192.168.0.30-60) leaving out gw and dns, its just two computers in a dumb switch, but i dont see any dhcpd running and no port 68 in my netstat I do though see a port 69 for my tftp pxe boot.
Server has static ip 192.168.0.1
When i give the client static ip 192.168.0.2 they can communicate so physical net and protocol stack seems alright.
I can see in the tc service program that dhcp is running, think that must be client right?
The instructions kinda say you dont need anything else but it seems i need a dhcp server? (i mean terminal server script do not control and or load dhcpd if needed? Of course dhcp is needed for the setup thats not my question).
Title: Re: Terminal Server no DHCP
Post by: ananix on September 20, 2012, 08:33:28 AM
Ok installed dhcpd and reran the terminal server script overwriting config, now that part works but the pxe boot still does not now its complaining about TFTP
PXE-T01: cant open file
PXE-E3B: TFTP Error - File not found.

Any surgestions?
Title: Re: Terminal Server no DHCP
Post by: Rich on September 20, 2012, 08:49:42 AM
Hi ananix
See if this has any useful information:
http://forum.tinycorelinux.net/index.php?topic=8049.0
Title: Re: Terminal Server no DHCP
Post by: ananix on September 20, 2012, 08:59:04 AM
Thanks Ritch diffidently some usefull info i can work with to debug and if it does not solve the problem i have gotten alot smarter from the info there thanks, i cant test now as i have put the dhcp server into a test environment where they needed a dhcp server. When i get it back ill try and get the PXE boot to work again. The PXE was for now just optional.
Title: Re: Terminal Server no DHCP
Post by: ananix on September 20, 2012, 09:59:00 AM
ok i couldnt help it had to continue with this so i sneaked a wire in and have now been playing around dhcpd.conf nothing worked except changing ips just to see if it even reacted to anything.
I have tryed rewrite the entire conf file and use several different options for the boot file :(
Permissions should be fine and the service is running as root.

Im actualy down to BIOS firmware problem hmmm. I think ill try and find another client to test that.
Title: Re: Terminal Server no DHCP
Post by: ananix on September 20, 2012, 11:08:59 AM
ok
boot_file pxelinux.0
did the trick im gonna add this to the other post which says /netboot/pxelinux.0 and the original file just sayed pxelinux.0. As it all seemed to really work and really did seem like it could not find the file,  i also added a lease file which it did not use either. Then i started to work a little more on the contradicting path info and wupti there it was :)

Thanks for your help as usual Rich :)
Title: Re: Terminal Server no DHCP
Post by: ananix on September 20, 2012, 11:13:10 AM
PS can i assist in making programs? i would like to maintain the terminal server as im gonna make all these changes to my own version of it anyways.
dhcpd check
dhcpd install (after dialog)
new path syntaks
kill all services when terminal service is killed.
Title: Re: Terminal Server no DHCP
Post by: Rich on September 20, 2012, 12:25:15 PM
Hi ananix
Assistance is always welcome. As far as maintaining terminal server, I see Curagas name listed at the top of
that script, so you'll have to wait for his response.
Title: Re: Terminal Server no DHCP
Post by: curaga on September 20, 2012, 01:00:25 PM
I'm not sure what was the issue here, as last I tested it worked fine. It uses the busybox udhcpd server, no need to install any extensions.

Patches welcome of course, but let's try to find the issue first ;)
Title: Re: Terminal Server no DHCP
Post by: ananix on September 20, 2012, 01:30:14 PM
:)) love to spare about it and contribuate what ever we agree :) most importen to me is the sparing :))

I can only say what i experienced and what i would change in my edition (for my spin)
I have not check the scripts so this is pure user experience:
Server
Static IP 192.168.0.1 on eth0
"Terminal Server" in cpanel.
Added /dev/sda1
default value for the rest
left it hanging...

Client
PXE boot error no DHCP server on network
Boot windows
No dhcp
Static ip 192.168.0.2
Ping success between 192.168.0.1 and 2

Server
netstat -na | grep LISTEN reveals only port 69
ps aux | grep dhcp revieals nothing
Services in cpanel only reveals dhcp (client is my guess)
Then is start looking for some dhcp with common sense and find but nothing.
Through apps browser i install dhcpd
SIGINT terminal server
Run terminal server

Reboot client
Now i cant remeber if it worked in first try or if it was right about here i found out that SIGINT did not kill everything in terminal server, and from that point on i did it everytime i restartet terminal server i cant remember or maybe i did not test at the right time to know if it had any difference but anything i think it should die along with the rest.
PXE boot dhcp receiving 192.168.0.20
PXE File not found

Server
Now i see alot of info in udhcp.conf file not being as exspected forinstance the default values from terminal server script is not pressent but i still got interface descriped 0.20 so i start to wonder if server it using the file.
change the dhcp adresse to start 50 end 60

Reboot client and see changes reflected but still PXE no file

Server
Fitle about several options in udhcp.conf end up with four lines one being "boot_file pxelinux.0" and that does the trick and makes me a happy panda :))

In short to me it sums up like this
dhcpd check
dhcpd install after dialog
new path syntaks in udhcp.conf
kill all related services when terminal service is killed.

I can see others had same problem (though solved with different relativation of path) and i dont think adding the "patch" and "xtra features" would do anything bad for those of whom its already working but do alot for those where it dosnt. But its easy to test since it works out of the box for you if the new version works on both it should be an improvement *GG
Title: Re: Terminal Server no DHCP
Post by: Rich on September 20, 2012, 01:38:00 PM
hI ananix
If you wish to examine the script, look in  /usr/bin/tc-terminal-server
Title: Re: Terminal Server no DHCP
Post by: curaga on September 20, 2012, 01:47:18 PM
The script is not the most user-friendly one, in that it doesn't check for every possible error. There are no defaults, if you just press enter to a question, that value is left empty.

Many of the values are valid as empty, some are not. Some improved checks could certainly be added, perhaps I'll take a look this weekend. Or if you get to it before me, please send patches as usual (unified diffs, both inline in a forum post and downloadable).


I just tested with TC 4.6.1, worked ok:
qemu -cdrom TinyCore-4.6.1.iso -net nic -net socket,listen=:6668 # This is the server
qemu -net nic,model=virtio -net socket,connect=:6668 # This is the client, started up after terminal server is configured
Title: Re: Terminal Server no DHCP
Post by: ananix on September 20, 2012, 04:02:49 PM
He he i get it now it was just an "example" text *GGG i just ran it with your info in mind it was a "coincidence" it all "fitted" my setup.
Also i did not understand it as dns and gw had default values i just did not need them :)
i must say in this case i think less is more in terms of info and understanding but really the dialog was not and issue in my case and i dont think in any case because if you did need otherwise than "default" you WOULD type it in.
Title: Re: Terminal Server no DHCP
Post by: curaga on September 21, 2012, 09:27:20 AM
OK, so it worked?

I'll let you know when there's an improved script to test, if you'd like.
Title: Re: Terminal Server no DHCP
Post by: ananix on September 21, 2012, 09:39:02 AM
Im not following you whats working? *GG

The syntaks for udhcp.conf did not work for me, neither did dhcp, its all described in prior post :)

Another thing i would add was the option to seperate dhcp and pxe as one might have another dhcp server.
Title: Re: Terminal Server no DHCP
Post by: curaga on September 21, 2012, 09:43:09 AM
Using other servers is outside the scope of the script. If one wants to set up custom infra, it's quite possible, the script is just an example of how it works.

Quote
Im not following you whats working? *GG

You posted above:
Quote
i just ran it with your info in mind it was a "coincidence" it all "fitted" my setup.

I understood that as you tried again, and it "fitted" = worked.
Title: Re: Terminal Server no DHCP
Post by: ananix on September 21, 2012, 09:52:08 AM
I totaly respect your definetion of the scope of the script but to me it seems dhcp and pxe is two features one should be able to run with out the other. Writing this i understand in my mindset im moving more towards a DHCP with PXE feature "wizard" script rather than a "Terminal Server".
I also totaly understand now that its a "program" to show the power of TCL and not really a part of TCL itself as a linux core :) and as such its great, with a few already mentioned changes, most importenly new syntakts for udhcp.conf
Title: Re: Terminal Server no DHCP
Post by: gerald_clark on September 21, 2012, 09:54:03 AM
There is nothing stopping you from using alternate tools if you don't like the busybox tools that are included.
Personally, I use dnsmasq.
Title: Re: Terminal Server no DHCP
Post by: ananix on September 21, 2012, 12:51:37 PM
Sorry gerald i dont get it, can you single out an issue :/
I did not know busybox provides a dhcp server.
The tools and setup "terminal server" script uses really seems perfect to me and i was thinking of adopting the idea adding the the things i mentioned here. Im gonna write it from scratch though.
Im already working on similar cpanel invoked scripts for
mysql
apache
iptables
vsftpd
samba

The sudden need for a dhcp server and urge to try tcl pxe boot made me want a dhcp script too. All for my own distro as i do not such scripts my self. If you wanna you can see the unreleased and unorficial site here aoit.dk/aoit/acore.html

Im very interrested in sparing about dhcp tools as i have been using M$ dhcp all my life and know nothing else since i have only worked enterprises. Thats also why it did not come to me before one would want that in my distro :)
Title: Re: Terminal Server no DHCP
Post by: Rich on September 21, 2012, 12:56:38 PM
Hi ananix
If you enter  busybox  in a terminal, it will list what it provides.
Title: Re: Terminal Server no DHCP
Post by: ananix on September 21, 2012, 01:01:00 PM
For now dnsmasq is not what i want just checked, its out side the scope of my script ;) but thanks alot for the surgestion now i know about that too if im gonna need it :)
Title: Re: Terminal Server no DHCP
Post by: ananix on September 21, 2012, 01:05:37 PM
i see... a udhcp server and client i never knew.. does all unix'ses have this in their "system tool box"? [ No it seems to be for embedded devices and then adopted by busybox due to the nature of it.]
it also makes me wonder why did i need to install dhcpd, like it made curaga wonder.... and i know understand why it made curaga wonder :)
Title: Re: Terminal Server no DHCP
Post by: curaga on September 24, 2012, 02:33:34 PM
Please retry with 4.6.2.
Title: Re: Terminal Server no DHCP
Post by: ananix on September 24, 2012, 03:30:11 PM
Sorry for not adding version info, but i think you are right its not 4.6.2 could be as low as 4.5.6
Ill let you know when i have tried with 4.6.2
thanks