Required:
A (remastered) knoppix boot CD
CDrom drive for the client
http server somewhere on the local network
How to do:
Get a Knoppix CD;
create a directory KNOPPIX
mkdir KNOPPIX
copy everything from the CD to the directory
cp -av /mnt/cdrom/* -t KNOPPIX
Put the following shell script into the Knoppix toplevel directory, name 'knoppix.sh'
#!/bin/bash wget http://192.168.0.254/myscript.sh echo running script ... sh myscript.sh
(Assumes that your server is 192.168.0.254)
Alternatively you could also use the kfp (KDE public file server utility) to avoid setting up a http server. In that case add port number 8000 (or whatever port is used for hosting myscript) after the server string. (not tested)
To speed up booting by Knoppix, edit
/boot/isolinux/isolinux.cfg
and create change default options for booting
sample isolinux.cfg: Waits for 3 seconds and then boots with very little hardware detection.
Burn your new CD: CD needs to be bootable!
cd /folder/with/knoppix/file
mkisofs -o /tmp/image.iso -V 'remastered Knoppix w/ script' -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -V -T .
burn iso-image with k3b or cdrecord
Alternatively, there is a GUI for remastering ISO files: isomaster
Make your shell script you want to execute on the client available for http download. Script-name: myscript.sh
Now you can simply boot your client with the new Knoppix and execute whatever you place into myscript.sh
sample myscript.sh
This script does two things.
It installs vmlinuz and initrd locally and creates an entry in grub menu entry to use LTSP – booted locally to save network traffic.
Locks the grub menu with a password
It checks mac-address, PCI bus, etc. and prompts for a comment. Comments might be serial mouse, or similar.
It sends the information back to the server.