Cyclone SSDS SQLite3 Database

From richud.com
Jump to: navigation, search

image

  • Defines each 'image' (can be an actual image or format) that will go onto a logical partition.
  • Its attributes determine whay happens when the 'image' is written and what parts of the menu it appears in.
  • Each one is unique.

e.g. 'xpdom'

dpspath/dppath value determines

driverpacks system is invoked and pulled down into imaged partition, and their path is DPwinxp/DPx/D/.
If this is blank no part of adding driverpacks takes place. This would usually be for a static(set) image. In this case the imgname is important as it is used to match the 'Product Name' from dmidecode

os/osname

it appears in winxp menu and is named Windows XP

imagefilename/imagename

the image file is xpsp3-dom.gz and its referred to as xpdom (this lets you swap images about without altering all references to it)

process

ntfs is filesystem to create on the partition (format = format it using imgname, stop)

type

defines a selection criteria, i.e. these are all domain images containing software (our) domain installs by default
dppath osname process imgname type imgfilename os dpspath
D Windows XP ntfs xpstd Standard xpsp3-std-office2007.gz winxp DPwinxp/DPx
D Windows XP ntfs xpdom Domain xpsp3-dom.gz winxp DPwinxp/DPx
Windows XP ntfs DQ57 Domain dq57.gz winxp
Windows XP ntfs DQ45EK Domain dq45-2.gz winxp
Windows XP ntfs DQ45 Domain dq45.gz winxp
Windows XP ntfs DQ35 Domain dq35.gz winxp
ntfs w7-std-sys w7-std2-sys.gz win7
x64 Windows 7 x64 ntfs w7-std-os Standard w7-std2-os.gz win7 DPwin7/DPx
Ubuntu Oneiric x64 ext4 ubuntuoneiric ubuntuo.gz ubuntuo
Ubuntu Natty x64 ext4 ubuntunatty ubuntun.gz ubuntun
format mkfs.ntfs mkfs.ntfs -f -L DATA
format mkfs.ext4 mkfs.ext4 -L DATA
format mkswap mkswap -c
Windows 7 x64 ntfs w7-std-os-single Standard w7-std-os.gz win7 DPwin7/DPx
x64 Windows 7 x64 ntfs w7-std-office2k-os Standard w7-officesp1.gz win7 DPwin7/DPx
Windows 2008 R2 ntfs server2008r2-os Standard server2008-os.gz server2008
ntfs server2008r2-boot server2008-boot.gz server2008

imagemode

Auto will pick in order

  1. a specific (set) image, i.e. a matching imgname in the 'ProductName' found from DMIdecode (usually this would be one without driverpacks)
  2. universal image (usually with driverpack injection)

Universal will force a universal image only

These are both used as menu names and variable names.

imgmode
Auto
Universal

kernelopt

Old kit may need compatability mode setting invoking 'safer' kernel options. You can easily edit these if trying to narrow it down. (vga= needed for framebuffer in cyclone.sh)

kernelopt values are both used as menu names and variable names.

append kernelopt
loglevel=3 vga=788 Normal
noapic nopic noacpi edd=off vga=788 Compatability

label

Just a result multiplier to extend the menu to give everything an option of printing or not printing a label. label values used as variable names and menu names.

label
Label
No Label

log

A tiny sample from the log! This system has now done well over 1000 deployments. The standard log view generated from the php omits the driverpack bits, which is visable from the menu under Advanced mode view.

date hal imgtime product serialnum mac hostname runcmd image hwids dpmatch
2012-02-17 09:39:43 ACPI Multiprocessor PC 87 1618HPProBook6560b 5CB2023FQ8 ec9a74fb3420 UA-1173 mkfs.ntfs -f -L DATA 04f2:b230 111d:7605 11c1:1040 197b:2380 197b:2391 197b:2392 1d6b:0002 8086:0085 8086:0104 8086:0126 8086:1502 8086:1c03 8086:1c10 8086:1c12 8086:1c14 8086:1c16 8086:1c20 8086:1c26 8086:1c2d 8086:1c3a 8086:1c3d 8086:1c4f 8086:2805 8087:0024 ACPI0003 HPQ0004 IFX0102 INT0800 INT340E PNP0000 PNP0100 PNP0103 PNP0200 PNP0303 PNP0401 PNP0501 PNP0A06 PNP0A08 PNP0B00 PNP0C02 PNP0C04 PNP0C09 PNP0C0A PNP0C0D PNP0C0E PNP0C0F PNP0C14 PNP0C32 SYN017C D/3/H/D D/3/H/L2 D/3/H/L2/1 D/3/H/L2/2 D/3/H/LS D/3/H/W D/3/M/A/2 D/3/M/A/21 D/3/M/A/5 D/3/M/A/9 D/3/M/A5 D/3/M/H4 D/3/M/H5 D/3/M/S/3 D/3/M/S/4 D/3/M/S/5 D/3/M/T6 D/3/X/H D/3/X/J D/C/A D/C/I D/C/I5 D/C/I6 D/C/I7 D/C/IN D/CYC/3 D/G/I1 D/L/I D/M/I5 D/M/I8 D/M/I9 D/S/I D/S/I12 D/S/I17 D/S/I20 D/S/I21 D/S/I27 D/S/I9 D/W/I2
2012-02-20 10:57:33 ACPI Multiprocessor PC 160 1496HPCompaq8200EliteUSDTPC CZC2064MBZ 9c8e99d26fb8 HI-0262 mkfs.ntfs -f -L DATA 03f0:2c24 046d:c312 10ec:0662 1d6b:0002 8086:0100 8086:0102 8086:1502 8086:1c02 8086:1c10 8086:1c18 8086:1c1c 8086:1c1e 8086:1c20 8086:1c22 8086:1c26 8086:1c2d 8086:1c3a 8086:1c3d 8086:1c4e 8086:244e 8086:2805 8087:0024 IFX0102 INT3F0D PNP0000 PNP0100 PNP0103 PNP0200 PNP0303 PNP0800 PNP0A08 PNP0B00 PNP0C01 PNP0C02 PNP0C04 PNP0C0C PNP0C0F PNP0C14 PNP0F03 D/3/H/A D/3/H/A0 D/3/H/A1 D/3/H/A3 D/3/H/A4 D/3/H/A6 D/3/H/D D/3/H/E D/3/H/E1 D/3/H/F D/3/H/L1 D/3/H/L3 D/3/H/LM D/3/H/LS D/3/H/S D/C/A D/C/I D/C/I5 D/C/I6 D/C/I7 D/C/IN D/G/I1 D/L/I D/M/I5 D/M/I8 D/M/I9 D/S/R D/S/R2
2012-02-21 14:49:40 ACPI Multiprocessor PC 81 162BHPEliteBook2560p CNU2060VYJ e4115b3d7a02 UA-1174 mkfs.ntfs -f -L DATA 04f2:b230 111d:7605 11c1:1040 197b:2391 197b:2392 1d6b:0002 8086:0104 8086:0126 8086:1502 8086:1c03 8086:1c10 8086:1c12 8086:1c14 8086:1c16 8086:1c20 8086:1c26 8086:1c2d 8086:1c3a 8086:1c3d 8086:1c4f 8086:2805 8086:4238 8087:0024 ACPI0003 HPQ0004 IFX0102 INT0800 INT340E PNP0000 PNP0100 PNP0103 PNP0200 PNP0303 PNP0A06 PNP0A08 PNP0B00 PNP0C02 PNP0C04 PNP0C09 PNP0C0A PNP0C0D PNP0C0E PNP0C0F PNP0C14 PNP0C32 SYN0181 D/3/H/D D/3/H/LS D/3/M/A/2 D/3/M/A/21 D/3/M/A/5 D/3/M/A/9 D/3/M/A5 D/3/M/H4 D/3/M/H5 D/3/M/S/3 D/3/M/S/4 D/3/M/S/5 D/3/M/T6 D/3/X/H D/3/X/J D/C/A D/C/I D/C/I5 D/C/I6 D/C/I7 D/C/IN D/CYC/3 D/CYC/SYN D/G/I1 D/L/I D/M/I5 D/M/I8 D/M/I9 D/S/I D/S/I12 D/S/I17 D/S/I20 D/S/I21 D/S/I27 D/S/I9 D/W/I1 D/W/I2
2012-02-22 11:21:44 ACPI Multiprocessor PC 98 1496HPCompaq8200EliteUSDTPC CZC2051ZPT 9c8e99d1e8c5 HS-0563 mkfs.ntfs -f -L DATA 03f0:2c24 046d:c312 10ec:0662 1d6b:0002 8086:0100 8086:0102 8086:1502 8086:1c02 8086:1c10 8086:1c18 8086:1c1c 8086:1c1e 8086:1c20 8086:1c22 8086:1c26 8086:1c2d 8086:1c3a 8086:1c3d 8086:1c4e 8086:244e 8086:2805 8087:0024 IFX0102 INT3F0D PNP0000 PNP0100 PNP0103 PNP0200 PNP0303 PNP0800 PNP0A08 PNP0B00 PNP0C01 PNP0C02 PNP0C04 PNP0C0C PNP0C0F PNP0C14 PNP0F03 D/3/H/A D/3/H/A0 D/3/H/A1 D/3/H/A3 D/3/H/A4 D/3/H/A6 D/3/H/D D/3/H/E D/3/H/E1 D/3/H/F D/3/H/L1 D/3/H/L3 D/3/H/LM D/3/H/LS D/3/H/S D/C/A D/C/I D/C/I5 D/C/I6 D/C/I7 D/C/IN D/G/I1 D/L/I D/M/I5 D/M/I8 D/M/I9 D/S/R D/S/R2
2012-02-22 11:26:43 ACPI Multiprocessor PC 150 DQ35JONotSpecified 325371-001 001cc04d1499 IT-2293 mkfs.ntfs -f -L DATA 045e:0040 045e:0752 10ec:0268 11ab:6101 11c1:5811 1d6b:0001 1d6b:0002 8086:10bd 8086:244e 8086:2914 8086:2920 8086:2926 8086:2930 8086:2934 8086:2935 8086:2936 8086:2937 8086:2938 8086:2939 8086:293a 8086:293c 8086:293e 8086:2940 8086:2942 8086:2944 8086:2946 8086:2948 8086:29b0 8086:29b2 8086:29b3 8086:29b4 INT5400 PNP0000 PNP0003 PNP0100 PNP0200 PNP0501 PNP0800 PNP0A03 PNP0B00 PNP0C02 PNP0C04 PNP0C0E PNP0C0F WEC1000 x64/C/AMD/1/Filter/NB-SB/LH64A x64/C/AMD/1/Filter/NB/LH64A x64/C/AMD/1/Filter/NB/W764A x64/C/Intel/1 x64/C/Intel/MEI/3 x64/G_B/Intel/2 x64/L/Intel/2/Winx64/NDIS61 x64/L/Intel/2/Winx64/NDIS62 x64/M/Marvell/1 x64/S/Realtek/2
2012-02-23 10:19:59 ACPI Multiprocessor PC 133 DQ965GFProductName 71A44744-673C- 001cc0052411 UA-1030 Standard w7-officesp1.gz 045e:0040 04f2:0116 1002:5b63 1002:5b73 104c:8023 11ab:6101 1d6b:0001 1d6b:0002 8086:104a 8086:244e 8086:2814 8086:2821 8086:2830 8086:2831 8086:2832 8086:2834 8086:2835 8086:2836 8086:283a 8086:283e 8086:283f 8086:2841 8086:2843 8086:2845 8086:2847 8086:284b 8086:2990 8086:2991 8086:2994 8086:2996 8086:2997 8384:7618 INT5400 PNP0000 PNP0003 PNP0100 PNP0200 PNP0401 PNP0501 PNP0800 PNP0A03 PNP0B00 PNP0C02 PNP0C04 PNP0C0E PNP0C0F PNP0C31 x64/All/C/Intel/1 x64/All/C/Intel/MEI/2 x64/All/M/Intel/1 x64/All/M/Marvell/1 x64/C/AMD/1/Filter/NB-SB/LH64A x64/C/AMD/1/Filter/NB/LH64A x64/C/AMD/1/Filter/NB/W764A x64/CYC/INTEL_HECI x64/CYC/INTEL_SOL x64/G_A/ATI/4 x64/L/Intel/2/Winx64/NDIS61 x64/L/Intel/2/Winx64/NDIS62 x64/Win7/C/Intel/1

menu

This ultimately creates the syslinux/pxelinux menu system. PHP uses these SQL statements to build up the menu .cfg file on-the-fly

It makes it very flexible, extensible, quick to change and customisable in any way imaginable. If you dont know SQL it should still be pretty easy to figure out to suit.

menuname menu sql
Normal Mode normal SELECT * FROM schema,label,kernelopt,imgmode,system WHERE (os='winxp' OR os='win7') AND system='Live' AND kernelopt='Normal' AND imgmode='Auto' AND label='Label'
Compatability Mode compat SELECT * FROM schema,label,kernelopt,imgmode,system WHERE (os='winxp' OR os='win7') AND system='Live' AND kernelopt='Compatability' AND imgmode='Auto' AND label='Label'
Force Universal Image forceuni SELECT * FROM schema,label,kernelopt,imgmode,system WHERE (os='winxp' OR os='win7') AND system='Live' AND kernelopt='Normal' AND imgmode='Universal' AND label='Label'
Advanced advlive SELECT * FROM schema,label,kernelopt,imgmode,system WHERE (os='winxp' OR os='win7') AND system='Live' AND kernelopt='Normal'
Test kern/initrd/script advtest SELECT * FROM schema,label,kernelopt,imgmode,system WHERE (os='winxp' OR os='win7') AND system='Test' AND kernelopt='Normal'
Windows 7 w7 SELECT * FROM schema,label,kernelopt,imgmode,system WHERE os='win7' AND system='Live' AND kernelopt='Normal' AND imgmode='Auto' AND active='1' order by label,scheme
Windows XP xp SELECT * FROM schema,label,kernelopt,imgmode,system WHERE os='winxp' AND system='Live' AND kernelopt='Normal' AND imgmode='Auto' AND active='1' order by label,scheme
Ubuntu ubuntu SELECT * FROM schema,label,kernelopt,imgmode,system WHERE os LIKE 'ubuntu_' AND system='Live' AND kernelopt='Normal' AND imgmode='Auto' AND label='Label'
Dual Windows XP/7 dualwin SELECT * FROM schema,label,kernelopt,imgmode,system WHERE (os LIKE '%win7%' AND os LIKE '%winxp%' ) AND system='Live' AND kernelopt='Normal' AND imgmode='Auto' AND label='Label'
Dual Windows and Linux dualwinlin SELECT * FROM schema,label,kernelopt,imgmode,system WHERE (os LIKE '%win%' AND os LIKE '%ubuntu%' ) AND system='Live' AND kernelopt='Normal' AND imgmode='Auto' AND label='Label'
Normal - No Label normalnolab SELECT * FROM schema,label,kernelopt,imgmode,system WHERE (os='winxp' OR os='win7') AND system='Live' AND kernelopt='Normal' AND imgmode='Auto' AND label='No Label' AND active='1'
Print Label Only label SELECT * FROM schema,label,kernelopt,system WHERE os='label' AND system='Live' AND label='Label'
Display System Info Only info SELECT * FROM schema,kernelopt,system WHERE os='info' AND system='Live'
Windows Server 2008 R2 server2008 SELECT * FROM schema,label,kernelopt,imgmode,system WHERE os='server2008' AND system='Live' AND kernelopt='Normal' AND imgmode='Auto'

schema

This sets out the schema (partition scheme if you will) of the imaged pc. e.g. "Windows XP Domain 20% D:"


snum active scheme os p1 p2 p3 p4 fdisk
1 1 Windows XP winxp xpstd n\np\n1\n2048\n\nt\n7\na\n1\nw\n
2 1 Windows XP Domain 20% D: winxp DQ57 DQ45 DQ35 xpdom mkfs.ntfs n\np\n1\n2048\n$(psec 80 -1)\nt\n7\na\n1\nn\np\n2\n$(psec 80)\n\nt\n2\n7\nw\n
3 1 Windows XP 20% D: winxp xpstd mkfs.ntfs n\np\n1\n2048\n$(psec 80 -1)\nt\n7\na\n1\nn\np\n2\n$(psec 80)\n\nt\n2\n7\nw\n
4 0 Windows 7 x64 no/SysPart win7 w7-std-os-single n\np\n1\n2048\n\nt\n7\na\n1\nw\n
5 0 Windows 7 x64 Domain win7 w7-dom-sys w7-dom-os n\np\n1\n2048\n1026047\nt\n27\na\n1\nn\np\n2\n1026048\n\nt\n2\n7\nw\n
6 1 Windows 7 x64 win7 w7-std-sys w7-std-os n\np\n1\n2048\n1026047\nt\n27\na\n1\nn\np\n2\n1026048\n\nt\n2\n7\nw\n
7 1 Windows 7 x64 20% D: win7 w7-std-sys w7-std-os mkfs.ntfs n\np\n1\n2048\n1026047\nt\n27\na\n1\nn\np\n2\n1026048\n$(psec 79 -1)\nt\n2\n7\nn\np\n3\n$(psec 79)\n\nt\n3\n7\nw\n
8 1 Windows XP and Ubuntu Oniric x64 winxp,ubuntuo xpstd ubuntuo n\np\n1\n2048\n$(psec 50 -1)\nt\n7\na\n1\nn\np\n2\n$(psec 50)\n\nt\n2\n83\nw\n
9 1 Win XP w/D: and Ubuntu Natty x64 winxp,ubuntun xpstd mkfs.ntfs ubuntun n\np\n1\n2048\n$(psec 40 -1)\nt\n7\na\n1\nn\np\n2\n$(psec 40)\n$(psec 20 -1)\nt\n2\n7\nn\np\n3\n$(psec 20)\n\nt\n3\n83\nw\n
10 1 Win XP w/D: and Ubuntu Natty x64 w/2nd Part winxp,ubuntun xpstd mkfs.ntfs ubuntun mkfs.ext4 n\np\n1\n2048\n$(psec 40 -1)\nt\n7\na\n1\nn\np\n2\n$(psec 40)\n$(psec 10 -1)\nt\n2\n7\nn\np\n3\n$(psec 10)\n$(psec 40 -1)\nt\n3\n83\nn\np\n4\n$(psec 40)\n\nt\n4\n83\nw\n
11 1 Ubuntu Oneiric x64 w/swap ubuntuo ubuntuo linux.swap n\np\n1\n2048\n$(psec 99 -1)\nt\n83\na\n1\nn\np\n2\n$(psec 99)\n\nt\n2\n82\nw\n
12 1 Windows 7 x64 and Ubuntu Oneiric x64 win7,ubuntuo w7-std-os-single ubuntuo n\np\n1\n2048\n$(psec 50 -1)\nt\n7\na\n1\nn\np\n2\n$(psec 50)\n\nt\n2\n83\nw\n
13 1 Windows 7 x64 and Win XP win7,winxp w7-std-os-single xpstd n\np\n1\n2048\n$(psec 50 -1)\nt\n7\na\n1\nn\np\n2\n$(psec 50)\n\nt\n2\n7\nw\n
14 1 Win 7 x64 w/Sys and Win XP w/D: win7,winxp w7-std-sys w7-std-os xpstd mkfs.ntfs n\np\n1\n2048\n1026047\nt\n27\na\n1\nn\np\n2\n1026048\n$(psec 32 -1)\nt\n2\n7\nn\np\n3\n$(psec 32)\n$(psec 32 -1)\nt\n3\n7\nn\np\n4\n$(psec 32)\n\nt\n4\n7\nw\n
15 1 Windows XP Domain (force universal) w/ 20% D: winxp xpdom mkfs.ntfs n\np\n1\n2048\n$(psec 80 -1)\nt\n7\na\n1\nn\np\n2\n$(psec 80)\n\nt\n2\n7\nw\n
16 1 Print Label Only label
17 1 Display System Info Only info
18 1 Win 7 x64 Office14 win7 w7-std-sys w7-std-office2k-os n\np\n1\n2048\n1026047\nt\n27\na\n1\nn\np\n2\n1026048\n\nt\n2\n7\nw\n
19 0 WinXP (start sec 63) winxp xpstd n\np\n1\n63\n\nt\n7\na\n1\nw\n
20 0 Windows XP Domain 50% D: winxp DQ57 DQ45 DQ35 xpdom mkfs.ntfs n\np\n1\n2048\n$(psec 50 -1)\nt\n7\na\n1\nn\np\n2\n$(psec 50)\n\nt\n2\n7\nw\n
21 1 Server 2008 R2 with VSphere server2008 server2008r2-boot server2008r2-os n\np\n1\n2048\n1026047\nt\n27\na\n1\nn\np\n2\n1026048\n\nt\n2\n7\nw\n

system

This defines the kernel/initrd the client uses, the IP of the server (serveraddr) , the source path of the system (spath) , the initial run script (runinit)

Test system has alternate kernel / initial ramdisk / run script or any combination thereof by altering the fields.

This allows testing without interfering with the main system. (the SQL stays live, but breaking everything from a typo is a lot harder in it!)

spath initrd kernel system runinit serveraddr
cyclone/system /cyclone/initramfs.cp.lzma /cyclone/bzImage Live cyclone.sh xxx.xxx.xx.xx
cyclone/system /cyclone/initramfs-.cp.lzma /cyclone/bzImage- Test cyclone-.sh xxx.xxx.xx.xx