Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: guillaumetld on August 02, 2011, 09:47:29 AM

Title: TC Server and clients
Post by: guillaumetld on August 02, 2011, 09:47:29 AM
Hi everybody !
I have a question for you.

I have more or less 20 PCs, old ones (Pentium 3, 512Mb RAM mostly), connected to a server. These computers are used only to access to a database, located on another server, using firefox. Then i would like to have a very small and very fast linux distribution, which could boot in the RAM in these computers. Nevertheless, i dont want to do any update directly on the machines, but use the server to make the updates for all the computers at the same time.

Can I use TCLinux for client, for server ?

I have 2 test machines available, but i dont know if TCLinux can be adapted or is made for what i want.


Thank you very much, and sorry for my english, i am french, but intern in USA.
Title: Re: TC Server and clients
Post by: Rich on August 02, 2011, 11:03:58 AM
Hi guillaumetld
Here are a couple of links to get you started:
http://wiki.tinycorelinux.net/wiki:netbooting
http://forum.tinycorelinux.net/index.php?topic=3937.0
Title: Re: TC Server and clients
Post by: guillaumetld on August 02, 2011, 11:47:43 AM
Thank you !

I just have to check some things on the OS itself, and i read this just after, but it seems it's exactly what i am looking for !
Title: Re: TC Server and clients
Post by: guillaumetld on August 03, 2011, 01:17:44 PM
Hi guys !

I can connect to this. I use the wiki path, i configure my tc-terminal-server with default options.

Then i boot my client for network. On his screen, that's what i see:
Quote
Client Mac Addr: 00 02 A5 57 31 C1 GUID: DEFB254B-411E-D511B0D2-D93D43436719
Client IP: 192.168.0.20 MASK: 0.0.0.0 DHCP IP: 192.111.1.67
TFTP:......

Quote
PXE-E32: TFTP open timeout
TFTP......

And after it exit and boot on HD


Can you help me ?


edit: I tried it again, and now, it doesnt find the DHCP server. My first station is installed in frugal installation on HD.
Title: Re: TC Server and clients
Post by: curaga on August 04, 2011, 09:26:56 AM
Perhaps your hw too needs "boot_file /netboot/pxelinux.0" added to the dhcp config file (without the "option" in the start)?

Any messages in the server's window?
Title: Re: TC Server and clients
Post by: guillaumetld on August 04, 2011, 10:43:58 AM
OK, my dhcp.conf is like this (without comments)
Quote
start
end

interface

opt dns
option  subnet
opt router
opt lease 864000
opt tftp 192.111.1.67
127.0.0.1
option bootfile /netboot/pxelinux.0


I have juste "tftp timeout" several times in the server window.
Title: Re: TC Server and clients
Post by: curaga on August 04, 2011, 12:14:44 PM
It does need an entry for each point, just pressing enter would create empty entries like that. There are no universal defaults, each network is different.
Title: Re: TC Server and clients
Post by: guillaumetld on August 08, 2011, 09:42:55 AM
ok, i thought just press enter was fine, now i corrected it.

I have now:
Quote
start 192.168.0.30
end 192.168.0.60

interface eth0
option subnet 255.255.255.0
option tftp 192.168.0.20
option /bootfile/pxelinux.0


Now it works perfectly !

Thank you very much !



Title: Re: TC Server and clients
Post by: guillaumetld on August 09, 2011, 10:13:43 AM
How can i add some extensions like firefox, or make modifications on my clients on the server.

I mean, what have i to add to the conf files on /netboot ?
Title: Re: TC Server and clients
Post by: curaga on August 09, 2011, 12:49:04 PM
You could either remaster, or have the clients mount extensions off a network share on the server. See the wiki.
Title: Re: TC Server and clients
Post by: guillaumetld on August 17, 2011, 07:57:24 AM
Hi, i have still some problems and questions.

I would like to make a frugal install (or a normal one) of TClinux on my thin clients using the server. I mean is there an option to add in the conf files to install on the client?

Moreover, i saw that everytime i reboot my server,  /netboot is deleted. Is there a mean to have a permanent folder for that, I would like to launch tc-terminal-server at boot on the server. Is it possible ?
Title: Re: TC Server and clients
Post by: Rich on August 17, 2011, 08:12:29 AM
Hi guillaumetld
You didn't actually say but I assume the server is also Tinycore. If you add the line

netboot

to the file   /opt/.filetool.lst   that directory will be backed up when you reboot and restored when
Tinycore loads.

A frugal install would mean the workstations could boot without the server. Is this what you want?
Title: Re: TC Server and clients
Post by: guillaumetld on August 17, 2011, 08:25:28 AM
Yes. In fact, i would like the stations can boot without server, even in a minimal mode with no updates at all, in case of server crash. The activity of the clients shold not stop if the server have a problem.

So:

Usual boot: Net boot, with server
In case of crash: possibility to boot localy (so need at least one local installation)
Title: Re: TC Server and clients
Post by: Rich on August 17, 2011, 08:39:15 AM
Hi guillaumetld
I see what you are trying to do. The simplest thing would probably be to boot each workstation
from a CD and run the Install utility from the Control panel. Then install the minimum number of
apps you need. I don't know anything about remote booting but you have to insure that your
setup can find the remote  /tce  directory when booting from the server.
Title: Re: TC Server and clients
Post by: guillaumetld on August 17, 2011, 09:02:57 AM
The problem is that the stations are not at the same physical place (some US, other Canada), so i can't install them directly from CD.
Title: Re: TC Server and clients
Post by: Rich on August 17, 2011, 09:18:18 AM
Hi guillaumetld
You can probably do the install from your location, but I don't have the knowledge on how to do it.
Maybe someone else on the forum can provide some guidance.
Title: Re: TC Server and clients
Post by: guillaumetld on August 17, 2011, 09:32:39 AM
When using tc-terminal-server command, i am asked "boot options ?". I never add something here. Maybe i can use an install option, but i dont know the good one.

Do you know the command to use for a frugal install with a CD boot ? (i can try the same ?).
Title: Re: TC Server and clients
Post by: Rich on August 17, 2011, 10:13:24 AM
Hi guillaumetld
I can't give you specifics, but I will give you a brief overview of what a frugal install looks like.

The workstations disk needs the following:
A partition formatted with a Linux file system (EXT2,EXT3, or EXT4)
A bootloader (grub-0.97-splash.tcz for this example)
A /tce directory for any apps you wish to load when booting locally
The file  /boot/grub/menu.lst  tells grub where to find Tinycore and any extra boot codes you need
The  /boot  directory should have the files  bzImage  and  tinycore.gz

I won't go into any more detail than that because I don't want to give you bad information.
Title: Re: TC Server and clients
Post by: guillaumetld on August 18, 2011, 05:24:07 AM
Is it possible then to do a script beginning after PXE boot and containing the install instructions ?
Title: Re: TC Server and clients
Post by: Rich on August 18, 2011, 06:35:32 AM
Hi guillaumetld
I don't see why not. If the workstations will only be running Tinycore and the hard drives don't contain
anything important, that would help to simplify things since you could reformat instead of
repartitioning.
Title: Re: TC Server and clients
Post by: guillaumetld on August 18, 2011, 07:37:02 AM
I can reformat the thin stations, it's not a problem !
Title: Re: TC Server and clients
Post by: Rich on August 18, 2011, 02:22:45 PM
Hi guillaumetld
You said you have a workstation by the server and the the disk can be reformatted, so that's
convenient and we can't hurt the workstation. Since none of our more skilled members have stepped
up I'll give it a shot. I've never tried to do a remote installation so this is new to me too.

You will need the following extensions for the workstation
util-linux-ng.tcz
grub-0.97-splash.tcz

You'll need to access the workstation, so that needs to be set up. I personally use dropbear on
my file server and access it from my local machine using openssh.

Assuming the workstations hard drive is hda
Format the drive
Code: [Select]
mkfs.ext3 /mnt/hda1Install grub
Code: [Select]
grub
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

You now need to copy  bzImage  and  tinycore.gz  to  /mnt/hda1/boot. You'll have to copy those from
the directory the workstation booted from.

Create your local tce directory
Code: [Select]
mkdir /mnt/hda1/tceCopy the files and subdirectories from the tce directory the workstation reads when booting remotely
to  /mnt/hda1/tce.

Things I've probably missed:
1. Some of these steps may require you to be root
2. Some of these steps may require you to mount or unmount the drive first
3. You might need to set up a password if using SSH

Things to watch out for
1. How to handle the workstations backup.tgz. Local versus remote settings.
2. When remote booting, making sure remote and NOT local /tce directory is found.

If any of these steps are incorrect you should receive an error message. I'm afraid that's the best I
can offer for now, no promises that it will work. If anyone spots any errors please say so and I'll
correct this post.  Good luck guillaumetld

Title: Re: TC Server and clients
Post by: guillaumetld on August 22, 2011, 08:17:23 AM
Thank you very much, i'll check this as soon as possible.

Nevertheless, i have a problem with the backup on my server.
I made a frugal install on it, and i would like to save the /netboot directory created during tc-terminal-server.

When i make a backup of hda1, and when i restore it, it's ok, but i would like to have the restoration on boot. I disabled the "norestore" option on a conf file (dont remember which one), but it still doesn't works.
Title: Re: TC Server and clients
Post by: Rich on August 22, 2011, 08:43:30 AM
Hi guillaumetld
If your  netboot  directory is in the root directory, all you should have to do is add the line
netboot
without a leading / to your  /opt/.filetool.lst file and it will automatically be backed up and restored.
If it's located at  /mnt/hda1/netboot  then add
mnt/hda1/netboot
instead, once again, no leading / .

Title: Re: TC Server and clients
Post by: guillaumetld on August 22, 2011, 10:16:01 AM
I did that, but it doesn't work.
Title: Re: TC Server and clients
Post by: Rich on August 22, 2011, 10:23:45 AM
H guillaumetld
Please post the result of
cat /proc/cmdline
Title: Re: TC Server and clients
Post by: guillaumetld on August 22, 2011, 10:33:02 AM
initrd=/boot/tinycore.gz quiet opt=hda1 home=hda1 waitsub=5:UUID="ed0652c4-c513-46b0-8efc-56566fb900e1" tce=UUID="ed0652c4-c513-46b0-8efc-56566fb900e1" BOOT_IMAGE=/boot/bzImage
Title: Re: TC Server and clients
Post by: Rich on August 22, 2011, 10:50:05 AM
Hi guillaumetld
What is the result of
sudo find / -name mydata.tgz
Title: Re: TC Server and clients
Post by: guillaumetld on August 22, 2011, 11:02:46 AM
/mnt/hda1/mydata.tgz
/mnt/hda1/tce/mydata.tgz
Title: Re: TC Server and clients
Post by: Rich on August 22, 2011, 11:13:33 AM
Hi guillaumetld
Your problem appears to be that you are backing up to the hard drive and restoring from a non-existant
mydata.tgz file from a USB drive. Is the server booting from the hard drive or the USB drive?
Title: Re: TC Server and clients
Post by: guillaumetld on August 22, 2011, 11:17:12 AM
It boots from the Hard drive.
Title: Re: TC Server and clients
Post by: Rich on August 22, 2011, 11:24:07 AM
Hi guillaumetld
OK, unplug the USB drive, reboot, and see if your  netboot directory shows up now.
If it does, you might want to consider using the  tce  directory on the hard drive unless you have a
reason for using the one on the USB drive.
Title: Re: TC Server and clients
Post by: guillaumetld on August 22, 2011, 11:25:59 AM
The fact is I dont have any USB drive on this computer...
Title: Re: TC Server and clients
Post by: Rich on August 22, 2011, 11:32:28 AM
Hi guillaumetld
Now it all makes sense. Go to the  /mnt/hda1/boot/grub  (assuming your using grub) directory and
open the file  menu.lst
Replace  waitsub=5:UUID="ed0652c4-c513-46b0-8efc-56566fb900e1" tce=UUID="ed0652c4-c513-46b0-8efc-56566fb900e1"  with  tce=hda1  and reboot.
Title: Re: TC Server and clients
Post by: guillaumetld on August 22, 2011, 11:39:37 AM
no grub directory in /mnt/hda1/boot. only bzImage, extlinux (directory) and tinycore.gz
Title: Re: TC Server and clients
Post by: Rich on August 22, 2011, 11:43:46 AM
Hi guillaumetld
OK, go into the  extlinux  directory, the file is probably called  extlinux.conf
Title: Re: TC Server and clients
Post by: guillaumetld on August 22, 2011, 11:59:20 AM
Yes ! It works now !

Thank you VERY MUCH !
Title: Re: TC Server and clients
Post by: Rich on August 22, 2011, 12:04:46 PM
Hi guillaumetld
Glad to hear it.
On a side note, since you have persistent  /home  and  /opt  directories, you can remove any lines
that begin with  home  and  opt  from your  /opt/.filetool.lst  file if you don't want those directories
backed up and restored every time you reboot.
Title: Re: TC Server and clients
Post by: guillaumetld on August 22, 2011, 12:05:57 PM
In fact i have already did that, there is just my netboot entered in /opt/.filetool.lst
Title: Re: TC Server and clients
Post by: guillaumetld on August 24, 2011, 12:01:34 PM
Hi !

A few other questions, should be easier ones.


How can i add a network printer ?
How can i change the right click menu on desktop ?

Thank you very much !
Title: Re: TC Server and clients
Post by: Rich on August 24, 2011, 12:57:05 PM
Hi guillaumetld
I'm pretty sure if you search the forum you will find information on those two topics.
If a search does not yield the required information, I recommend you start new threads for those
questions and leave this thread for workstation/server booting discussions.
Title: Re: TC Server and clients
Post by: guillaumetld on August 31, 2011, 01:13:28 PM
Last question I hope.

I know how to load application like firefox with tc-terminal-server. For this i create a list with all apps i want, and i add this list in pxelinux.cfg at the APPEND line, using tftplist=(ipserver)/my.list

But i would like also to load each time some config files like ~/.jwmrc or /usr/share/wbar/dot.wbar for example.
Hot to do this ? Maybe create a boot script ?
Title: Re: TC Server and clients
Post by: curaga on September 01, 2011, 05:38:21 AM
You could put those in a separate initramfs, and load it after the main one (initrd=tinycore.gz,my.gz)
Title: Re: TC Server and clients
Post by: guillaumetld on September 01, 2011, 06:00:18 AM
So you mean that i have to had all the files i want in a .gz file, and add this file after the first one. But what happens after ?
I mean where will these files be ? I need for exemple to load directly my .jwmrc file and not use the default one.


Edit: I also think about remastering, in order to create my own image. Is it possible ? Difficult ? Can I modify my wbar and jwm desktop with remastering ?
Title: Re: TC Server and clients
Post by: curaga on September 01, 2011, 06:39:46 AM
The files in the latter initrd override the former. They'd be in their proper places in the latter initrd.
Title: Re: TC Server and clients
Post by: danielibarnes on September 01, 2011, 07:28:48 AM
I also think about remastering, in order to create my own image. Is it possible ? Difficult ? Can I modify my wbar and jwm desktop with remastering ?

My qremaster script (http://forum.tinycorelinux.net/index.php?topic=8522.0) can help. I will be making it into an extension soon. Check the wiki for more complex remastering.