Cyclone Client Side Deployment Sytem

cyclone.sh

Pre Imaging Process Overview
The imaging process begins after the client image boots.

After the client boots, /init spawns /etc/inittab which in turn runs /etc/init.d/rcS. The last part of this spawns the main imaging system script.

Now choices made in the original menu come to fruition. Arguments passed on the command line (kernel append) are now processed.

These point to the location of the next script to run, in this case cyclone.sh, the main bash script that runs everything.

Imaging Processes
(Looking at the bottom of the script), the main procedure calls various functions to perform the various tasks. It is split into non-destructive and destructive parts for clarity.

Non descructive parts
The first functions are non destcructive, building up information about the client, taking under a second to run. During testing this enables you to inset a stop at a point before the disk is altered yet have all the info about what it is going to do at hand.

framebuffer
Draws the graphics to make it look more friendly.

keymap "uk"
Sets UK keymap

gettime
Gets and sets time from time server, for logging and to correct hardware clock. Windows doesn't like having wrong date and time.

gethal
Determines the HAL for Win XP imaging by interpreting /proc/cpuinfo. No trouble on real hardware - Virtualbox seems to report APIC when APIC is disabled so wrong HAL picked. Sets variables for XP's sysprep.inf

gethw

 * PCI devices
 * USB devices
 * ACPI type devices, specifically anything other than dev* LNX*, these are usually found in laptops, like hotkey buttons and such. (I do not fully understand this, but seems to encompass things that are not USB or PCI. Note most of the PNP things will be duplicates of PCI/USB devices picked up above.)
 * Audio special case for IntelHDA audio.

Builds up a list of the machines hardware for driverpack matching. Important kernel built with ALSA audio support and Intel HDA audio to enable discovery of hardware which wont show up otherwise (should be by default).

getprodinfo
Uses dmidecode to extract info about the machine such as serial number, model, etc.

This info can and usually is in one, none or several places and uses a few simple algorythms to get pick the most likely.

getdisk
Picks primary drive to image too (sda or hda), which in automated deployment situations would almost always be what you wanted.
 * Assumptions: You are imgaging the primary disk
 * Mods: Could extend DB schema/script quite easily to pick others.

getschema
Queries server DB (via php so secure/works over internet) to pull exactly what it is doing, although most things are passed on kernel append, certain things can't be.

getmac
Gets MAC address of eth0.
 * Assumptions: you are using primary network card, eth0
 * Mods: could extend DB and script to accommodate additional cards etc.

gethost
Returns the host name of the machine from DNS TXT record (we are using a fixed IP scheme based on MAC) This is pretty custom to my environment. There are many ways you could automate naming, using the Asset tag on Dell's, serial numbers, UUID, etc. but they will rely on probably using the MAC to query something or get something from the BIOS.

label print
Modifies a PostScript template with machine info including QR bar code encoding the machine info

Cyclone Imaging System Main Script
Main script that runs on the client controlling the high speed deployment.