<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.fogproject.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Capone</id>
		<title>Capone - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.fogproject.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Capone"/>
		<link rel="alternate" type="text/html" href="https://wiki.fogproject.org/wiki/index.php?title=Capone&amp;action=history"/>
		<updated>2026-05-12T21:52:28Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://wiki.fogproject.org/wiki/index.php?title=Capone&amp;diff=12041&amp;oldid=prev</id>
		<title>Wayne-workman.28155: /* How it works */</title>
		<link rel="alternate" type="text/html" href="https://wiki.fogproject.org/wiki/index.php?title=Capone&amp;diff=12041&amp;oldid=prev"/>
				<updated>2016-07-08T03:44:00Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;How it works&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 03:44, 8 July 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l45&quot; &gt;Line 45:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 45:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; .......&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; .......&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; HP client ---(NFS &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;upload&lt;/del&gt;)---&amp;gt;&amp;#160; Fog Server&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; HP client ---(NFS &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Capture&lt;/ins&gt;)---&amp;gt;&amp;#160; Fog Server&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160;  OR&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160;  OR&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; HP client &amp;lt;---(NFS &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;download&lt;/del&gt;)---&amp;#160; Fog Server&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; HP client &amp;lt;---(NFS &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Deployment&lt;/ins&gt;)---&amp;#160; Fog Server&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Wayne-workman.28155</name></author>	</entry>

	<entry>
		<id>https://wiki.fogproject.org/wiki/index.php?title=Capone&amp;diff=3198&amp;oldid=prev</id>
		<title>Itismike at 18:24, 15 April 2011</title>
		<link rel="alternate" type="text/html" href="https://wiki.fogproject.org/wiki/index.php?title=Capone&amp;diff=3198&amp;oldid=prev"/>
				<updated>2011-04-15T18:24:50Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;:Please ensure you read about [[PXE]] before attempting to understand Capone if this is the first time.&lt;br /&gt;
:Also, be sure to visit this page to [[Plugins:_Capone|ENABLE CAPONE]]&lt;br /&gt;
&lt;br /&gt;
Capone is a plugin used for automated deployment of images to a large number of PCs, but taking into account the fact that different machine models have different drivers and so an image for a machine of one make / model is not good for a machine of another make / model.&lt;br /&gt;
&lt;br /&gt;
Capone solves this problem by keeping an association of crucial hardware information of the model of a machine with the appropriate image stored on the FOG server that has drivers for that model.&lt;br /&gt;
&lt;br /&gt;
This crucial hardware information is formally known as [http://en.wikipedia.org/wiki/Desktop_Management_Interface DMI] or &amp;quot;Desktop Management Interface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The native Linux program [[dmidecode]] is used by the Capone plugin's shell script component to get all the hardware information from the computer on which it is run.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
&lt;br /&gt;
What Capone does is that it uses dmidecode present in the init.gz to be uncompressed and loaded into the client via [[PXE]] boot, and the capone shell script selects the needed information like SKU number (Stock Keeping Unit) to identify the model of the client and send it to the FOG server in real-time.&lt;br /&gt;
&lt;br /&gt;
In the Capone web interface, the user is expected to enter DMI SKU code association with a particular image for a particular model. For example, all machines that have an SKU code of &amp;quot;ABCD-1234-X/PQR&amp;quot; will be for PCs from ABCD corp, 1234 series, PQR variant sub-model.&lt;br /&gt;
&lt;br /&gt;
Now in the past, at least once, the standard image for this machine has been made and stored in the FOG server's /images directory. This image is known to the FOG web management console via the Images screen.&lt;br /&gt;
&lt;br /&gt;
This image is now associated with the SKU code of &amp;quot;ABCD-1234-X/PQR&amp;quot; via the DMI/RegEx field in the Capone web interface screen.&lt;br /&gt;
&lt;br /&gt;
This tells Capone that if the machine model has a SKU code of &amp;quot;ABCD-1234-X/PQR&amp;quot;, it must be loaded with the particular image named &amp;quot;ABCD1234X&amp;quot; (or any comfortable name for your IT staff / operators to remember)&lt;br /&gt;
&lt;br /&gt;
This being known, the image corresponding to the SKU is the one sent to the client.&lt;br /&gt;
&lt;br /&gt;
Thus automated model recognition is achieved and there is no need for manual intervention as far as selection of the appropriate image goes.&lt;br /&gt;
&lt;br /&gt;
Note that this is possible only because of the very useful dmidecode program and a custom script named fog.capone in the init.gz.&lt;br /&gt;
&lt;br /&gt;
The way Fog uses init.gz and PXE to achieve a variety of tasks is as follows:&amp;lt;br /&amp;gt;&lt;br /&gt;
Let us assume that we have a HP desktop whose system needs to be imaged or wiped and reinstalled.&amp;lt;br /&amp;gt;&lt;br /&gt;
Then the setup would be as shown below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  HP client ---(PXE request)---&amp;gt;  Fog Server&lt;br /&gt;
  .......&lt;br /&gt;
&lt;br /&gt;
  HP client &amp;lt;---(TFTP response init.gz)----  Fog Server&lt;br /&gt;
  .......&lt;br /&gt;
&lt;br /&gt;
  HP client loads `init`, linux kernel and runs selected Fog option (PXE menu)&lt;br /&gt;
  .......&lt;br /&gt;
&lt;br /&gt;
  HP client ---(TFTP upload/download request)---&amp;gt;  Fog Server&lt;br /&gt;
  .......&lt;br /&gt;
&lt;br /&gt;
  HP client ---(NFS upload)---&amp;gt;  Fog Server&lt;br /&gt;
       OR&lt;br /&gt;
  HP client &amp;lt;---(NFS download)---  Fog Server&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For all this to happen, several settings need to be right:&lt;br /&gt;
 * PXE setup of client is correct&lt;br /&gt;
 * IP addresses for DHCP for signals before TFTP stage.&lt;br /&gt;
 * TFTP/NFS/DHCP configured and running properly&lt;br /&gt;
 * Web interface and Fog server processes running properly&lt;br /&gt;
 * init.gz must be right for the specific client&lt;br /&gt;
&lt;br /&gt;
The init.gz is a gzipped version of the initial part of Linux kernel which is loaded first.&lt;br /&gt;
&lt;br /&gt;
The init image is binary and is not a gzip stream. It is mounted using a special utility script located at /utils/Boot Image Editor/FOGMountBootImage.sh&lt;br /&gt;
&lt;br /&gt;
All you have to do is to go to that path and run the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user@computer:~$ cd /utils/Boot\ Image\ Editor/&lt;br /&gt;
&lt;br /&gt;
user@computer:~$ pwd&lt;br /&gt;
/utils/Boot Image Editor/&lt;br /&gt;
&lt;br /&gt;
user@computer:~$ ./FOGMountBootImage.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This does many things - it uncompresses the init.gz and mounts the resulting init to a temporary directory /tmp/tmpMnt&amp;lt;br /&amp;gt;&lt;br /&gt;
In that mounted file system (within your ordinary Fog server file system) is a bunch of binary programs that might be useful to run on the client after being transferred over TFTP from Fog server to client as shown above. Also included are the following scripts:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fog           fog.man.reg   fog.statusreporter fog.wipe&lt;br /&gt;
fog.auto.reg  fog.chntpw    fog.photorec       fog.surfacetest&lt;br /&gt;
fog.av        fog.chpass    fog.quickimage     fog.testdisk&lt;br /&gt;
fog.capone    fog.debug     &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depending on what you chose in the PXE menu, one of these is run.&amp;lt;br /&amp;gt;&lt;br /&gt;
Let us see a few interesting lines in the fog.capone script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  dmivalue=`dmidecode -t 1 | grep SKU | cut -d' ' -f3`&lt;br /&gt;
  echo &amp;quot;&amp;quot;;&lt;br /&gt;
  echo &amp;quot; * Using Key Value: ${dmivalue}&amp;quot;;&lt;br /&gt;
  echo &amp;quot;&amp;quot;;&lt;br /&gt;
  sleep 1;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
What this does is explained below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user@computer:~$ sudo dmidecode -t 1&lt;br /&gt;
&lt;br /&gt;
# dmidecode 2.9&lt;br /&gt;
SMBIOS 2.3 present.&lt;br /&gt;
&lt;br /&gt;
Handle 0x0001, DMI type 1, 25 bytes&lt;br /&gt;
System Information&lt;br /&gt;
	Manufacturer: MICRO-STAR INTERNATIONAL CO., LTD&lt;br /&gt;
	Product Name: MS-7104&lt;br /&gt;
	Version: 3.0&lt;br /&gt;
	Serial Number:  &lt;br /&gt;
	UUID: 00000000-0000-0000-0000-001D92092567&lt;br /&gt;
	Wake-up Type: Power Switch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;quot;-t 1&amp;quot; is the Type of DMI info - &amp;quot;1&amp;quot; stands for System Information.&amp;lt;br /&amp;gt;&lt;br /&gt;
Note this phrase in the output: &amp;quot;Handle 0x0001, DMI type 1, 25 bytes&amp;quot;.&amp;lt;br /&amp;gt;&lt;br /&gt;
(&amp;quot;Product&amp;quot; is used instead of &amp;quot;SKU&amp;quot; because not all systems not have SKU Numbers, and to illustrate how to modify the command to your setup)&amp;lt;br /&amp;gt;&lt;br /&gt;
This text is sent to grep, looking for &amp;quot;Product&amp;quot;. &amp;lt;br /&amp;gt;&lt;br /&gt;
The output of that command is a single line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user@computer:~$ sudo dmidecode -t 1 | grep Product&lt;br /&gt;
&lt;br /&gt;
	Product Name: MS-7104&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that output is &amp;quot;cut&amp;quot; using &amp;quot;cut -d' ' -f3&amp;quot;. &amp;lt;br /&amp;gt;&lt;br /&gt;
The command means this: take input, split by delimiting using single space as delimiter(-d' ') and return field number 3.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user@computer:~$ sudo dmidecode -t 1 | grep Product | cut -d' ' -f3&lt;br /&gt;
&lt;br /&gt;
MS-7104&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is your product identification string.&amp;lt;br /&amp;gt;&lt;br /&gt;
If you want to catch a different field than SKU number or Product Number, you simply have to change that parameter to something that you know is the crucial identification parameter from the DMI information of your systems.&lt;br /&gt;
&lt;br /&gt;
Now to the really smart part - this '''DMI value is sent over HTTP to the Fog server''' via the following lines, to check and see whether such a record exists in the Capone DMI association tables in the MySQL database.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  dmi64=`echo $dmivalue | base64`&lt;br /&gt;
  echo -n &amp;quot; * Looking for images..........................&amp;quot;;	&lt;br /&gt;
  img=&amp;quot;&amp;quot;;&lt;br /&gt;
  while [ &amp;quot;$img&amp;quot; = &amp;quot;&amp;quot; ]; do&lt;br /&gt;
    img=`wget -O - &amp;quot;http://${web}service/capone.php?action=imagelookup&amp;amp;key=${dmi64}&amp;quot; 2&amp;gt;/dev/null`&lt;br /&gt;
    sleep 2;&lt;br /&gt;
  done	&lt;br /&gt;
  echo &amp;quot;Done&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  dmi64=`echo $dmivalue | base64`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
dmi64 just holds the same dmi value in base64 encoding. This is ensure that there are no special characters in the transmitted data that might cause something in the web appliaction part to fail or behave unexpectedly. &lt;br /&gt;
If an image matching this DMI value exists, then download of that image begins soon. This is how automated imaging based on DMI information is achieved.&amp;lt;br /&amp;gt;&lt;br /&gt;
Now if you '''generalise the situation to allow for any DMI field to be used''' to identify dmi values, you also need to supply the dmi field name you are looking for. This is the DMIField value in the web screen for Capone plugin where you are asked to associate '''DMIField''' (SKU Number / Product Number / UUID / Product Serial / Model / etc ... ) with the desired '''DMIRegex'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The code that would be executed then would be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  dmivalue=`dmidecode -t 1 | grep ${dmifield} | cut -d' ' -f3`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fog.* scripts are very informative if you have nominal understanding of Linux bash shell scripting.&amp;lt;br /&amp;gt;&lt;br /&gt;
It also shows the wide range of tasks that can be performed by editing the desired one among the fog.* scripts in the init image.&lt;/div&gt;</summary>
		<author><name>Itismike</name></author>	</entry>

	</feed>