Tiny Core Linux

General TC => General TC Talk => Topic started by: jconnor on December 28, 2010, 09:11:16 PM

Title: Terminal Services... NEED HELP
Post by: jconnor on December 28, 2010, 09:11:16 PM
I am new to Tiny Core Linux so please keep responses on the "dummy" level.

I have TCL installed on one computer "mothership" and have been able to net boot another computer after I setup Terminal Services on the mothership computer.  All I did was go into the Control Panel and press on the Terminal Services button and answer the questions that came up.  Very simple....

It all works, but I was expecting the client computer that is net booting to have the same applications installed as the mothership.  It just comes up as a bare bones TCL install.

I have looked at the Wiki for netbooting and it makes no sense to me.  There are commands that point to paths that I don't have on my install.  It appears that the Wiki may be out of date.... maybe.

I really need to understand how to get the client computers to have the same setup as the mothership as far as installed applications.  Is there a simple way of setting this up in TCL 3.4?  I don't want to do anything fancy. 

It appears that my install is attempting to use TFTPd.  The Terminal Services window indicates that the TFTPd has a server error (0) and is aborted.  Then it shows several lines tftpd: Can't open file.

thanks!

Title: Re: Terminal Services... NEED HELP
Post by: tinypoodle on December 28, 2010, 09:49:28 PM
I really need to understand how to get the client computers to have the same setup as the mothership as far as installed applications.  Is there a simple way of setting this up in TCL 3.4?  I don't want to do anything fancy. 

One possible approach would be Dynamic root filesystem remastering as described here:
http://wiki.tinycorelinux.com/Dynamic+root+filesystem+remastering
Title: Re: Terminal Services... NEED HELP
Post by: jconnor on December 29, 2010, 02:00:15 AM
thanks, but I would like to do this without remastering.  Is there a way to do this "out of the box" when you press the terminal services button in the control panel?

I attempted to do the tutorial listed in the WIKI for netbooting and it does not work.

Title: Re: Terminal Services... NEED HELP
Post by: tinypoodle on December 29, 2010, 03:42:43 AM
What I have done is symlinking files on server box into /netboot so they would be accessible by tftp from client machine after boot.
Title: Re: Terminal Services... NEED HELP
Post by: curaga on December 29, 2010, 05:02:48 AM
With the multitude of ways to set a TC install up, it wouldn't really be reasonable to attempt to reproduce the server to the clients. Nor is that always wanted.

One is not restricted to using the same server for booting and say extensions, but it is possible. You could for example share your extension directory over NFS, and add the required bootcodes to the clients' boot config.

edit: The tftplist option would be the easiest to set up on a vanilla TC, I believe.
Title: Re: Terminal Services... NEED HELP
Post by: jconnor on December 29, 2010, 10:17:12 AM
I have a server computer with TC installed.  I have several computers with no harddrives that can do the PXE netboot.  I would like these computers to be able to boot to a customized desktop that already has the web browser on the toolbar.  Currently I press the Terminal Services button on the Server computer and I can boot my client computers to a standard TC desktop.  However, I need the clients to boot up with a browser in the toolbar.

Can someone give me step by step directions on how to accomplish this?  I am not very familiar with tftp and nfs, so please understand that I need some step by step advice here.

I get the idea of setting up an NFS for tftp to access, but I am missing something because when I attempt to set this up according to the WIKI, it does not work.  I may need some help understanding the details of how to setup the NFS.

The clients always seem to be using the /netboot dir for booting.  I have noticed that this dir gets recreated every time you start terminal services, which completely blows away any configuration that I setup in pxelinux.cfg/default.

I had setup the /tftpboot/nfs/ws1 dir as specified in the wiki, but it doesn't seem to be used for anything.

I really like this idea of netbooting clients with no storage devices, but my limited knowledge of the tftp and nfs seems to be a roadblock to achieving my goal.
Title: Re: Terminal Services... NEED HELP
Post by: curaga on December 29, 2010, 10:43:28 AM
To have a browser at all the clients (I'm just paraphrasing the wiki):

- set up terminal server
- copy a browser extension and all deps to /netboot (example uses opera.tcz with no deps)
- list them all in a list:
Quote
cd /netboot
ls *.tcz > my.list
My example my.list would contain one line "opera.tcz".
- add the boot option "tftplist=1.2.3.4/my.list" to the APPEND line in  /netboot/pxelinux.cfg/default

1.2.3.4 being the server's IP.
Title: Re: Terminal Services... NEED HELP
Post by: gerald_clark on December 29, 2010, 10:50:31 AM
The netbooting with NFS instructions are are not written for netbooting FROM a TC machine.
They assume you want to boot TC from a normal Linux server.
You just need to adjust your directory structure to fit the TC server.
Title: Re: Terminal Services... NEED HELP
Post by: jconnor on December 29, 2010, 10:56:54 AM
I like the curaga's solutions, but I have two issues with it.

1.  When I try to do the command ls *.tcz > my.list I get permission denied.  I tried using sudo but that did not work either.  Is there a default password for su?
2.  If I restart the terminal server, all my tcz files in /netboot are erased and my boot option is set back to the default.

I feel like I am getting closer  ;D

Title: Re: Terminal Services... NEED HELP
Post by: curaga on December 29, 2010, 12:36:07 PM
I like the curaga's solutions, but I have two issues with it.

1.  When I try to do the command ls *.tcz > my.list I get permission denied.  I tried using sudo but that did not work either.  Is there a default password for su?

Use "sudo su" to get a root shell

Quote
2.  If I restart the terminal server, all my tcz files in /netboot are erased and my boot option is set back to the default.

You can edit the file (as root) with any editor you like. The included FLTK editor is easy to use:

sudo editor /netboot/pxelinux.cfg/default

Edit: Fixed the text.
Title: Re: Terminal Services... NEED HELP
Post by: jconnor on December 29, 2010, 01:04:51 PM
Thanks curaga.  I have been editing the /netboot/pxelinux.cfg/default with the append you suggested, but if I restart the terminal services all the edits I make to default are erased and all the tcz files I place in /netboot are erased.  Is there a way to edit the terminal services service to not blow away the /netboot directory? 

My concern is that if I reboot the server and start the terminal services, the service will blow away the additions to the default file and also all the extensions copied over to /netboot.

I am assuming that there must be a conf file for the tc-terminal-service application somewhere that would allow control of /netboot directory.
Title: Re: Terminal Services... NEED HELP
Post by: tinypoodle on December 29, 2010, 01:26:18 PM
I have added 'netboot' to /opt/.filetool.lst so the whole dir is in backup.
That after first symlinking the kernel and the cpio's (e.g. tinycore.gz) and whatever other data files I have added to /netboot so besides from config files only symlinks get backed up.
Title: Re: Terminal Services... NEED HELP
Post by: jconnor on December 29, 2010, 01:37:08 PM
I understand the .filetool.lst and use it to persist my backgrounds, but the main problem is that whenever the terminal services application starts it completely rebuilds the /netboot directory, erasing all the tcz files and all edits to the default configuration file.  The .filetool.lst is just for solving the reboot issue off persisting a directory, but the problem is with the terminal services application.

If you edit the /netboot/pxelinux.cfg/default file and then go to the control panel and press on the terminal services button the terminal services application will start.  If you then go to /netboot/pxelinux.cfg/default and edit the file you will see that all the edits are now gone.  It appears that the terminal services app deletes the /netboot directory and contents and rebuilds it whenever it is started.  I am trying to understand how I can get the terminal services app to not do this, because I don't want to have to manually edit the default file every time I start the terminal services.
Title: Re: Terminal Services... NEED HELP
Post by: curaga on December 29, 2010, 01:53:25 PM
There is no need to restart the servers if you only edit the pxelinux config file.


As for starting afresh, it's the intention that the wizard is first-time only, and after everything's in place, one would save /netboot somehow (backup) and launch the servers from, say, bootlocal.sh.

It's true that there currently isn't an option in the wizard to just start the servers with an existing config dir; nobody's said they needed one so far, all it takes is to copy the two lines to where-ever one wants to start them from.

edit: Such an option coded ;)
Title: Re: Terminal Services... NEED HELP
Post by: jconnor on December 29, 2010, 02:08:27 PM
Okay, I think that I am confusing the wizard with the actual service.  Is there a way to just start the service and have it use the existing /netboot?  If I setup the filetool.lst to persist the /netboot directory and setup the bootlist.sh to start the terminal services app and use the edited /netboot directory I would be in business.

I guess I am not sure how to start the terminal service without using the control panel and terminal services button.  I didn't realize that this button was just a wizard.  I tried using the tc-terminal-services command line in a terminal, but it seems to do the same thing.

I guess I am down to two remaining questions:
1.  How do I start the terminal service so that it uses the edited /netboot directory?
2.  How do I modify the bootlist.sh to start the terminal services on boot for the server computer?

Code: [Select]
It's true that there currently isn't an option in the wizard to just start the servers with an existing config dir; nobody's said they needed one so far, all it takes is to copy the two lines to where-ever one wants to start them from.I didn't understand this last statement.  Can you elaborate?
Title: Re: Terminal Services... NEED HELP
Post by: curaga on December 29, 2010, 02:16:34 PM
Quote
1.  How do I start the terminal service so that it uses the edited /netboot directory?

Currently you would do that manually (by manually executing the lines). On boot: by copying the two server lines to bootlocal.sh (udpsvd... and udhcpd...) from tc-terminal-server.

Quote
I didn't understand this last statement.  Can you elaborate?

The first part - nobody has asked so far for the wizard to start the servers on an existing config. It might just be that how to do that is self-evident to a typical TC user (and TC dev ;)).
Now that you asked, it was not hard to implement, you'll possibly see it in the next TC release.

The second - the last couple lines of the tc-terminal-server script do the actual work of starting the servers. So far users have just copied them to where-ever they need them.
Title: Re: Terminal Services... NEED HELP
Post by: jconnor on December 29, 2010, 02:45:27 PM
Sweet!!!  I think I finally get it.  I made my own little script with the final lines and started it and the default file stayed untouched.  I will test the whole scenario on my system later today and will get back to you.  I think everything is covered though.

My custom script is called tcStart.  Can I just add that line to the bootlist.sh script for it to be started on boot?

Thanks for all your help curaga!!!!!!
Title: Re: Terminal Services... NEED HELP
Post by: curaga on December 29, 2010, 02:57:58 PM
Quote
My custom script is called tcStart.  Can I just add that line to the bootlist.sh script for it to be started on boot?

If it's in $PATH, and executable, yes.
Title: [SOLVED Re: Terminal Services... NEED HELP]
Post by: jconnor on December 30, 2010, 10:03:36 AM
I tested this on my system last night and it worked great!  Thanks for the help!