tag:blogger.com,1999:blog-383851552024-03-13T20:19:43.867+08:00Chau Chee Yang Technical BlogChau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.comBlogger125125tag:blogger.com,1999:blog-38385155.post-32392919877073091382016-04-04T17:16:00.001+08:002016-04-04T17:16:42.486+08:00Sisulizer<p><div class="toc">
<ul>
<li><a href="#installation">Installation</a></li>
<li><a href="#configuration">Configuration</a><ul>
<li><a href="#translation-engine-microsoft-translator">Translation Engine - Microsoft Translator</a></li>
<li><a href="#disable-create-backup-project-file">Disable Create Backup project File</a></li>
</ul>
</li>
<li><a href="#localized-delphi-application">Localized Delphi Application</a></li>
</ul>
</div>
</p>
<h1 id="installation">Installation</h1>
<p><a href="http://www.sisulizer.com/">Sisulizer</a> prompt for <code>Personal folder</code> to install the Sisulzer sample project files during installation. To allow public access of the sample project files, enter <code>C:\Users\Public\Documents\Sisulizer 3</code> in <code>Personal Folder</code> text box:</p>
<p><img src="https://farm2.staticflickr.com/1500/26227218385_fbea653d09_o.png"></p>
<h1 id="configuration">Configuration</h1>
<h2 id="translation-engine-microsoft-translator">Translation Engine - Microsoft Translator</h2>
<p>Sisulizer supports translation using translator engine. Most of the online translators are paid service. Microsoft Translator, however, is free to some extend.</p>
<p>Use <code>Tools | Translation Engines...</code> to configure translation engine:</p>
<p><img src="https://farm2.staticflickr.com/1650/26227873825_4b9f6ae781_o.png"></p>
<p>Microsoft Translator provides 2,000,000 Characters free of charge per month. Charged subscription is available for additional characters translation.</p>
<p>Follow these steps to use Microsoft Translator in Sisulizer:</p>
<ol>
<li>Sign up <a href="https://datamarket.azure.com/">Windows Azure Marketplace</a>.</li>
<li>Subscribe Microsoft Translator. e.g.: Subscribe 2,000,000 Characters/month for free.</li>
<li>Click <code>Register Your Application</code> at the bottom of your Windows Azure Account for Sisulizer application: <br>
<img src="https://farm2.staticflickr.com/1505/25955140410_2081f2f39b_o.png"></li>
<li>Start Sisulizer, open Tools | Translation Engines… to add Microsoft Translation Engine:</li>
<li>Enter Client id and Client secret accordingly. You may also use the Register Account button in Sisulizer to register Sisulzer to your Windows Azure account: <br>
<img src="https://farm2.staticflickr.com/1677/26202129436_e0d398eaaa_o.png"></li>
</ol>
<h2 id="disable-create-backup-project-file">Disable Create Backup project File</h2>
<p><img src="https://farm2.staticflickr.com/1521/25623351264_cbb1ac9ea3_o.png"></p>
<h1 id="localized-delphi-application">Localized Delphi Application</h1>
<ol>
<li>Open Sisulizer project wizard: <code>File | New...</code></li>
<li><p>Select Source Type: <code>Localize a file or files</code> <br>
<img src="https://farm2.staticflickr.com/1568/25625472533_ee6b94b014_o.png"></p></li>
<li><p>Select File. Select an executable binary file. e.g.: <code>.EXE</code>, <code>.BPL</code> or <code>.DLL</code> <br>
<img src="https://farm2.staticflickr.com/1523/25955274250_8c618b2be1_o.png"></p></li>
<li>Select File Format: Delphi binary file</li>
<li>Select Windows resource types</li>
<li>Set additional VCL option: <br>
<ol><li>Unset <code>Localized files</code></li>
<li>Set <code>Resource DLLs</code></li>
<li>Set <code>DRC file name</code> <br>
<img src="https://farm2.staticflickr.com/1685/25625539643_39718c2c61_o.png"></li></ol></li>
<li><p>Select languages: <br>
<img src="https://farm2.staticflickr.com/1576/26228234615_14629ef0b6_o.png"></p></li>
<li><p>Click <code>Finish</code> button to close project wizard.</p></li>
<li><p>Open project <code>properties</code>: <br>
<img src="https://farm2.staticflickr.com/1678/25625596823_483f0f0f6a_o.png"></p>
<ol><li><p>Set Resource DLLs file name template as . (ISO hyphen language code): <br>
<img src="https://farm2.staticflickr.com/1525/25625663803_15e6b88f24_o.png"></p></li>
<li><p>Set <code>Ignore Form Scaling</code> in <code>VCL options</code> page: <br>
<img src="https://farm2.staticflickr.com/1561/26202421046_987b2e9e7f_o.png"></p></li>
<li><p>Start localization process by using manual translation or translation engine.</p></li></ol></li>
<li>Build project to produce resource DLL files: <br>
<img src="https://farm2.staticflickr.com/1499/26162136711_fe03c761d5_o.png"></li>
</ol>Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com0tag:blogger.com,1999:blog-38385155.post-68815162947555625102015-12-15T09:49:00.001+08:002016-04-05T14:00:16.528+08:00Sisulizer<p><div class="toc">
<ul>
<li><a href="#installation">Installation</a></li>
<li><a href="#configuration">Configuration</a><ul>
<li><a href="#translation-engine-microsoft-translator">Translation Engine - Microsoft Translator</a></li>
<li><a href="#disable-create-backup-project-file">Disable Create Backup project File</a></li>
</ul>
</li>
<li><a href="#localized-delphi-application">Localized Delphi Application</a></li>
</ul>
</div>
</p>
<h1 id="installation">Installation</h1>
<p><a href="http://www.sisulizer.com/">Sisulizer</a> prompt for <code>Personal folder</code> to install the Sisulzer sample project files during installation. To allow public access of the sample project files, enter <code>C:\Users\Public\Documents\Sisulizer 3</code> in <code>Personal Folder</code> text box:</p>
<p><img src="https://farm2.staticflickr.com/1500/26227218385_fbea653d09_o.png"></p>
<h1 id="configuration">Configuration</h1>
<h2 id="translation-engine-microsoft-translator">Translation Engine - Microsoft Translator</h2>
<p>Sisulizer supports translation using translator engine. Most of the online translators are paid service. Microsoft Translator, however, is free to some extend.</p>
<p>Use <code>Tools | Translation Engines...</code> to configure translation engine:</p>
<p><img src="https://farm2.staticflickr.com/1650/26227873825_4b9f6ae781_o.png"></p>
<p>Microsoft Translator provides 2,000,000 Characters free of charge per month. Charged subscription is available for additional characters translation.</p>
<p>Follow these steps to use Microsoft Translator in Sisulizer:</p>
<ol>
<li>Sign up <a href="https://datamarket.azure.com/">Windows Azure Marketplace</a>.</li>
<li>Subscribe Microsoft Translator. e.g.: Subscribe 2,000,000 Characters/month for free.</li>
<li>Click <code>Register Your Application</code> at the bottom of your Windows Azure Account for Sisulizer application: <br>
<img src="https://farm2.staticflickr.com/1505/25955140410_2081f2f39b_o.png"></li>
<li>Start Sisulizer, open Tools | Translation Engines… to add Microsoft Translation Engine:</li>
<li>Enter Client id and Client secret accordingly. You may also use the Register Account button in Sisulizer to register Sisulzer to your Windows Azure account: <br>
<img src="https://farm2.staticflickr.com/1677/26202129436_e0d398eaaa_o.png"></li>
<li><strong>Check</strong> Enabled to enable the translator engine</li>
<li>If there are some network activities prohibit the <strong>checked</strong> Enabled, a workaround is disable network devices, <strong>Checked</strong> Enable and re-enable network devices.</li>
</ol>
<h2 id="disable-create-backup-project-file">Disable Create Backup project File</h2>
<p><img src="https://farm2.staticflickr.com/1521/25623351264_cbb1ac9ea3_o.png"></p>
<h1 id="localized-delphi-application">Localized Delphi Application</h1>
<ol>
<li>Open Sisulizer project wizard: <code>File | New...</code></li>
<li><p>Select Source Type: <code>Localize a file or files</code> <br>
<img src="https://farm2.staticflickr.com/1568/25625472533_ee6b94b014_o.png"></p></li>
<li><p>Select File. Select an executable binary file. e.g.: <code>.EXE</code>, <code>.BPL</code> or <code>.DLL</code> <br>
<img src="https://farm2.staticflickr.com/1523/25955274250_8c618b2be1_o.png"></p></li>
<li>Select File Format: Delphi binary file</li>
<li>Select Windows resource types</li>
<li>Set additional VCL option: <br>
<ol><li>Unset <code>Localized files</code></li>
<li>Set <code>Resource DLLs</code></li>
<li>Set <code>DRC file name</code> <br>
<img src="https://farm2.staticflickr.com/1685/25625539643_39718c2c61_o.png"></li></ol></li>
<li><p>Select languages: <br>
<img src="https://farm2.staticflickr.com/1576/26228234615_14629ef0b6_o.png"></p></li>
<li><p>Click <code>Finish</code> button to close project wizard.</p></li>
<li><p>Open project <code>properties</code>: <br>
<img src="https://farm2.staticflickr.com/1678/25625596823_483f0f0f6a_o.png"></p>
<ol><li><p>Set Resource DLLs file name template as . (ISO hyphen language code): <br>
<img src="https://farm2.staticflickr.com/1525/25625663803_15e6b88f24_o.png"></p></li>
<li><p>Set <code>Ignore Form Scaling</code> in <code>VCL options</code> page: <br>
<img src="https://farm2.staticflickr.com/1561/26202421046_987b2e9e7f_o.png"></p></li>
<li><p>Start localization process by using manual translation or translation engine.</p></li></ol></li>
<li>Build project to produce resource DLL files: <br>
<img src="https://farm2.staticflickr.com/1499/26162136711_fe03c761d5_o.png"></li>
</ol>Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com0tag:blogger.com,1999:blog-38385155.post-6367724507180472015-12-04T10:46:00.001+08:002015-12-17T17:17:15.594+08:00Delphi - Multi threading<p><div class="toc">
<ul>
<li><a href="#introduction">Introduction</a></li>
<li><a href="#rules-and-restrictions">Rules and Restrictions</a></li>
<li><a href="#systemclassestthread">System.Classes.TThread</a><ul>
<li><a href="#tthreadcreateanonymousthread">TThread.CreateAnonymousThread</a></li>
<li><a href="#tthreadprocessorcount">TThread.ProcessorCount</a></li>
<li><a href="#tthreadsynchronize">TThread.Synchronize</a></li>
<li><a href="#tthreadqueue">TThread.Queue</a></li>
</ul>
</li>
<li><a href="#systemthreadingpas">System.Threading.pas</a><ul>
<li><a href="#tparallel">TParallel</a></li>
<li><a href="#ttask">TTask</a></li>
<li><a href="#tthreadpool">TThreadPool</a></li>
</ul>
</li>
<li><a href="#tinterlocked-class">TInterlocked class</a></li>
<li><a href="#freeze-when-use-tthreadsynchronize-with-tparallel-or-ttaskwaitforall">Freeze when use TThread.Synchronize with TParallel or TTask.WaitForAll</a></li>
<li><a href="#using-tthreadsynchronize-with-ttaskwaitforall">Using TThread.Synchronize with TTask.WaitForAll</a></li>
<li><a href="#passing-dynamic-resources-to-parallel-tasks">Passing dynamic resources to parallel tasks</a></li>
<li><a href="#running-a-number-of-tasks-in-parallel-with-limited-resources">Running a number of tasks in parallel with limited resources</a></li>
<li><a href="#collect-exceptions-raised-in-threaded-tasks">Collect exceptions raised in threaded tasks</a></li>
<li><a href="#information-from-future">Information from Future</a></li>
<li><a href="#cancel-running-threaded-task-if-exception-raised">Cancel running threaded task if exception raised</a></li>
<li><a href="#remove-completed-itask-instance-reference-from-task-list">Remove completed ITask instance reference from task list</a></li>
<li><a href="#reference">Reference</a></li>
</ul>
</div>
</p>
<h1 id="introduction">Introduction</h1>
<p>A classical approach of implementing multi-threading in application is using <a href="http://docwiki.embarcadero.com/Libraries/Seattle/en/System.Classes.TThread.Execute">TThread</a>.</p>
<p>New <a href="http://docwiki.embarcadero.com/RADStudio/XE8/en/Using_the_Parallel_Programming_Library">Parallel Programming Library</a> has introduced In recent version of RAD Studio with <a href="http://docwiki.embarcadero.com/Libraries/XE8/en/System.Threading.TParallel.For">TParallel.For</a> and <a href="http://docwiki.embarcadero.com/Libraries/XE8/en/System.Threading.TTask">TTask</a> classes.</p>
<h1 id="rules-and-restrictions">Rules and Restrictions</h1>
<p>Keep in mind of the following rules and restrictions when programming multithreading application:</p>
<ol>
<li>Avoid sharing resources (variables or objects) among thread that may change in threading operation. It will cause unexpected errors. Use <a href="http://docwiki.embarcadero.com/Libraries/Seattle/en/System.SyncObjs.TInterlocked">TInterlocked</a> or <code>TThread.Synchronize</code> when necessary.</li>
<li>VCL or FMX libraries are not thread safe. Most GUI updates performed by thread shall invoke <code>TThread.Synchronize</code> or <code>TThread.Queue</code>.</li>
</ol>
<h1 id="systemclassestthread">System.Classes.TThread</h1>
<p>In most situation, operation that want to perform in thread shall define in <code>TThread</code> descendant and override <a href="http://docwiki.embarcadero.com/Libraries/Seattle/en/System.Classes.TThread.Execute"><code>TThread.Execute</code></a> method.</p>
<h2 id="tthreadcreateanonymousthread">TThread.CreateAnonymousThread</h2>
<p><code>TThread.CreateAnonymousThread</code> is a class method allow the creation of simple task embed in an anonymous method to run in thread without the hazard to define a <code>TThread</code> descendant.</p>
<h2 id="tthreadprocessorcount">TThread.ProcessorCount</h2>
<p><code>TThread.ProcessorCount</code> is a property that return the number of virtual CPU cores of the runtime process in operating system. It may serves as a base measurement for application to determine total number of simultaneous running threads in a process.</p>
<h2 id="tthreadsynchronize">TThread.Synchronize</h2>
<p><code>TThread.Synchronize</code> execute codes in main thread if thread safe manner is a concern. <code>TThread.Synchronize</code> is blocked until finish execution in the thread.</p>
<h2 id="tthreadqueue">TThread.Queue</h2>
<p><code>TThread.Queue</code> works similar to <code>TThread.Synchronize</code> in thread safe manner with blocking execution in the executing thread.</p>
<h1 id="systemthreadingpas">System.Threading.pas</h1>
<p><code>Parallel Programming Library</code> introduced in <code>RAD Studio</code> are defined in unit <code>System.Threading.pas</code>.</p>
<h2 id="tparallel">TParallel</h2>
<p><code>TParallel.&For</code> method allow us to run a thread method in loop manner by a range of low and high bound.</p>
<h2 id="ttask">TTask</h2>
<p>In addition to <code>TParallel</code>, class <code>TTask</code> can be invoke for a more diversified job. One <code>TTask.Run</code> for one job to run in parallel. System shall take care of resource allocation when a significant number of <code>TTask.Run</code> was invoked.</p>
<p>Each <code>TTask</code> job return a <code>ITask</code> reference. If sequence of executed task is important for later operation, use <code>TTask.WaitForAll</code> or <code>TTask.WaitForAny</code> to check the task status first.</p>
<h2 id="tthreadpool">TThreadPool</h2>
<p>The number of executing thread tasks is determined by available number of virtual CPU core (<code>TThread.ProcessorCount</code>). The behaviour may alter by introducing a new <code>TThreadPool</code> instance with new <code>MaxWorkerThreads</code> and <code>MinWorkerThreads</code> value to <code>TTask</code> or <code>TParallel</code> methods.</p>
<p>By default, <code>MaxWorkerThreads</code> and <code>MinWorkerThreads</code> has these value: <br>
<code> <br>
FMinLimitWorkerThreadCount := TThread.ProcessorCount; <br>
FMaxLimitWorkerThreadCount := TThread.ProcessorCount * MaxThreadsPerCPU; <br>
</code></p>
<p>Use <code>TThreadPool.SetMaxWorkerThreads</code> and <code>TThread.SetMinWorkerThreads</code> method to adjust both worker values. <code>TThreadPool.SetMaxWorkerThreads</code> shall invoke prior to <code>TThreadPool.SetMinWorkerThreads</code> to avoid the restriction enforced in the method:</p>
<pre class="prettyprint"><code class="language-delphi hljs "><span class="hljs-keyword">var</span> Pool: TThreadPool;
<span class="hljs-keyword">begin</span>
Pool := TThreadPool.Create;
Pool.SetMaxWorkerThreads(<span class="hljs-number">500</span>);
Pool.SetMinWorkerThreads(<span class="hljs-number">200</span>);
...
<span class="hljs-keyword">end</span>;</code></pre>
<h1 id="tinterlocked-class">TInterlocked class</h1>
<blockquote>
<p><code>TInterlocked</code> implements various common atomic opererations for the purpose of ensuring “thread” or “multi-core” safety when modifying variables that could be accessed from multiple threads simultaneously. The <code>TInterlocked</code> class is not intended to be instantiated nor derived from. All the methods are “class static” and are merely defined in a class as a way to group their like-functionality</p>
</blockquote>
<p><code>TInterlocked</code> provide some class methods to let user change variable of simple data type (e.g.: <code>Integer</code> or <code>Int64</code>) in a thread with thread-safe manner:</p>
<pre class="prettyprint"><code class="language-delphi hljs "><span class="hljs-keyword">var</span> iCount: Integer;
<span class="hljs-keyword">begin</span>
iCount := <span class="hljs-number">0</span>;
TParallel.&<span class="hljs-keyword">For</span>(<span class="hljs-number">1</span>, <span class="hljs-number">10</span>,
<span class="hljs-function"><span class="hljs-keyword">procedure</span> <span class="hljs-params">(Current: Integer)</span>
<span class="hljs-title">begin</span>
<span class="hljs-title">TInterlocked</span>.<span class="hljs-title">Add</span><span class="hljs-params">(iCount, Current)</span>;</span>
<span class="hljs-keyword">end</span>
);
<span class="hljs-keyword">end</span>;</code></pre>
<p>The above code return <code>iCount</code> accumulated in threads with thread-safe manner. Each <code>TInterlocked</code> invokes ensure <strong>ONLY ONE</strong> thread task access variable <code>iCount</code>.</p>
<h1 id="freeze-when-use-tthreadsynchronize-with-tparallel-or-ttaskwaitforall">Freeze when use <code>TThread.Synchronize</code> with <code>TParallel</code> or <code>TTask.WaitForAll</code></h1>
<p>It is a common practice to update GUI control from a running thread to update status periodically using <code>TThread.Synchronize</code> method when the GUI controls are not thread-safe (e.g.: <a href="http://docwiki.embarcadero.com/RADStudio/Seattle/en/VCL_Overview">VCL</a> or <a href="http://docwiki.embarcadero.com/RADStudio/XE4/en/FireMonkey_Application_Platform">FMX</a> controls).</p>
<p>Both <code>TParallel</code> and <code>TTask.WaitForAll</code> are blocked and wait for a list of tasks to finish, invoke <code>TThread.Synchronize</code> that blocked natively in thread will make the process freeze forever. For example:</p>
<pre class="prettyprint"><code class="language-delphi hljs "> TParallel.&<span class="hljs-keyword">For</span>(<span class="hljs-number">1</span>, <span class="hljs-number">1</span>,
<span class="hljs-function"><span class="hljs-keyword">procedure</span> <span class="hljs-params">(Current: Integer)</span>
<span class="hljs-title">begin</span>
<span class="hljs-title">TThread</span>.<span class="hljs-title">Synchronize</span><span class="hljs-params">(<span class="hljs-keyword">nil</span>,
<span class="hljs-keyword">procedure</span>
<span class="hljs-keyword">begin</span>
Application.MainForm.Caption := Current.ToString;
<span class="hljs-keyword">end</span>
)</span>;</span>
<span class="hljs-keyword">end</span>
);</code></pre>
<pre class="prettyprint"><code class="language-delphi hljs "><span class="hljs-keyword">var</span> TaskList: TList<ITask>;
i: Integer;
T: ITask;
<span class="hljs-keyword">begin</span>
TaskList := TList<ITask>.Create;
<span class="hljs-keyword">for</span> i := <span class="hljs-number">1</span> <span class="hljs-keyword">to</span> <span class="hljs-number">10</span> <span class="hljs-keyword">do</span> <span class="hljs-keyword">begin</span>
T := TTask.Run(
<span class="hljs-function"><span class="hljs-keyword">procedure</span>
<span class="hljs-title">begin</span>
<span class="hljs-title">TThread</span>.<span class="hljs-title">Synchronize</span><span class="hljs-params">(<span class="hljs-keyword">nil</span>,
<span class="hljs-keyword">procedure</span>
<span class="hljs-keyword">begin</span>
Application.MainForm.Caption := GetTickCount.ToString;
<span class="hljs-keyword">end</span>
)</span>;</span>
<span class="hljs-keyword">end</span>
);
TaskList.Add(T);
<span class="hljs-keyword">end</span>;
TTask.WaitForAll(TaskList.ToArray);
...
<span class="hljs-keyword">end</span>;</code></pre>
<p>Use <code>TThread.Queue</code> instead to avoid the blocking:</p>
<pre class="prettyprint"><code class="language-delphi hljs "> TParallel.&<span class="hljs-keyword">For</span>(<span class="hljs-number">1</span>, <span class="hljs-number">1</span>,
<span class="hljs-function"><span class="hljs-keyword">procedure</span> <span class="hljs-params">(Current: Integer)</span>
<span class="hljs-title">begin</span>
<span class="hljs-title">TThread</span>.<span class="hljs-title">Queue</span><span class="hljs-params">(<span class="hljs-keyword">nil</span>,
<span class="hljs-keyword">procedure</span>
<span class="hljs-keyword">begin</span>
Application.MainForm.Caption := Current.ToString;
<span class="hljs-keyword">end</span>
)</span>;</span>
<span class="hljs-keyword">end</span>
);</code></pre>
<pre class="prettyprint"><code class="language-delphi hljs "><span class="hljs-keyword">var</span> TaskList: TList<ITask>;
i: Integer;
T: ITask;
<span class="hljs-keyword">begin</span>
TaskList := TList<ITask>.Create;
<span class="hljs-keyword">for</span> i := <span class="hljs-number">1</span> <span class="hljs-keyword">to</span> <span class="hljs-number">10</span> <span class="hljs-keyword">do</span> <span class="hljs-keyword">begin</span>
T := TTask.Run(
<span class="hljs-function"><span class="hljs-keyword">procedure</span>
<span class="hljs-title">begin</span>
<span class="hljs-title">TThread</span>.<span class="hljs-title">Queue</span><span class="hljs-params">(<span class="hljs-keyword">nil</span>,
<span class="hljs-keyword">procedure</span>
<span class="hljs-keyword">begin</span>
Application.MainForm.Caption := GetTickCount.ToString;
<span class="hljs-keyword">end</span>
)</span>;</span>
<span class="hljs-keyword">end</span>
);
TaskList.Add(T);
<span class="hljs-keyword">end</span>;
TTask.WaitForAll(TaskList.ToArray);
...
<span class="hljs-keyword">end</span>;</code></pre>
<p>The following <a href="1">answer</a> explain the mechanism works behind that cause the frozen:</p>
<blockquote>
<p>When you call <code>TThread.Synchronize</code> the thread and method pointer are added to a global <code>SyncList: TList</code> in <code>Classes.pas.</code> In the main exe’s <code>TApplication.Idle</code> routine calls <code>CheckSynchronize</code>, which checks the <code>SyncList</code>, … End result, your synchronized methods are never called.</p>
</blockquote>
<h1 id="using-tthreadsynchronize-with-ttaskwaitforall">Using <code>TThread.Synchronize</code> with <code>TTask.WaitForAll</code></h1>
<p>If using blocking <code>TThread.Synchronize</code> is necessary in thread (e.g.: Waiting response from end user), using <code>TTask.WaitForAll</code> will freeze the application. Consider using <code>CheckSynchronize()</code> in a timeout <code>TTask.WaitForAll</code> loop to process <code>TThread.Synchronize</code> request:</p>
<pre class="prettyprint"><code class="language-delphi hljs "><span class="hljs-keyword">var</span> TaskList: TList<ITask>;
i: Integer;
T: ITask;
<span class="hljs-keyword">begin</span>
TaskList := TList<ITask>.Create;
<span class="hljs-keyword">for</span> i := <span class="hljs-number">1</span> <span class="hljs-keyword">to</span> <span class="hljs-number">10</span> <span class="hljs-keyword">do</span> <span class="hljs-keyword">begin</span>
T := TTask.Run(
<span class="hljs-function"><span class="hljs-keyword">procedure</span>
<span class="hljs-title">begin</span>
<span class="hljs-title">TThread</span>.<span class="hljs-title">Synchronize</span><span class="hljs-params">(<span class="hljs-keyword">nil</span>,
<span class="hljs-keyword">procedure</span>
<span class="hljs-keyword">begin</span>
Application.MainForm.Caption := GetTickCount.ToString;
<span class="hljs-keyword">end</span>
)</span>;</span>
<span class="hljs-keyword">end</span>
);
TaskList.Add(T);
<span class="hljs-keyword">end</span>;
<span class="hljs-keyword">while</span> <span class="hljs-keyword">not</span> TTask.WaitForAll(TaskList.ToArray, <span class="hljs-number">500</span><span class="hljs-comment">(* TimeOut *)</span>) <span class="hljs-keyword">do</span> <span class="hljs-keyword">begin</span>
<span class="hljs-comment">// process any pending TThread.Synchronize() and TThread.Queue() requests</span>
CheckSynchronize(<span class="hljs-number">0</span>);
<span class="hljs-comment">// process any pending UI paint requests, but not other messages</span>
Application.MainForm.Update;
<span class="hljs-comment">// or make it more responsive</span>
Application.ProcessMessages;
<span class="hljs-keyword">end</span>;
...
<span class="hljs-keyword">end</span>;</code></pre>
<h1 id="passing-dynamic-resources-to-parallel-tasks">Passing dynamic resources to parallel tasks</h1>
<p>Dynamic resources refer to variables, class instances, records or other means that are to be decided at runtime.</p>
<p>Due to the class design of <code>TParallel.&For</code> and <code>TTask.Run</code>. It is almost impossible to pass complex resources to the task for parallel execution. <code>TParallel.&For</code> shed light on this problem by an <code>Integer</code> index the task defined in <code>TProc<Integer></code>. However, this is not enough for complex problem domain that are difficult to decide the lower and upper bounds. For example, execute task in parallel for each rows in a uni-directional TDataSet with unknown record count:</p>
<pre class="prettyprint"><code class="language-delphi hljs "><span class="hljs-keyword">var</span> D: TDataSet; <span class="hljs-comment">// D is uni-directional dataset</span>
<span class="hljs-keyword">begin</span>
TParallel.&<span class="hljs-keyword">For</span>(<span class="hljs-number">1</span>, D.RecordCount,
<span class="hljs-function"><span class="hljs-keyword">procedure</span> <span class="hljs-params">(<span class="hljs-keyword">Index</span>: Integer)</span>
<span class="hljs-title">begin</span>
<span class="hljs-title">D</span>.<span class="hljs-title">RecNo</span> :</span>= <span class="hljs-keyword">Index</span>;
<span class="hljs-comment">(* Perform some task *)</span>
<span class="hljs-keyword">end</span>
);
<span class="hljs-keyword">end</span>;</code></pre>
<p>The above code is problematic to work in <code>TParallel.&For</code> with two problems:</p>
<ol>
<li>Uni-directional dataset fail with <code>D.RecordCount</code>.</li>
<li>Changing <code>D.RecNo</code> in thread will cause conflict and confuse other thread’s execution.</li>
</ol>
<p>A simple solution is introduced a queue (or more precisely, a thread-safe queue, e.g.: <code>TThreadedQueue<T></code>) to enqueue resources required in task and dequeue the resource from task:</p>
<pre class="prettyprint"><code class="language-delphi hljs "><span class="hljs-keyword">var</span> D: TDataSet; <span class="hljs-comment">// D is uni-directional dataset</span>
Q: TThreadedQueue<TData>;
T: ITask;
TaskList: TList<ITask>;
Data: TData;
<span class="hljs-keyword">begin</span>
Q := TThreadedQueue<TData>.Create(TThread.ProcessorCount <span class="hljs-comment">(* Init queue size *)</span>);
TaskList := TList<ITask>.Create;
D := Create_Uni_Directional_DataSet;
D.Open;
<span class="hljs-keyword">while</span> <span class="hljs-keyword">not</span> D.Eof <span class="hljs-keyword">do</span> <span class="hljs-keyword">begin</span>
Data := CreateDataFromDataSet(D);
Q.PushItem(Data);
T := TTask.Run(
<span class="hljs-function"><span class="hljs-keyword">procedure</span>
<span class="hljs-title">var</span> <span class="hljs-title">A</span>:</span> TData;
<span class="hljs-keyword">begin</span>
A := Q.PopItem;
<span class="hljs-comment">(* Perform some task on A *)</span>
...
<span class="hljs-keyword">end</span>
);
TaskList.Add(T);
D.Next;
<span class="hljs-keyword">end</span>;
...
<span class="hljs-keyword">end</span>;</code></pre>
<blockquote>
<p><i class="icon-lightbulb"></i> <strong>Tips</strong></p>
<p><code>TThreadedQueue<T>.PopItem</code> is blocked when the queue is empty. This behaviour frees our worry when <code>PopItem</code> from the queue in a thread. The thread will be blocked till item is available from the queue.</p>
</blockquote>
<h1 id="running-a-number-of-tasks-in-parallel-with-limited-resources">Running a number of tasks in parallel with limited resources</h1>
<p>Some resources are limited or expensive to define in runtime. For example, database connections or remote connections.</p>
<p>Imagine there are a large number of tasks that plan to work in parallel and each task requires an independent resource to work with (e.g.: database connection). One may code in this way:</p>
<pre class="prettyprint"><code class="language-delphi hljs "><span class="hljs-keyword">var</span> D: TDataSet; <span class="hljs-comment">// D is uni-directional dataset</span>
Q: TThreadedQueue<TData>;
T: ITask;
TaskList: TList<ITask>;
Data: TData;
<span class="hljs-keyword">begin</span>
Q := TThreadedQueue<TData>.Create(TThread.ProcessorCount);
TaskList := TList<ITask>.Create;
D := Create_Uni_Directional_DataSet;
D.Open;
<span class="hljs-keyword">while</span> <span class="hljs-keyword">not</span> D.Eof <span class="hljs-keyword">do</span> <span class="hljs-keyword">begin</span>
Data := CreateDataFromDataSet(D);
Q.PushItem(Data);
T := TTask.Run(
<span class="hljs-function"><span class="hljs-keyword">procedure</span>
<span class="hljs-title">var</span> <span class="hljs-title">A</span>:</span> TData;
C: TDatabaseConnection;
<span class="hljs-keyword">begin</span>
C := TDatabaseConnection.Create(...);
A := Q.PopItem;
C.Execute(A); <span class="hljs-comment">(* Perform some task on A *)</span>
C.Free;
<span class="hljs-keyword">end</span>
);
TaskList.Add(T);
D.Next;
<span class="hljs-keyword">end</span>;
...
<span class="hljs-keyword">end</span>;</code></pre>
<p>The code attempt to create an equal numbers of database connection dataset record. It is expensive and impractical to design in this approach.</p>
<p>There is a solution for the problem. Since tasks running in parallel is limited by <code>TThreadPool.MinWorkerThreads</code>, we can define a resource pool that is large enough and consume in round-robin manner.</p>
<p>For example, there are 100 tasks to be executed in parallel but at any one time no more than 4 tasks are executing due to limited CPU cores. We may define 8 or more resources in a pool and each task will pick a resource for execution:</p>
<pre class="prettyprint"><code class=" hljs rust">Task <span class="hljs-number">1</span> <span class="hljs-keyword">use</span> Resource <span class="hljs-number">1</span>
Task <span class="hljs-number">2</span> <span class="hljs-keyword">use</span> Resource <span class="hljs-number">2</span>
Task <span class="hljs-number">3</span> <span class="hljs-keyword">use</span> Resource <span class="hljs-number">3</span>
Task <span class="hljs-number">4</span> <span class="hljs-keyword">use</span> Resource <span class="hljs-number">4</span>
Task <span class="hljs-number">5</span> <span class="hljs-keyword">use</span> Resource <span class="hljs-number">5</span>
Task <span class="hljs-number">6</span> <span class="hljs-keyword">use</span> Resource <span class="hljs-number">6</span>
Task <span class="hljs-number">7</span> <span class="hljs-keyword">use</span> Resource <span class="hljs-number">7</span>
Task <span class="hljs-number">8</span> <span class="hljs-keyword">use</span> Resource <span class="hljs-number">8</span>
Task <span class="hljs-number">9</span> <span class="hljs-keyword">use</span> Resource <span class="hljs-number">1</span>
Task <span class="hljs-number">10</span> <span class="hljs-keyword">use</span> Resource <span class="hljs-number">2</span>
...</code></pre>
<p>The scenario assumes these tasks run smoothly in sequence ideally. However, it is not the case in real runtime environment. The operating system cannot guarantee threaded tasks run or finish in the order it queue.</p>
<p>Let’s try to design a simple workflow:</p>
<ol>
<li>Define a pool work like queue to hold resources</li>
<li>Enqueue resources to the queue pool</li>
<li>For each running task, dequeue a resource for consumption</li>
<li>For each running task, enqueue the resource back to queue pool for next consumption</li>
</ol>
<pre class="prettyprint"><code class="language-delphi hljs "><span class="hljs-keyword">var</span> D: TDataSet; <span class="hljs-comment">// D is uni-directional dataset</span>
Q: TThreadedQueue<TData>;
Pool: TThreadedQueue<TDatabaseConnection>;
T: ITask;
TaskList: TList<ITask>;
Data: TData;
i: Integer;
<span class="hljs-keyword">begin</span>
Q := TThreadedQueue<TData>.Create(TThread.ProcessorCount * <span class="hljs-number">2</span>);
TaskList := TList<ITask>.Create;
Pool := TThreadedQueue<TDatabaseConnection>.Create(TThread.ProcessorCount);
<span class="hljs-keyword">for</span> i := <span class="hljs-number">1</span> <span class="hljs-keyword">to</span> TThread.ProcessorCount <span class="hljs-keyword">do</span>
Pool.PushItem(TDatabaseConnection.Create());
D := Create_Uni_Directional_DataSet;
D.Open;
<span class="hljs-keyword">while</span> <span class="hljs-keyword">not</span> D.Eof <span class="hljs-keyword">do</span> <span class="hljs-keyword">begin</span>
Data := CreateDataFromDataSet(D);
Q.PushItem(Data);
T := TTask.Run(
<span class="hljs-function"><span class="hljs-keyword">procedure</span>
<span class="hljs-title">var</span> <span class="hljs-title">A</span>:</span> TData;
C: TDatabaseConnection;
<span class="hljs-keyword">begin</span>
<span class="hljs-comment">// Get a resource from pool</span>
C := Pool.PopItem;
<span class="hljs-comment">// Perform job using the resource</span>
A := Q.PopupItem;
C.Execute(A); <span class="hljs-comment">(* Perform some task on A *)</span>
<span class="hljs-comment">// Finish. Push the resource back to pool</span>
Pool.PushItem(C);
<span class="hljs-keyword">end</span>
);
TaskList.Add(T);
D.Next;
<span class="hljs-keyword">end</span>;
...
<span class="hljs-keyword">end</span>;</code></pre>
<p>This design shall works as long as at any single time there is resource available in pool for each running task.</p>
<h1 id="collect-exceptions-raised-in-threaded-tasks">Collect exceptions raised in threaded tasks</h1>
<p>If exception happens in threaded tasks:</p>
<pre class="prettyprint"><code class="language-delphi hljs "><span class="hljs-keyword">var</span> i: Integer;
TaskList: TList<ITask>;
<span class="hljs-keyword">begin</span>
TaskList := TList<ITask>.Create;
<span class="hljs-keyword">for</span> i := <span class="hljs-number">1</span> <span class="hljs-keyword">to</span> <span class="hljs-number">50</span> <span class="hljs-keyword">do</span> <span class="hljs-keyword">begin</span>
TaskList.Add(
TTask.Run(
<span class="hljs-function"><span class="hljs-keyword">procedure</span>
<span class="hljs-title">begin</span>
<span class="hljs-title">if</span> <span class="hljs-title">Random</span><span class="hljs-params">(10)</span> <span class="hljs-title">mod</span> 5 = 0 <span class="hljs-title">then</span>
<span class="hljs-title">raise</span> <span class="hljs-title">Exception</span>.<span class="hljs-title">Create</span><span class="hljs-params">(<span class="hljs-string">'Error Message'</span>)</span>;</span>
<span class="hljs-keyword">end</span>
)
);
<span class="hljs-keyword">end</span>;
TTask.WaitForAll(TaskList.ToArray);
TaskList.Free;
<span class="hljs-keyword">end</span>;</code></pre>
<p>A message dialog prompt a message</p>
<blockquote>
<p><code>one or more errors occurred</code> </p>
</blockquote>
<p>without much detail information.</p>
<p>The exception raised is an instance of class <a href="http://docwiki.embarcadero.com/Libraries/XE8/en/System.Threading.EAggregateException"><code>EAggregateException</code></a>. The exception is easy to capture with a simple <code>try..except..end</code>construct:</p>
<pre class="prettyprint"><code class="language-delphi hljs "><span class="hljs-keyword">var</span> X: Exception;
i: Integer;
TaskList: TList<ITask>;
<span class="hljs-keyword">begin</span>
TaskList := TList<ITask>.Create;
<span class="hljs-keyword">try</span>
<span class="hljs-keyword">for</span> i := <span class="hljs-number">1</span> <span class="hljs-keyword">to</span> <span class="hljs-number">50</span> <span class="hljs-keyword">do</span> <span class="hljs-keyword">begin</span>
TaskList.Add(
TTask.Run(
<span class="hljs-function"><span class="hljs-keyword">procedure</span>
<span class="hljs-title">begin</span>
<span class="hljs-title">if</span> <span class="hljs-title">Random</span><span class="hljs-params">(10)</span> <span class="hljs-title">mod</span> 5 = 0 <span class="hljs-title">then</span>
<span class="hljs-title">raise</span> <span class="hljs-title">Exception</span>.<span class="hljs-title">Create</span><span class="hljs-params">(<span class="hljs-string">'Error Message'</span>)</span>;</span>
<span class="hljs-keyword">end</span>
)
);
<span class="hljs-keyword">end</span>;
<span class="hljs-keyword">try</span>
TTask.WaitForAll(TaskList.ToArray);
<span class="hljs-keyword">except</span>
<span class="hljs-keyword">on</span> E: EAggregateException <span class="hljs-keyword">do</span> <span class="hljs-keyword">begin</span>
<span class="hljs-keyword">for</span> X <span class="hljs-keyword">in</span> E <span class="hljs-keyword">do</span> <span class="hljs-keyword">begin</span>
OutputDebugString(PChar(X.<span class="hljs-keyword">Message</span>));
<span class="hljs-keyword">end</span>;
<span class="hljs-keyword">end</span>;
<span class="hljs-keyword">end</span>;
<span class="hljs-keyword">finally</span>
TaskList.Free;
<span class="hljs-keyword">end</span>;
<span class="hljs-keyword">end</span>;</code></pre>
<p>There is a significant different between <code>TParallel.&For</code> and <code>TTask.Run</code> handing exception.</p>
<p>If exception happens in the middle of <code>TParallel.&For</code>, it stop immediately without queuing more threaded task. it works in the manner is due to <code>TParallel.&For</code> is blocked during execution.</p>
<p><code>TTask.Run</code>, on the other hand doesn’t block during execution. Exception occurs in a particular <code>ITask</code> instance doesn’t stop other <code>ITask</code> instance. The best spot to capture exceptions from <code>ITask</code> reference is via <code>TTask.WaitForAll(...)</code>;</p>
<h1 id="information-from-future">Information from Future</h1>
<p><code>TTask.Future<T></code> defines a threaded task that return a generic <code>IFuture<T></code> reference. Once the threaded task complete execution, it’s value return via <code>IFuture<T>.Value</code> is ready for reference:</p>
<pre class="prettyprint"><code class="language-delphi hljs "><span class="hljs-keyword">var</span> Msg: IFuture<<span class="hljs-keyword">string</span>>;
<span class="hljs-keyword">begin</span>
Msg := TTask.Future<<span class="hljs-keyword">string</span>>(
<span class="hljs-function"><span class="hljs-keyword">function</span>:</span> <span class="hljs-keyword">string</span>
<span class="hljs-keyword">begin</span>
Sleep(<span class="hljs-number">2000</span>);
Result := <span class="hljs-string">'Message from future'</span>;
<span class="hljs-keyword">end</span>
);
ShowMessage(Msg.Value);
<span class="hljs-keyword">end</span>;</code></pre>
<p>In the example, <code>ShowMessage(Msg.Value)</code> is blocked until <code>Msg</code> task complete it’s execution.</p>
<h1 id="cancel-running-threaded-task-if-exception-raised">Cancel running threaded task if exception raised</h1>
<p>To cancel running threaded task if exception raised is applicable to <code>TTask.Run</code> usage only. It doesn’t apply to <code>TParallel.&For</code> which is blocked during execution.</p>
<p><code>TTask.Run</code> is unblocked during execution. It is not easy to cancel other running <code>ITask</code> instance if exception happens in any of the <code>ITask</code> instance. The solution I can think of so far is:</p>
<ol>
<li>Keep all <code>ITask</code> instances reference to a list</li>
<li>If exception happen to a particular <code>ITask</code> execution, notify for a exhaustive checking for of <code>ITask</code> instances in the list.</li>
<li>For each <code>ITask</code> instance, cancel <code>ITask</code> if still running</li>
</ol>
<h1 id="remove-completed-itask-instance-reference-from-task-list">Remove completed ITask instance reference from task list</h1>
<p>A straight solution is perform <code>WaitForAll</code> for all tasks and remove from task list later:</p>
<pre class="prettyprint"><code class="language-delphi hljs "><span class="hljs-keyword">var</span> TaskList: TList<ITask>;
<span class="hljs-keyword">begin</span>
TaskList := TList<ITask>.Create;
<span class="hljs-keyword">for</span> i := <span class="hljs-number">1</span> <span class="hljs-keyword">to</span> <span class="hljs-number">1000</span> <span class="hljs-keyword">do</span> <span class="hljs-keyword">begin</span>
TaskList.Add(
TTask.Run(
<span class="hljs-function"><span class="hljs-keyword">procedure</span>
<span class="hljs-title">begin</span>
...
<span class="hljs-title">end</span>
)
);</span>
<span class="hljs-keyword">end</span>;
TTask.WaitForAll(TaskList.ToArray);
TaskList.Clear;
...
TaskList.Free;
<span class="hljs-keyword">end</span></code></pre>
<p>However, if the ITask instance reference grow (e.g.: <code>50,000,000</code> to be stored in TaskList), system shall raise <code>Out of Memory</code> exception.</p>
<p>A solution is introducing a cleaning of <code>ITask</code> reference in batch (e.g.: Perform <code>WaitForAll</code> for every <code>100,000</code> <code>ITask</code> reference).</p>
<p>First define a method in <code>TThreadedQueue<TArray<ITask>></code> to perform threaded <code>WaitForAll</code> for tasks:</p>
<pre class="prettyprint"><code class="language-delphi hljs "><span class="hljs-keyword">type</span>
TThreadedTasksQueue_Helper = <span class="hljs-keyword">class</span> helper <span class="hljs-keyword">for</span> TThreadedQueue<TArray<ITask>>
<span class="hljs-keyword">public</span>
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">WaitForAll</span><span class="hljs-params">(<span class="hljs-keyword">const</span> aTasks: TArray<ITask>)</span>:</span> IFuture<Integer>;
<span class="hljs-keyword">end</span>;
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">TThreadedTasksQueue_Helper</span>.<span class="hljs-title">WaitForAll</span><span class="hljs-params">(<span class="hljs-keyword">const</span> aTasks: TArray<ITask>)</span>:</span> IFuture<Integer>;
<span class="hljs-keyword">begin</span>
PushItem(aTasks);
Result := TTask.Future<Integer>(
<span class="hljs-function"><span class="hljs-keyword">function</span>:</span> Integer
<span class="hljs-keyword">var</span> A: TArray<ITask>;
<span class="hljs-keyword">begin</span>
A := PopItem;
TTask.WaitForAll(A);
Result := Length(A);
<span class="hljs-keyword">end</span>
);
<span class="hljs-keyword">end</span>;</code></pre>
<p>Each <code>WaitForAll</code> batch of <code>100,000</code> tasks (<code>IFuture<Integer></code>) shall keep in a list (<code>Batches: TList<IFuture<Integer>></code>) first. Remember there should have balance tasks in TaskList not able to group in <code>100,000</code> per batch after the lengthy <code>for</code> loop. </p>
<p>Finally, query the each batch’s value (<code>Batch.Value</code>) to make sure all tasks ended properly.</p>
<pre class="prettyprint"><code class="language-delphi hljs "><span class="hljs-keyword">var</span> i: Integer;
Q: TThreadedQueue<Integer>;
Batches: TList<IFuture<Integer>>;
Batch: IFuture<Integer>;
WaitForQ: TThreadedQueue<TArray<ITask>>;
TaskList: TList<ITask>;
<span class="hljs-keyword">begin</span>
Q := TThreadedQueue<Integer>.Create;
WaitForQ := TThreadedQueue<TArray<ITask>>.Create;
Batches := TList<IFuture<Integer>>.Create;
TaskList := TList<ITask>.Create;
<span class="hljs-keyword">for</span> i := <span class="hljs-number">1</span> <span class="hljs-keyword">to</span> <span class="hljs-number">50000000</span> <span class="hljs-keyword">do</span> <span class="hljs-keyword">begin</span>
Q.PushItem(i);
TaskList.Add(
TTask.Run(
<span class="hljs-function"><span class="hljs-keyword">procedure</span>
<span class="hljs-title">begin</span>
<span class="hljs-title">Q</span>.<span class="hljs-title">PopItem</span>;</span>
<span class="hljs-keyword">end</span>
)
);
<span class="hljs-keyword">if</span> i <span class="hljs-keyword">mod</span> <span class="hljs-number">100000</span> = <span class="hljs-number">0</span> <span class="hljs-keyword">then</span> <span class="hljs-keyword">begin</span>
Batches.Add(WaitForQ.WaitForAll(TaskList.ToArray));
TaskList.Clear;
<span class="hljs-keyword">end</span>;
<span class="hljs-keyword">end</span>;
Batches.Add(WaitForQ.WaitForAll(TaskList.ToArray));
TaskList.Clear;
<span class="hljs-keyword">for</span> Batch <span class="hljs-keyword">in</span> Batches <span class="hljs-keyword">do</span> Batch.Value;
Q.Free;
WaitForQ.Free;
TaskList.Free;
Batches.Free;
<span class="hljs-keyword">end</span>;</code></pre>
<h1 id="reference">Reference</h1>
<ol>
<li><a href="1">stackoverflow.com: Synchronize() hangs up the thread</a></li>
<li><a href="https://stackoverflow.com/questions/31999429/delphi-ttask-waitforall-vs-synchronise">stackoverflow.com: Delphi TTask WaitForAll vs. Synchronise</a></li>
<li><a href="http://robstechcorner.blogspot.my/2015/02/tpl-ttask-example-in-how-not-to-use.html">Rob’s Technology Corner: PPL - TTask an example in how not to use.</a></li>
</ol>Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com0tag:blogger.com,1999:blog-38385155.post-36084028472713494332012-10-14T14:41:00.001+08:002012-10-14T14:41:29.654+08:00Retrieve credential values stored in WiFi device<h1>Introduction</h1> <p>When setup a WiFi network using network appliances, an account credential is always required to logon to network services provided by ISP (Internet Service Provider). For example, using modem router to access ISP’s broadband internet service. </p> <p>The ISP account credentials is usually enter once during configuration at first time and it should persist in the device’s RAM is ready to work for next power on. Compare ISP account credential with the other account credentials like your email account or desktop OS account that use every day, the user tend to forget or lost the ISP account credential easily. This happens when we upgrade to new WiFI device or hard reset the device due to some technical issues.</p> <p>This article introduces some software tools to attempt recover the account credential values store in WiFi device.</p> <h1>Retrieve configuration file from WiFi device</h1> <p>Most WiFI devices allow user to backup the configuration in a file. Read the user guides of the WiFi device to find out if it has the configuration backup option.</p> <p>For example, most D-Link WiFi device supports configuration backup via HTTP URL. Enter URL like:</p><pre>http://192.168.1.1/config.bin
</pre>
<p>in browser to download the configuration file. Most configuration are compressed and encrypted. Some tools is needed to decode the information stored in the configuration file.</p>
<h1>Router Pass View</h1>
<p><a href="http://www.nirsoft.net/utils/router_password_recovery.html">RouterPassView</a> is a software tool to decode the configuration file retrieved from WiFI router. Please note that not all WiFi device is supported, refer to the web site for a list of supported device.</p>
<p>It is easy to use RouterPassView. Download and launch the software, open the configuration file in the software and the configuration information should show in text format:</p>
<p><a href="http://lh6.ggpht.com/-j-60XYnjvCs/UHpejP8zI1I/AAAAAAAABKQ/u2DuLz31qa8/s1600-h/image%25255B3%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-ORMEKHOt3Vk/UHpelrGOGQI/AAAAAAAABKY/MWIbGZR7ESg/image_thumb%25255B1%25255D.png?imgmax=800" width="407" height="338"></a></p> Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com0tag:blogger.com,1999:blog-38385155.post-56042439012909111712012-08-27T15:53:00.001+08:002012-08-28T10:29:13.621+08:00Turn a Windows 7 desktop to Wifi AP via Microsoft Virtual Wifi miniport adapter<h1>Introduction</h1> <p>Windows 7 introduces a new virtual driver for WiFi network that create a virtual WiFi AP to share network / Internet connection for any WiFi device. The network adapter is named as <strong><u>Microsoft Virtual Wifi miniport adapter</u></strong>.</p> <p>Before Windows 7, Adhoc wireless connection is a common WiFi connection that may only connect to one WiFi device only. The Windows Virtual WiFi connection may connect to up 8 WiFi devices.</p> <h1>Check support of Virtual Wifi</h1> <p>The virtual network adapter should install automatically in Device Manager once your WiFi adapter is activated:</p> <p><a href="http://lh4.ggpht.com/-_vJUdxnNZ80/UDsnHO54UBI/AAAAAAAABHQ/GG2_Ogtc13Y/s1600-h/image7.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-uySXrW7VM2A/UDsnI1WIqPI/AAAAAAAABHY/eNsPn9-boQo/image_thumb3.png?imgmax=800" width="429" height="491"></a></p> <p>A new Wireless Network Connection (e.g.: Wireless Network Connection 2 in the following example) should configure as well:</p> <p><a href="http://lh3.ggpht.com/-376hbu0kVxQ/UDsnKk0Fz3I/AAAAAAAABHg/pKHrIJ3J6Dc/s1600-h/image15.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-_87f5b3yPjc/UDsnMjh3t5I/AAAAAAAABHo/k9QkiVKVWmk/image_thumb7.png?imgmax=800" width="688" height="306"></a></p> <p>Everything is ready up to this stage, continue the configuration to turn on the virtual WiFi AP and start sharing your network connection.</p> <p>Please note that there is no GUI tools to configure virtual WIFI connection. All commands should type in command line console under Administrator privilege.</p> <h1>Configure Virtual WiFi connection</h1> <p>Choose a SSID to identify your virtual WIFI AP and set a password for it. Type the following command in command line console running as administrator to start configure:</p><pre style="background: #f1f0f0; color: #000000">C<span style="color: #806030">:</span><span style="color: #806030">\</span>Windows<span style="color: #806030">\</span>system32<span style="color: #806030">></span><font color="#0000ff">netsh wlan set hostednetwork mode<span style="color: #806030">=</span>allow ssid<span style="color: #806030">=<font color="#0000ff">MyWifi</font></span> key<span style="color: #806030">=</span>password keyUsage<span style="color: #806030">=</span>persistent</font>
The hosted network mode has been set to allow<span style="color: #806030">.</span>
The SSID of the hosted network has been successfully changed<span style="color: #806030">.</span>
The user key passphrase of the hosted network has been successfully changed<span style="color: #806030">.</span>
</pre>
<p>Make sure the physical Wifi adapter is enabled before start the Virtual WiFi connection:</p>
<p><pre style="background: #f1f0f0; color: #000000">C<span style="color: #806030">:</span><span style="color: #806030">\</span>Windows<span style="color: #806030">\</span>system32<span style="color: #806030">></span><font color="#0000ff">netsh wlan start hostednetwork
</font>The hosted network started<span style="color: #806030">.</span></pre>
<p>The Virtual WiFi connection (MyWifi, in this example) is active:</p>
<p><a href="http://lh4.ggpht.com/-nRONwEcG954/UDsnN8iB-KI/AAAAAAAABHw/2WvA7QlPf54/s1600-h/image41.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-gnvh2xN3uVU/UDsnPdANVnI/AAAAAAAABH4/zOPUWN-5UBw/image_thumb19.png?imgmax=800" width="711" height="307"></a></p>
<p>The Virtual WiFi connection is ready to accept connection now. Use any other WiFi device (Smartphone, other notebook, PC) to check if the MyWifi connection appears the WiFi connection list.</p>
<p>Please note that the virtual WiFi connection does not connect to any Internet connection yet. All WiFi connection to MyWifi is isolated in the MyWifi network only.</p>
<h1>Share Internet connection to Virtual WiFi connection</h1>
<p>Enable Internet Connection Sharing for virtual WiFi connection allow Internet traffic be served for virtual WiFi client. First, identify the network connection with Internet access:</p>
<p><a href="http://lh5.ggpht.com/-8DMGRhLwQ8k/UDsnREchuFI/AAAAAAAABIA/HUA8oYzoDmE/s1600-h/image23.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-uebpW9iILbA/UDsnT5X4g9I/AAAAAAAABII/g9Uyrc5P5NU/image_thumb11.png?imgmax=800" width="711" height="433"></a></p>
<p>Open properties page of the Network Connection with internet access and set the following:</p>
<ol>
<li>“Allow other network users to connect through this computer’s Internet connection.
<li>Set Home networking connection to “Wireless Network Connection 2” (The connection should be Virtual WiFi Connection).
<li>Click OK to commit changes.</li></ol>
<h1><a href="http://lh3.ggpht.com/-yC9NAw8nOb0/UDsnV-V0ulI/AAAAAAAABIQ/z2nrLGC4xho/s1600-h/image27.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-4qQRHM-hw7E/UDsnYl1ThjI/AAAAAAAABIY/gxk5N9M4Noo/image_thumb13.png?imgmax=800" width="500" height="582"></a></h1>
<p>The Virtual WiFi connection should have access to Internet now:</p>
<p><a href="http://lh3.ggpht.com/-RwFch24bT2k/UDsnaR3yQhI/AAAAAAAABIg/AD8Gfd3eZbQ/s1600-h/image31.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-440n5HWo6u8/UDsneP5JdPI/AAAAAAAABIo/tOcb8U0fof0/image_thumb15.png?imgmax=800" width="711" height="307"></a></p>
<p>Other WiFi device connect to virtual WiFi connection should be able to access the Internet immediately.</p>
<h1>Virtual Wifi AP not started after reboot</h1>
<p>The Windows 7 Virtual WiFi connection is not persisted when machine reboot. You should start the virtual WiFi connection each time machine has rebooted:</p><pre style="background: #f1f0f0; color: #000000"><span style="color: #e34adc">C:</span>\<span style="color: #806030">></span><font color="#0000ff">netsh wlan show hostednetwork</font>
Hosted network settings
<span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span>
Mode <span style="color: #806030">:</span> Allowed
SSID name <span style="color: #806030">:</span> <span style="color: #800000">"</span><span style="color: #e60000">MyWifi</span><span style="color: #800000">"</span>
Max number of clients <span style="color: #806030">:</span> <span style="color: #c00000">8</span>
Authentication <span style="color: #806030">:</span> WPA2<span style="color: #806030">-</span>Personal
Cipher <span style="color: #806030">:</span> CCMP
Hosted network status
<span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span><span style="color: #806030">-</span>
Status <span style="color: #806030">:</span> Not started
<span style="color: #e34adc">C:</span>\<span style="color: #806030">></span><font color="#0000ff">netsh wlan start hostednetwork</font>
The hosted network started<span style="color: #806030">.</span></pre>
<h1>Stop virtual WiFi connection</h1>
<p>Run the command to stop connection:</p><pre style="background: #f1f0f0; color: #000000">C<span style="color: #806030">:</span><span style="color: #806030">\</span><span style="color: #806030">></span><font color="#0000ff">netsh wlan stop hostednetwork</font>
The hosted network stopped<span style="color: #806030">.</span></pre>
<h1>Uninstall virtual WiFi adapter</h1>
<p>It is not necessary to uninstall virtual WiFi adapter as the uninstall is not permanent. The virtual WiFi adapter will be installed once your reboot machine. If you mean to uninstall the virtual WiFi adapter for current session, try this:</p><pre style="background: #f1f0f0; color: #000000">C<span style="color: #806030">:</span><span style="color: #806030">\</span><span style="color: #806030">></span><font color="#9b00d3">netsh wlan set hostednetwork mode<span style="color: #806030">=</span>disallow</font>
The hosted network mode has been set to disallow<span style="color: #806030">.</span></pre>
<h1>Side Effect: Unable to access network share after update Microsoft Virtual WiFi Miniport Adapter</h1>
<p>There is a side effect if Microsoft Virtual Wifi Miniport Adapter has been updated. The network share may not be accessed and “0x8004005 Unspecified error” may prompt:</p>
<p><a href="http://lh6.ggpht.com/-voJkDvnglVA/UDws3ACNX4I/AAAAAAAABJI/1AKlPkvV4VA/s1600-h/image%25255B3%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-EAfMZ9j8RSk/UDws5eCdIdI/AAAAAAAABJQ/NBLnZjlzaTQ/image_thumb%25255B1%25255D.png?imgmax=800" width="540" height="306"></a></p>
<p>This is due to the “Client for Microsoft Networks” service is missing from the network connection. Reinstall service “Client for Microsoft Networks” will solve the error:</p>
<p><a href="http://lh6.ggpht.com/-hXbHqWd1gNw/UDws7ChxKhI/AAAAAAAABJY/5or3C4tp04w/s1600-h/Untitled%25255B3%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Untitled" border="0" alt="Untitled" src="http://lh4.ggpht.com/-lhq9Nqy4Pk4/UDws9Ler2_I/AAAAAAAABJg/zdz2WYevBzI/Untitled_thumb%25255B1%25255D.png?imgmax=800" width="500" height="582"></a></p> Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com0tag:blogger.com,1999:blog-38385155.post-12555896900505203092012-05-24T16:11:00.000+08:002012-05-24T16:11:51.854+08:00Linux: Disable SELINUX<h1>Introduction</h1> <p>SELINUX may cause some confusion and difficulties when configuring Linux. If any weird problems encounter while configure any of the Linux services (e.g.: Samba, Firewall, ...), we may disable the SELINUX first to check if the problems are related to it.</p> <h1>Fedora 16</h1> <p>In Fedora 16, selinux no longer mount to /selinux. It has move to /sys/fs/selinux.</p> <ol> <li>Temporary disable SELINUX: <span><span class="code">echo 0 >/sys/fs/selinux/enforce</span></span> <li>Temporary enable SELINUX: <span><span class="code">echo 1 >/sys/fs/selinux/enforce</span></span> <li><span><span class="code">Permanently disable SELINUX: edit </span></span><span class="inlinecode">/etc/selinux/config and change "</span><span><b><span class="code"><b>SELINUX=enforcing"</b></span></b><span class="code"> to "</span></span><span><b><span class="code"><b>SELINUX=disabled"</b></span></b></span></li></ol> <h1>Fedora 15 or below</h1> <ol> <li>Temporary disable SELINUX: <span><span class="code">echo 0 >/selinux/enforce</span></span> <li>Temporary enable SELINUX: <span><span class="code">echo 1 >/selinux/enforce</span></span> <li><span><span class="code">Permanently disable SELINUX: edit </span></span><span class="inlinecode">/etc/selinux/config and change "</span><span><b><span class="code"><b>SELINUX=enforcing"</b></span></b><span class="code"> to "</span></span><span><b><span class="code"><b>SELINUX=disabled"</b></span></b></span></li></ol>Reference: <a href="http://www.crypt.gen.nz/selinux/disable_selinux.html">How to Disable SELinux</a> Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com0tag:blogger.com,1999:blog-38385155.post-20981991009022820432012-05-02T09:48:00.001+08:002012-05-02T09:48:38.954+08:00Migrate Windows 7 instance to iSCSI target<h1>Introduction</h1> <p>It is straight forward to install a fresh new Windows 7 instance on iSCSI target. However, there few tricks to migrate a Windows 7 instance to iSCSI target. Migrating an existing Windows 7 instance is a time consuming process especially for large partition size. Doing it right will save lot of time.</p> <h1>Prepare Windows 7 disk volume for migration</h1> <p>If a Windows 7 instance has larger partition size, e.g.: Few hundred Giga bytes or Tera bytes, migrate this instance will spend lot of time transfer Windows 7 instance to iSCSI target. Before start migrate the instance, try shrink or extend the volume size suitable for usage in near future. Use Extend Volume… and Shrink Volume… function in Disk Management to perform the task: </p> <p><a href="http://lh3.ggpht.com/-WVrbgecAFe8/T6CSQQIFYNI/AAAAAAAABFw/tCSfuDgiHP4/image6.png?imgmax=800"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://lh3.ggpht.com/-I67Eg4m85UU/T6CSUpngBOI/AAAAAAAABF4/DfUviFXu5bI/image_thumb2.png?imgmax=800" width="693" height="379"></a></p> <h1>Update Windows 7 network driver</h1> <p>The iSCSI operation rely heavily on the network device. Update the network driver to latest version is not always necessary but it is advisable to do so. Some booting process of iSCSI operation may slow down due to network driver’s problem.</p> <h1>Disable LightWeight Filter (LWF)</h1> <p>Disable LightWeight Filter (LWF) is a crucial step to make sure the migration work. This step must perform or else the SAN boot will fail in later stage.</p> <p>A Microsoft knowledge article <a href="http://support.microsoft.com/kb/976042">KB967042: Windows may fail to boot from an iSCSI drive if networking hardware is changed</a> describe the cause and solution for the problem.</p> <p>There is a quick solution to disable LWF by changing some registry setting:</p> <ol> <li>Identify the description of Network Adapter use for iSCSI network operation in later stage:<br><br><a href="http://lh3.ggpht.com/-sk1b1pMxiUY/T6CSWX2pRUI/AAAAAAAABGA/HF4goInRmpM/s1600-h/image10.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://lh4.ggpht.com/-ie61YYPPaUA/T6CSXepayWI/AAAAAAAABGI/Mij3Isyp2Pk/image_thumb4.png?imgmax=800" width="380" height="448"></a> <li>Start RegEdit in administrator account. <li>Open HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ Class\{4D36E972-E325-11CE-BFC1-08002BE10318}. There are many subkeys underneath, find and open the subkey where the DriverDesc match the NIC’s description. e.g.: 0013<br><br><a href="http://lh6.ggpht.com/-SKBIEP758-I/T6CSY8EyA9I/AAAAAAAABGQ/0nogkQZ7rXI/s1600-h/image14.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://lh3.ggpht.com/-XACe0yGfcug/T6CSaGh697I/AAAAAAAABGY/9mzDZJp8auc/image_thumb6.png?imgmax=800" width="845" height="486"></a> <li>Open the subkey Linkage and edit FilterList value:<br><br><a href="http://lh4.ggpht.com/-1Zw81ccJIFs/T6CSbXwqVbI/AAAAAAAABGg/XgMCN5ROrk8/s1600-h/image18.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://lh3.ggpht.com/-2jZQo4ypVkM/T6CSc98rNkI/AAAAAAAABGo/zMcimKiVUcM/image_thumb8.png?imgmax=800" width="750" height="531"></a> <li>There are usually two lines in FilterList:<br><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00">{0B47BB2C-86FB-4699-8906-E08465757D92}</span><span style="color: #806030">-</span><span style="color: #c34e00">{B5F4D659-7DAA-4565-8E41-BE220ED60542}</span><span style="color: #806030">-</span><span style="color: #c00000">0000</span>
<span style="color: #c34e00">{0B47BB2C-86FB-4699-8906-E08465757D92}</span><span style="color: #806030">-</span><span style="color: #c34e00">{B70D6460-3635-4D42-B866-B8AB1A24454C}</span><span style="color: #806030">-</span><span style="color: #c00000">0000</span></pre>
<li>Delete the line that refer to LWF driver’s UUID: <strong>{B70D6460-3635-4D42-B866-B8AB1A24454C}</strong>. In this case:<br><span style="color: #c00000"><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00">{0B47BB2C-86FB-4699-8906-E08465757D92}</span><span style="color: #806030">-</span><span style="color: #c34e00">{B5F4D659-7DAA-4565-8E41-BE220ED60542}</span><span style="color: #806030">-</span><span style="color: #c00000">0000</span>
<strike><span style="color: #c34e00">{0B47BB2C-86FB-4699-8906-E08465757D92}</span><span style="color: #806030">-</span><span style="color: #c34e00">{B70D6460-3635-4D42-B866-B8AB1A24454C}</span><span style="color: #806030">-</span><span style="color: #c00000">0000</span></strike></pre></span></li></ol>
<h1></h1>
<h1>Migrate Windows 7 disk image to iSCSI target</h1>
<p>Next, the Windows 7 is ready to image and transfer to iSCSI target. Boot into Linux and use command line utilities like fdisk and dd to image the Windows 7 partition.</p>
<p>First, decide the partition size:</p><pre style="background: #f1f0f0; color: #000000"># fdisk -lu /dev/sdb
<pre style="background: #f1f0f0; color: #000000">Disk <span style="color: #806030">/</span>dev<span style="color: #806030">/</span>sdb<span style="color: #806030">:</span> <span style="color: #800000">1000.2</span> GB<span style="color: #806030">,</span> <span style="color: #c00000">1000204886016</span> bytes
<span style="color: #c00000">255</span> heads<span style="color: #806030">,</span> <span style="color: #c00000">63</span> sectors<span style="color: #806030">/</span>track<span style="color: #806030">,</span> <span style="color: #c00000">121601</span> cylinders<span style="color: #806030">,</span> total <span style="color: #c00000">1953525168</span> sectors
Units <span style="color: #806030">=</span> sectors of <span style="color: #c00000">1</span> <span style="color: #806030">*</span> <span style="color: #c00000">512</span> <span style="color: #806030">=</span> <span style="color: #c00000">512</span> bytes
Sector size <span style="color: #806030">(</span>logical<span style="color: #806030">/</span>physical<span style="color: #806030">)</span><span style="color: #806030">:</span> <span style="color: #c00000">512</span> bytes <span style="color: #806030">/</span> <span style="color: #c00000">512</span> bytes
I<span style="color: #806030">/</span>O size <span style="color: #806030">(</span>minimum<span style="color: #806030">/</span>optimal<span style="color: #806030">)</span><span style="color: #806030">:</span> <span style="color: #c00000">512</span> bytes <span style="color: #806030">/</span> <span style="color: #c00000">512</span> bytes
Disk identifier<span style="color: #806030">:</span> <span style="color: #c00000">0xdf70df70</span>
Device Boot Start End Blocks Id System
<span style="color: #806030">/</span>dev<span style="color: #806030">/</span>sdb1 <span style="color: #806030">*</span> <span style="color: #c00000">2099200</span> <span style="color: #c00000">309299199</span> <span style="color: #c00000">153600000</span> <span style="color: #c00000">7</span> HPFS<span style="color: #806030">/</span>NTFS
<span style="color: #806030">/</span>dev<span style="color: #806030">/</span>sdb2 <span style="color: #c00000">718899200</span> <span style="color: #c00000">1953521663</span> <span style="color: #c00000">617311232</span> f W95 Ext'd <span style="color: #806030">(</span>LBA<span style="color: #806030">)</span>
<span style="color: #806030">/</span>dev<span style="color: #806030">/</span>sdb5 <span style="color: #c00000">718901248</span> <span style="color: #c00000">1333301247</span> <span style="color: #c00000">307200000</span> <span style="color: #c00000">7</span> HPFS<span style="color: #806030">/</span>NTFS
<span style="color: #806030">/</span>dev<span style="color: #806030">/</span>sdb6 <span style="color: #c00000">1333303296</span> <span style="color: #c00000">1435703295</span> <span style="color: #c00000">51200000</span> <span style="color: #c00000">7</span> HPFS<span style="color: #806030">/</span>NTFS
<span style="color: #806030">/</span>dev<span style="color: #806030">/</span>sdb7 <span style="color: #c00000">1435705344</span> <span style="color: #c00000">1953521663</span> <span style="color: #c00000">258908160</span> <span style="color: #c00000">7</span> HPFS<span style="color: #806030">/</span>NTFS</pre></pre>
<p>In above example, the windows 7 partition is /dev/sdb1. The sector start from 209920 and end at 309299199. However, sector from 1 to 2099199 is necessary too as it contain the MBR code to make Windows 7 boots properly. The total size to of Windows 7 image should start from sector 1 to 309299199. Each sector has size 512 bytes.</p><pre style="background: #f1f0f0; color: #000000"># dd if<span style="color: #806030">=</span>/dev/sdb of=win7.img bs=<span style="color: #8c0000">512</span> count=<span style="color: #8c0000">309299199</span></pre>
<p>The block size of 512 bytes of above example may be slow to image the partition. Try switch the bs and count value may accelerate the imaging process:</p><pre style="background: #f1f0f0; color: #000000"># dd if<span style="color: #806030">=</span>/dev/sdb of=win7.img bs=<font color="#8c0000">309299199</font> count=<span style="color: #8c0000">512</span></pre>
<p>Transfer win7.img to iSCSI target and perform necessary setup. The Windows 7 instance has successfully migrate to iSCSI target. The iSCSI target is ready to SAN boot now.</p>
<h1>Boot iSCSI target</h1>
<p>Once the iSCSI target is setup, use iPXE or gPXE to SAN boot the iSCSI target:</p><pre style="background: #f1f0f0; color: #000000">dhcp net0
sanboot iscsi<span style="color: #806030">:</span>nas<span style="color: #806030">.</span>example<span style="color: #806030">.</span>com<span style="color: #806030">::</span><span style="color: #806030">::</span>iqn<span style="color: #806030">.</span>example<span style="color: #806030">.</span>com<span style="color: #806030">:</span>windows<span style="color: #806030">-</span><span style="color: #c00000">7</span>
</pre>
<h1>Reference</h1>
<ol>
<li>Diskless Windows 7 iSCSI boot from OpenSolaris 2009.06 ZFS Server. URL: <a href="http://blog.zorinaq.com/?e=41">http://blog.zorinaq.com/?e=41</a>
<li><a name="transferring_the_disk_image_to_a_san_target">Transferring the disk image to a SAN target</a>. URL: <a href="http://www.etherboot.org/wiki/sanboot/transfer">http://www.etherboot.org/wiki/sanboot/transfer</a></li></ol> Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com4tag:blogger.com,1999:blog-38385155.post-40888708332928355722012-04-22T06:03:00.001+08:002012-04-22T10:43:55.584+08:00Install Windows XP on iSCSI target<h1>Introduction</h1> <p>Unlike Windows 7 installer, Windows XP installer doesn’t support sanboot iSCSI target access. This is the most tricky part to install Windows XP on iSCSI target. Other problem is identify a matched network driver as all traffic will transmit over network.</p> <h1>Prepare a iSCSI target</h1> <p>First, setup a new iSCSI target for the Windows XP instance. The minimum disk size is 2GB. For illustration purpose, the iSCSI target in this article is</p><pre style="background: #f1f0f0; color: #000000"><span style="color: #e34adc">iscsi:</span>nas<span style="color: #806030">.example.com</span><span style="color: #806030">::</span><span style="color: #806030">::</span>iqn<span style="color: #806030">.example.com</span><span style="color: #806030">:</span>winxp</pre>
<h1>Setup iSCSI target</h1>
<p>Next, the iSCSI target should be formatted to NTFS file system and mark active with Windows XP utilities and tools. These tasks may perform in existing Windows XP system or virtual machine.</p>
<p>To connect to iSCSI target disk in Windows XP, download Microsoft <a href="http://www.microsoft.com/download/en/details.aspx?id=18986">iSCSI Software Initiator Software</a>. Install the software in Windows XP and connect the iSCSI target:</p>
<p><a href="http://lh3.ggpht.com/-Cl2Lbg66Z-g/T5NvnND3zTI/AAAAAAAABDg/UUv5jAPMeY4/s1600-h/1%25255B3%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="1" border="0" alt="1" src="http://lh4.ggpht.com/-Ec5A1Sk_7q0/T5NvoMqYzVI/AAAAAAAABDo/gq0gFNYxUvg/1_thumb%25255B1%25255D.png?imgmax=800" width="410" height="479"></a></p>
<p>Start Control Panel | Administrative Tools | Computer Management | Disk Management, the new iSCSI target disk should appear in the disk array:</p>
<p><a href="http://lh4.ggpht.com/-u_fuqyIgQbg/T5NvpH1o2EI/AAAAAAAABDw/XIOPgJW6hDQ/s1600-h/2%25255B3%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2" border="0" alt="2" src="http://lh4.ggpht.com/-lTMqqylAxbY/T5NvqbjHwzI/AAAAAAAABD4/hxh2tmJCKDk/2_thumb%25255B1%25255D.png?imgmax=800" width="762" height="556"></a></p>
<p>Setup a new primary partition on the disk:</p>
<p><a href="http://lh6.ggpht.com/-AvGCPv73kI8/T5NvrhU0vNI/AAAAAAAABEA/4mHzviMYP80/s1600-h/3%25255B3%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="3" border="0" alt="3" src="http://lh5.ggpht.com/-js1onbeqhcI/T5NvsokX0XI/AAAAAAAABEI/6Kh6R5aqYj0/3_thumb%25255B1%25255D.png?imgmax=800" width="507" height="397"></a></p>
<p>Assign a drive letter to the partition:</p>
<p><a href="http://lh3.ggpht.com/-o2LDrD7dTUA/T5NvtafafdI/AAAAAAAABEM/dIPetw2SlrI/s1600-h/5%25255B3%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="5" border="0" alt="5" src="http://lh3.ggpht.com/-jq0MqQ6E1AM/T5NvulwVgiI/AAAAAAAABEY/7M9AE9jdnro/5_thumb%25255B1%25255D.png?imgmax=800" width="507" height="397"></a></p>
<p>and format to NTFS file system:</p>
<p><a href="http://lh3.ggpht.com/-Q8hQhdBM9dA/T5NvvkWBJNI/AAAAAAAABEg/JpnsV5XyoA8/s1600-h/4%25255B3%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="4" border="0" alt="4" src="http://lh5.ggpht.com/-qMpic6x5zTo/T5Nvwh8XlnI/AAAAAAAABEo/y6MophtYAa0/4_thumb%25255B1%25255D.png?imgmax=800" width="507" height="397"></a></p>
<p>Remember to mark the partition active:</p>
<p><a href="http://lh6.ggpht.com/-ibG0ICV6QzM/T5NvxkYw4_I/AAAAAAAABEw/SoSZINulAeM/s1600-h/6%25255B3%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="6" border="0" alt="6" src="http://lh5.ggpht.com/-e5NFiMDVLbQ/T5NvyyeCQnI/AAAAAAAABE0/zJcTRWoPIN4/6_thumb%25255B1%25255D.png?imgmax=800" width="762" height="555"></a></p>
<p>The new iSCSI disk E:\ is ready to use now.</p>
<h1>Prepare Windows XP setup files</h1>
<p>To prepare windows installation from iSCSI target disk itself, use winnt32.exe in the installation CD or ISO file:</p>
<p>Assume drive D:\ contain the Windows XP installer:</p><pre style="background: #f1f0f0; color: #000000"><span style="color: #e34adc">D:</span>\I386<span style="color: #806030">></span>winnt32 <span style="color: #806030">/</span>syspart<span style="color: #806030">:E</span> <span style="color: #806030">/</span>tempdrive<span style="color: #806030">:E</span> <span style="color: #806030">/</span>makelocalsource <span style="color: #806030">/</span>noreboot</pre>
<p>The command prepare a Windows XP installation in drive E.</p>
<p>The next screen prompt for Installation Type. Chose <strong><u>New Installation (Advanced)</u></strong>. </p>
<p><a href="http://lh5.ggpht.com/-Q9rW22MB8QU/T5Nv0flYkoI/AAAAAAAABE8/KXgVE8-G7XA/s1600-h/7%25255B3%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="7" border="0" alt="7" src="http://lh4.ggpht.com/-Q2zRXaXhk7o/T5Nv2bAbTtI/AAAAAAAABFI/qrhbpwIFRoc/7_thumb%25255B1%25255D.png?imgmax=800" width="982" height="615"></a></p>
<p>Follow the screen instruction to complete the initial setup.</p>
<h1>Integrate iSCSI components</h1>
<p>After finish Windows XP installer setup, the iSCSI target disk contain the necessary Windows XP setup files and it it ready to start setup soon. However, the Windows XP installer do not have iSCSI initiator and sanboot service nor it has matched NIC network driver. It still not ready yet for iSCSI booting. Our next task is integrate iSCSI initiator, sanboot service and network driver into the Windows XP installation.</p>
<p>First, download a third party tools <a href="http://iknowu.dnsalias.com/files/public/integratedrv/IntegrateDrv.htm">IntegrateDrv</a> to perform integration. Extract the tools and run the command in console to perform integration:</p><pre style="background: #f1f0f0; color: #000000">IntegrateDrv<span style="color: #806030">.</span>exe <span style="color: #806030">/</span>driver<span style="color: #806030">=</span><span style="color: #806030">.</span><span style="color: #806030">.</span>\Drivers\PRO100\win32\NDIS5x <span style="color: #806030">/</span>driver<span style="color: #806030">=</span><span style="color: #806030">.</span><span style="color: #806030">.</span>\Drivers\iScsiPrt\x86 <span style="color: #806030">/</span>driver<span style="color: #806030">=</span><span style="color: #806030">.</span><span style="color: #806030">.</span>\Drivers\sanbootconf <span style="color: #806030">/</span>driver<span style="color: #806030">=</span><span style="color: #806030">.</span><span style="color: #806030">.</span>\Drivers\nicbootconf <span style="color: #806030">/</span>target<span style="color: #806030">=</span>E<span style="color: #806030">:</span>\</pre>
<p>The above command install a network driver from Intel Pro100. IntegrateDrv provides very limited network driver. It is usually not suitable for most situation. You should supply a matched network driver in the integration. Most problem happen in later boot up stage are mostly related to unmatched or incompatible network driver. Perform this step with care to make sure the iSCSI boot up success in next stage.</p>
<p>A network configuration may prompt to specify IP address, network mask and default gateway IP at the end of integration. You may ignore it if there is a DHCP service in the network:</p>
<p><a href="http://lh3.ggpht.com/-WGA9QL_bzkk/T5Nv3aFCr2I/AAAAAAAABFQ/2qL5jc7xnds/s1600-h/image%25255B3%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-P5ldOU4IqWc/T5Nv4aYfRQI/AAAAAAAABFY/ydOhqp8XGNw/image_thumb%25255B1%25255D.png?imgmax=800" width="673" height="378"></a></p>
<p>If everything goes well, the iSCSI target is ready to boot up and perform actual Windows XP installation. Remember to disconnect or logoff the iSCSI target disk before perform installation:</p>
<p><a href="http://lh6.ggpht.com/-sgs1MmQHQAc/T5Nv50zr1oI/AAAAAAAABFg/YAyt5_GMNX8/s1600-h/image%25255B7%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-De6_ShzTyD4/T5Nv61MZqvI/AAAAAAAABFk/NwnhhkaSD94/image_thumb%25255B3%25255D.png?imgmax=800" width="410" height="479"></a></p>
<h1>Boot iSCSI target to install Windows XP</h1>
<p>The iSCSI target disk integrated with necessary iSCSI component may now boot from target computer to perform Windows XP installation now. From iPXE prompt during network boot up, execute these:</p><pre style="background: #f1f0f0; color: #000000">dhcp net0
sanboot iscsi<span style="color: #806030">:</span>nas<span style="color: #806030">.</span>example<span style="color: #806030">.</span>com<span style="color: #806030">::</span><span style="color: #806030">::</span>iqn<span style="color: #806030">.</span>example<span style="color: #806030">.</span>com<span style="color: #806030">:</span>winxp
</pre>
<p>The iSCSI target disk should boot up to perform familiar Windows XP installation. Follow the screen instruction to finish the installation. During installation, the installer may prompt for unsigned driver for both iSCSI initiator and network driver, press Yes to continue the installation:</p>
<p><img src="http://ipxe.org/lib/exe/fetch.php?media=http%3A%2F%2Fiknowu.dnsalias.com%2Ffiles%2Fpublic%2Fintegratedrv%2FScreenshots%2FGUI_Mode_Unsigned_Driver.png"></p>
<p>After finish installation, use the above sanboot command to start the Windows XP instance for normal daily usage.</p>
<h1>Reference</h1>
<ol>
<li><a name="installing_windows_xp_2003_directly_to_an_iscsi_target">Installing Windows XP \ 2003 directly to an iSCSI target</a>. URL: <a href="http://ipxe.org/appnote/xp_2003_direct_install">http://ipxe.org/appnote/xp_2003_direct_install</a>
<li>Integrate mass-storage text-mode or PNP drivers into windows 2000 \ XP \ 2003 setup. URL: <a href="http://iknowu.dnsalias.com/files/public/integratedrv/IntegrateDrv.htm">http://iknowu.dnsalias.com/files/public/integratedrv/IntegrateDrv.htm</a></li></ol> Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com0tag:blogger.com,1999:blog-38385155.post-89541818845250304982012-04-16T15:11:00.001+08:002012-04-16T15:11:21.226+08:00FireMonkey Development Setup for iOS: Delphi XE2 Update 4<h1>Introduction</h1> <p><a href="http://lh4.ggpht.com/-QubohWxrABg/T4vF5jwy1SI/AAAAAAAABCY/42OxnSmpINQ/s1600-h/Screen-Shot-2012-04-14-at-9.59.25-AM%25255B2%25255D.png">This </a>topic shows how to setup FireMonkey Development environment for iOS – Apple’s mobile device platform for iPhone, iPAD or iPod touch.</p> <p>To continue installation, Xcode 4.2 should be ready in Mac OS X machine.</p> <h1>Install FireMonkey – iOS SDK</h1> <p>The FireMonkey iOS SDK is available in Delphi XE2 folder <strong><u>FireMonkey-iOS</u></strong>. The following folder is a shared folder from VMware machine: %ProgramFiles(x86)\Embarcadero\RAD Studio\9.0:</p> <p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Screen Shot 2012-04-14 at 9.59.25 AM" border="0" alt="Screen Shot 2012-04-14 at 9.59.25 AM" src="http://lh4.ggpht.com/-QGta_IiVXMc/T4vF7o5OxrI/AAAAAAAABCg/QuR0iN7h_ks/Screen-Shot-2012-04-14-at-9.59.25-AM.png?imgmax=800" width="793" height="464"></p> <p><a href="http://lh4.ggpht.com/-m1kt4fmGfF8/T4vF8_i5MWI/AAAAAAAABCo/3uwYA33GPQU/s1600-h/Screen-Shot-2012-04-14-at-9.59.38-AM%25255B1%25255D.png">Locate FireMonkey-iOS.dmg disk image in the folder:</a></p> <p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Screen Shot 2012-04-14 at 9.59.38 AM" border="0" alt="Screen Shot 2012-04-14 at 9.59.38 AM" src="http://lh5.ggpht.com/-QUwl65HQM0U/T4vF-FtZ5HI/AAAAAAAABCw/V5rpaQLTUy8/Screen-Shot-2012-04-14-at-9.59.38-AM.png?imgmax=800" width="786" height="458"></p> <p>Open or mount the disk image:</p> <p><a href="http://lh4.ggpht.com/-02xZUGGYTu8/T4vGAYsjbII/AAAAAAAABC4/Y2JyRgns2NE/s1600-h/Screen-Shot-2012-04-14-at-9.59.49-AM.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Screen Shot 2012-04-14 at 9.59.49 AM" border="0" alt="Screen Shot 2012-04-14 at 9.59.49 AM" src="http://lh4.ggpht.com/-t6_k1PAZGC4/T4vGCuDaJsI/AAAAAAAABDA/udVKSZ6bAVc/Screen-Shot-2012-04-14-at-9.59.49-AM%25255B1%25255D.png?imgmax=800" width="655" height="327"></a></p> <p>Install both packages in the following sequence:</p> <ol> <li>fpc-2.6.0.intel-macosx.pkg <li>FireMonkey-iOS-XE2.pkg</li></ol> <p>A new folder: Embarcadero should be created in Developer folder:</p> <p><a href="http://lh3.ggpht.com/-LncKz0BNMO4/T4vGEBerYyI/AAAAAAAABDI/X6kXb-C_2wA/s1600-h/Screen-Shot-2012-04-14-at-10.12.39-A%25255B1%25255D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Screen Shot 2012-04-14 at 10.12.39 AM" border="0" alt="Screen Shot 2012-04-14 at 10.12.39 AM" src="http://lh4.ggpht.com/-amApOWKqJVc/T4vGFoPakMI/AAAAAAAABDQ/kb-3pUPCgr0/Screen-Shot-2012-04-14-at-10.12.39-A.png?imgmax=800" width="790" height="556"></a></p> <p>The FireMonkey iOS SDK is ready for Xcode to compile FireMonkey iOS project now.</p> <h1>Reference</h1> <ol> <li>FireMonkey Development Setup for iOS. URL: <a href="http://docwiki.embarcadero.com/RADStudio/en/FireMonkey_Development_Setup_for_iOS">http://docwiki.embarcadero.com/RADStudio/en/FireMonkey_Development_Setup_for_iOS</a></li></ol> Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com1tag:blogger.com,1999:blog-38385155.post-70927288829266578992012-04-16T14:05:00.000+08:002012-04-16T14:55:02.527+08:00Install Xcode 4.2.1 on Mac OS X<h1>Xcode install assistant</h1> <p>To install Xcode on Mac OS X, download a Xcode package from <a href="https://developer.apple.com/xcode/">Apple developer</a> site.</p> <p><a href="http://lh4.ggpht.com/-lzuTHhlonv4/T4uVpA_UUiI/AAAAAAAAA_I/rfYyIUBa5l0/s1600-h/Screen-Shot-2012-04-14-at-9.36.26-AM.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Screen Shot 2012-04-14 at 9.36.26 AM" border="0" alt="Screen Shot 2012-04-14 at 9.36.26 AM" src="http://lh3.ggpht.com/-x5JTJuqDOOY/T4uVqB53h1I/AAAAAAAAA_Q/ThN1qnyhqM8/Screen-Shot-2012-04-14-at-9.36.26-AM%25255B1%25255D.png?imgmax=800" width="518" height="234"></a></p> <p>Open the package InstallXCodeLion.pkg and follow the instruction to start the installation:</p> <p><a href="http://lh4.ggpht.com/-zn3CupcaXwc/T4uVr9nlJ3I/AAAAAAAAA_Y/l6IaWg-Z7tk/s1600-h/Screen-Shot-2012-04-14-at-9.37.01-AM%25255B1%25255D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Screen Shot 2012-04-14 at 9.37.01 AM" border="0" alt="Screen Shot 2012-04-14 at 9.37.01 AM" src="http://lh6.ggpht.com/-ey2gpM023Wc/T4uVueoJVFI/AAAAAAAAA_g/KsRgmnk3DnM/Screen-Shot-2012-04-14-at-9.37.01-AM%25255B2%25255D.png?imgmax=800" width="639" height="457"></a></p> <h1>Unmount Xcode installer package</h1> <p>The Xcode install assistant is an installer that copy Xcode installer files into hard drive and prepare an environment for Xcode installer. The Xcode hasn’t install yet. Continue the steps to perform actual Xcode install.</p> <p>The mounted Xcode package installer is not necessary anymore. You may eject the mounted package:</p> <p><a href="http://lh4.ggpht.com/-KSGlqFApLPA/T4uVwRQXKsI/AAAAAAAAA_o/XP7AqtEMuZM/s1600-h/Screen-Shot-2012-04-14-at-9.43.06-AM.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Screen Shot 2012-04-14 at 9.43.06 AM" border="0" alt="Screen Shot 2012-04-14 at 9.43.06 AM" src="http://lh3.ggpht.com/-11cskuazIqk/T4uVx5jw9xI/AAAAAAAAA_w/101mJK5-avM/Screen-Shot-2012-04-14-at-9.43.06-AM%25255B2%25255D.png?imgmax=800" width="787" height="457"></a></p> <h1>Install Xcode</h1> <p>To continue Xcode installation, locate <u>Install Xcode</u> icon in Applications folder:</p> <p><a href="http://lh3.ggpht.com/-iqrRDccjMuA/T4uV0C4_cgI/AAAAAAAAA_4/308IurrHWt8/s1600-h/Screen-Shot-2012-04-14-at-9.45.27-AM%25255B1%25255D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Screen Shot 2012-04-14 at 9.45.27 AM" border="0" alt="Screen Shot 2012-04-14 at 9.45.27 AM" src="http://lh5.ggpht.com/-Jzsf8rsm1LA/T4uV3ZXQcyI/AAAAAAAABAA/mqx6xdC8Jvw/Screen-Shot-2012-04-14-at-9.45.27-AM.png?imgmax=800" width="784" height="459"></a></p> <p>Follow the instructions to finish the installation:</p> <p><a href="http://lh4.ggpht.com/-thCPlpWr0GM/T4uV6FOAH7I/AAAAAAAABAI/mRpMLCdy_kw/s1600-h/Screen%252520Shot%2525202012-04-14%252520at%2525209.45.39%252520AM%25255B3%25255D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Screen Shot 2012-04-14 at 9.45.39 AM" border="0" alt="Screen Shot 2012-04-14 at 9.45.39 AM" src="http://lh3.ggpht.com/-pTQM5N1xP1Y/T4uV8TM-EvI/AAAAAAAABAQ/pnn-dizr0KE/Screen%252520Shot%2525202012-04-14%252520at%2525209.45.39%252520AM_thumb%25255B1%25255D.png?imgmax=800" width="641" height="415"></a></p> <p>After finish installation, the Xcode application will appear on the Dock area:</p> <p><a href="http://lh6.ggpht.com/-N9p85MTGaQo/T4uV-UCZfMI/AAAAAAAABAY/sHiNTpZ6W4o/s1600-h/Screen%252520Shot%2525202012-04-14%252520at%2525209.57.48%252520AM%25255B3%25255D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Screen Shot 2012-04-14 at 9.57.48 AM" border="0" alt="Screen Shot 2012-04-14 at 9.57.48 AM" src="http://lh5.ggpht.com/-EET1DIhxVOI/T4uWB28SMQI/AAAAAAAABAg/AADea4B4aUo/Screen%252520Shot%2525202012-04-14%252520at%2525209.57.48%252520AM_thumb%25255B1%25255D.png?imgmax=800" width="1191" height="181"></a></p> <p>A new folder <strong><u>Developer</u></strong> should appear in your hard disk:</p> <p><a href="http://lh4.ggpht.com/-icZCosfwHAY/T4vCPX-fdFI/AAAAAAAABCI/IpGpvvI3V5Y/s1600-h/Screen%252520Shot%2525202012-04-14%252520at%25252010.12.11%252520AM%25255B7%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Screen Shot 2012-04-14 at 10.12.11 AM" border="0" alt="Screen Shot 2012-04-14 at 10.12.11 AM" src="http://lh6.ggpht.com/-u-fPUUsqOFs/T4vCQwbfcJI/AAAAAAAABCQ/MFmx87NLlkE/Screen%252520Shot%2525202012-04-14%252520at%25252010.12.11%252520AM_thumb%25255B2%25255D.png?imgmax=800" width="790" height="560"></a></p> <p>The Xcode is now finish install, you may now start using Xcode to develop application in Apple platform:</p> <p><a href="http://lh4.ggpht.com/-IZ8puLPHlGU/T4u2PtjWqWI/AAAAAAAABB4/svRG6iOK9LI/s1600-h/Screen%252520Shot%2525202012-04-16%252520at%2525202.00.26%252520PM%25255B3%25255D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Screen Shot 2012-04-16 at 2.00.26 PM" border="0" alt="Screen Shot 2012-04-16 at 2.00.26 PM" src="http://lh6.ggpht.com/-vZhZq0G0zEY/T4u2Y6NLA1I/AAAAAAAABCA/dBSYzOz_HsA/Screen%252520Shot%2525202012-04-16%252520at%2525202.00.26%252520PM_thumb%25255B1%25255D.png?imgmax=800" width="822" height="547"></a></p> Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com0tag:blogger.com,1999:blog-38385155.post-61301478919437330062012-04-16T13:57:00.001+08:002012-04-16T13:57:20.257+08:00Mac OS X on VMware: Update 10.7.1–10.7.3<h1></h1> <h1>Introduction</h1> <p>Install update via Mac OS X Software Update function may take some time to download the update package especially when the file size is over Gigabytes. It is a good practice to download update package and perform offline update in later stage. If anything happen during the update process, you may redo the update again if you have snapshot your Mac OS X machine instance.</p> <p>Some update involve some tricky steps to make sure the Mac OS X continue function on VMware machine.</p> <h1>Mac OS X Update: 10.7.1</h1> <p>Download <a href="http://support.apple.com/kb/DL1437">Mac OS X 10.7.1 update</a> from apple web site. Perform the update as usual:</p> <p><a href="http://lh4.ggpht.com/-8lCr3iL_ex4/T4u0nb3LWBI/AAAAAAAABBI/68FoD-bqYkE/s1600-h/Screen%252520Shot%2525202012-04-16%252520at%2525201.33.18%252520PM%25255B3%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="Screen Shot 2012-04-16 at 1.33.18 PM" border="0" alt="Screen Shot 2012-04-16 at 1.33.18 PM" src="http://lh5.ggpht.com/-Oam4nr1JAvY/T4u0osjfE1I/AAAAAAAABBQ/Y2kSBDI-zWc/Screen%252520Shot%2525202012-04-16%252520at%2525201.33.18%252520PM_thumb%25255B1%25255D.png?imgmax=800" width="325" height="397"></a></p> <h1>Mac OS X Update: 10.7.2</h1> <p>Mac OS X update 10.7.2 requires extra steps to works on VMware machine. Follow the steps to perform update:</p> <ol> <li>Download <a href="http://support.apple.com/kb/DL1459">Mac OX X 10.7.2 update</a> from apple web site.</li> <li>Start Terminal application in Mac OS X</li> <li>Run a command to backup folder AppleLSIFusionMPT.kext:<pre style="background: #f1f0f0; color: #000000"># cp <span style="color: #806030">-</span>r <span style="color: #806030">/</span>System<span style="color: #806030">/</span>Library<span style="color: #806030">/</span>Extensions<span style="color: #806030">/</span>AppleLSIFusionMPT<span style="color: #8c0000">.</span>kext <span style="color: #806030">.</span></pre></li>
<li>Apply Mac OS X Update 10.7.2</li>
<li>When update is done, the update installer offer to reboot machine. Don’t reboot first but execute the following two command to restore folder AppleLSIFusionMPT.kext:<br><pre style="background: #f1f0f0; color: #000000"># sudo rm <span style="color: #806030">-</span>rf <span style="color: #806030">/</span>System<span style="color: #806030">/</span>Library<span style="color: #806030">/</span>Extensions<span style="color: #806030">/</span>AppleLSIFusionMPT<span style="color: #8c0000">.</span>kext
# sudo cp <span style="color: #806030">-</span>r AppleLSIFusionMPT<span style="color: #8c0000">.</span>kext <span style="color: #806030">/</span>System<span style="color: #806030">/</span>Library<span style="color: #806030">/</span>Extensions</pre></li>
<li>Reboot machine and enjoy the Mac OS X 10.7.2 update.</li></ol>
<p><a href="http://lh6.ggpht.com/-r6mTnDI-cnw/T4u0p2brQNI/AAAAAAAABBY/736w2jq3PlE/s1600-h/Screen%252520Shot%2525202012-04-16%252520at%2525201.46.36%252520PM%25255B3%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="Screen Shot 2012-04-16 at 1.46.36 PM" border="0" alt="Screen Shot 2012-04-16 at 1.46.36 PM" src="http://lh4.ggpht.com/-j0NW-c2amuA/T4u0rL6sv9I/AAAAAAAABBg/waA_rVdKBBg/Screen%252520Shot%2525202012-04-16%252520at%2525201.46.36%252520PM_thumb%25255B1%25255D.png?imgmax=800" width="325" height="397"></a></p>
<h1>Mac OS X Update: 10.7.3</h1>
<p>Mac OS X update 10.7.3 share same update steps as 10.7.2. However, the update from 10.7 to 10.7.3 must perform in the following sequence one at a time:</p>
<ol>
<li>10.7.1</li>
<li>10.7.2</li>
<li>10.7.3</li></ol>
<p>You can’t apply 10.7.3 on 10.7 directly. Follow the steps to perform 10.7.3 update from 10.7.2:</p>
<ol>
<li>Download <a href="http://support.apple.com/kb/DL1484">Mac OX X 10.7.3 update</a> from apple web site.</li>
<li>Start Terminal application in Mac OS X</li>
<li>Run a command to backup folder AppleLSIFusionMPT.kext:<pre style="background: #f1f0f0; color: #000000"># cp <span style="color: #806030">-</span>r <span style="color: #806030">/</span>System<span style="color: #806030">/</span>Library<span style="color: #806030">/</span>Extensions<span style="color: #806030">/</span>AppleLSIFusionMPT<span style="color: #8c0000">.</span>kext <span style="color: #806030">.</span></pre></li>
<li>Apply Mac OS X Update 10.7.3</li>
<li>When update is done, the update installer offer to reboot machine. Don’t reboot first but execute the following two command to restore folder AppleLSIFusionMPT.kext:<br><pre style="background: #f1f0f0; color: #000000"># sudo rm <span style="color: #806030">-</span>rf <span style="color: #806030">/</span>System<span style="color: #806030">/</span>Library<span style="color: #806030">/</span>Extensions<span style="color: #806030">/</span>AppleLSIFusionMPT<span style="color: #8c0000">.</span>kext
# sudo cp <span style="color: #806030">-</span>r AppleLSIFusionMPT<span style="color: #8c0000">.</span>kext <span style="color: #806030">/</span>System<span style="color: #806030">/</span>Library<span style="color: #806030">/</span>Extensions</pre></li>
<li>Reboot machine and enjoy the Mac OS X 10.7.3 update.</li></ol>
<p><a href="http://lh4.ggpht.com/-Q38yJttqf18/T4u0ubvDNxI/AAAAAAAABBo/zC8bh4i8zXI/s1600-h/Screen%252520Shot%2525202012-04-16%252520at%2525201.53.47%252520PM%25255B3%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="Screen Shot 2012-04-16 at 1.53.47 PM" border="0" alt="Screen Shot 2012-04-16 at 1.53.47 PM" src="http://lh4.ggpht.com/-ZfcDZwTJqWY/T4u0vSj_NgI/AAAAAAAABBw/X-n79bvHbwA/Screen%252520Shot%2525202012-04-16%252520at%2525201.53.47%252520PM_thumb%25255B1%25255D.png?imgmax=800" width="325" height="369"></a><!--EndFragment--></p>
<h1>Reference</h1>
<ol>
<li>How To Install Fully Functional Mac OS X Lion Virtual Machine inside Windows 7 [UPDATE: 10.7.3]. URL:<a href="http://www.windows7hacker.com/index.php/2011/09/how-to-install-fully-functional-mac-os-x-lion-virtual-machine-inside-windows-7/">http://www.windows7hacker.com/index.php/2011/09/how-to-install-fully-functional-mac-os-x-lion-virtual-machine-inside-windows-7/</a></li></ol> Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com8tag:blogger.com,1999:blog-38385155.post-63652926706564335942012-04-16T13:12:00.000+08:002012-04-16T13:12:39.181+08:00Running Mac OS X on VMware Workstation in Windows Platform<h1>
Introduction</h1>
This simple guide is for those who want to try out Apple’s Macintosh OS X on VMware Workstation in Windows platform. The basic requirements are:<br />
<ol>
<li>A PC running Windows x86 or x64 </li>
<li>VMware Workstation 8 </li>
<li>Download the following files: <ol>
<li><a href="http://www.mediafire.com/?r1qata1nccpkb3h">Mac OS X Lion VMware Files.exe</a> (Size: 2.42MB) </li>
<li><a href="http://www.kat.ph/mac-os-x-lion-retail-bootable-vmdk-for-vmware-t5685072.html">Mac OS X Lion Retail Bootable .vmdk (For VMware)</a> (A bit torrent of size 4.12GB)</li>
</ol>
</li>
</ol>
<h1>
Patch VMware Workstation 8 with VMware Workstation 8.0 Darwin Unlocker Windows</h1>
Before running Mac OS X on VMware workstation, a patch should apply to some binary files of VMware workstation.<br />
For illustration purpose, the following example will attempt to patch VMware Workstation 8 binary files:<br />
<ol>
<li>First, extract the download file <u><strong>Mac OS X Lion VMware files.exe</strong></u>.using any file archive utility like <a href="http://www.7-zip.org/">7-Zip</a> or double click the .exe to extract the files. </li>
<li>Open command prompt (cmd) in Administrator Account. </li>
<li>Navigate to extracted folder “VMware Workstation Unlocker - Windows" and run install.cmd:</li>
</ol>
<pre style="background: #f1f0f0; color: black;">M<span style="color: #806030;">:</span><span style="color: #806030;">\</span><span style="color: #806030;">></span>cd <span style="color: maroon;">"</span><span style="color: #e60000;">VMware Workstation Unlocker - Windows</span><span style="color: maroon;">"</span>
M<span style="color: #806030;">:</span><span style="color: #806030;">\</span>VMware Workstation Unlocker <span style="color: #806030;">-</span> Windows<span style="color: #806030;">></span>install<span style="color: #8c0000;">.</span>cmd
VMware Unlocker <span style="color: #8c0000;">1.0</span><span style="color: #8c0000;">.0</span>
<span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span>
<span style="color: #806030;">(</span>c<span style="color: #806030;">)</span> Dave Parsons <span style="color: #8c0000;">2011</span>
Stopping VMware services<span style="color: #806030;">.</span><span style="color: #806030;">.</span><span style="color: #806030;">.</span>
The VMware Workstation Server service is stopping<span style="color: #806030;">.</span>
The VMware Workstation Server service was stopped successfully<span style="color: #806030;">.</span>
The VMware Authorization Service service was stopped successfully<span style="color: #806030;">.</span>
Creating backup folders<span style="color: #806030;">.</span><span style="color: #806030;">…</span><span style="color: #806030;">
</span>...
Starting VMware services<span style="color: #806030;">.</span><span style="color: #806030;">.</span><span style="color: #806030;">.</span>
The VMware Authorization Service service is starting<span style="color: #806030;">.</span>
The VMware Authorization Service service was started successfully<span style="color: #806030;">.</span>
The VMware Workstation Server service is starting<span style="color: #806030;">.</span>
The VMware Workstation Server service was started successfully<span style="color: #806030;">.</span>
M<span style="color: #806030;">:</span><span style="color: #806030;">\</span>VMware Workstation Unlocker <span style="color: #806030;">-</span> Windows<span style="color: #806030;">></span></pre>
The VMware workstation 8 is now patched. You may continue the next step to configure and run Mac OS X Lion on VMware workstation 8. <br />
<h1>
Install Mac OS X Lion on VMware Workstation</h1>
<h2>
Prepare a Mac OS X machine</h2>
Extract pre-configure Mac OS X Lion VMware workstation files from <strong><u>Mac OS X Lion VMware Files.exe</u></strong> in a new folder:<br />
<a href="http://lh5.ggpht.com/-Dt461dzkuDE/T4uj2UokbLI/AAAAAAAABAo/YQb-wzIBS60/s1600-h/1%25255B7%25255D.png"><img alt="1" border="0" height="177" src="http://lh3.ggpht.com/-D7m_QDUdYS8/T4uj3WMS0xI/AAAAAAAABAw/uQd4CCtb9Tk/1_thumb%25255B3%25255D.png?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="1" width="643" /></a><br />
Start the virtual machine <strong><u>Mac OS X Lion.vmx</u></strong>. A dialog prompt for the virtual machine instance state: <br />
<a href="http://lh5.ggpht.com/-xpgRzq1FdEY/T4uj4ZcAo4I/AAAAAAAABA4/pN60D1lFdcM/s1600-h/2%25255B3%25255D.png"><img alt="2" border="0" height="219" src="http://lh3.ggpht.com/-Rk9TNMHjH9U/T4uj5oNVALI/AAAAAAAABBA/RG4mCu_IRkQ/2_thumb%25255B1%25255D.png?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="2" width="432" /></a><br />
Press “<strong>I copied it</strong>” button to state the virtual machine is a cloned instance.<br />
<h2>
Prepare Mac OS X Installation</h2>
The machine setting may change to suit the environment. e.g.: Memory size.<br />
Next, add Mac OS X Lion Installer disk (<strong><u>Mac OS X Lion Installer.vmdk</u></strong>) by creating a new VMware hard disk.<br />
<a href="http://lh5.ggpht.com/-Eo4vwzsRcso/T4f3UpCzbnI/AAAAAAAAA-Y/6HpRPjWErgE/s1600-h/2%25255B4%25255D.png"><img alt="2" border="0" height="718" src="http://lh6.ggpht.com/-X0Y5AzzJNow/T4f3XH_2EXI/AAAAAAAAA-g/DMUXqkQEIw8/2_thumb%25255B2%25255D.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="2" width="785" /></a><br />
<h2>
Start Mac OS X Machine</h2>
Power on the virtual machine. A Mac OS X installation screen should appear as follow:<br />
<img alt="5" border="0" height="772" src="http://lh3.ggpht.com/-B11TfH3OE3s/T4f1nUBa6VI/AAAAAAAAA8Q/_IMWF6W_9MA/5_thumb%25255B2%25255D.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="5" width="1028" /><br />
<h2>
Prepare a disk for Mac OS X installation</h2>
Next, start Disk Utility to prepare a disk for Mac OS X installation:<br />
<a href="http://lh6.ggpht.com/-9bkWstskcgU/T4f1VI5qGII/AAAAAAAAA74/WpyDBlUWDHs/s1600-h/4%25255B4%25255D.png"><img alt="4" border="0" height="772" src="http://lh3.ggpht.com/-MwKPDueIhSM/T4f1bYdiESI/AAAAAAAAA8A/qR0i3VR_XII/4_thumb%25255B2%25255D.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="4" width="1028" /></a><br />
<a href="http://lh4.ggpht.com/-OJWMhujZBg4/T4f1hCx0l-I/AAAAAAAAA8I/IvW7WO0-OaA/s1600-h/5%25255B4%25255D.png">Create</a> a new Mac OS X partition by using the Erase option. A label for the new disk may specify in the option:<br />
<a href="http://lh6.ggpht.com/-hdzqoAFj75M/T4f1tcqBPEI/AAAAAAAAA8Y/tbFCPFp6YRk/s1600-h/6%25255B4%25255D.png"><img alt="6" border="0" height="772" src="http://lh4.ggpht.com/-K53Eo1oLhG0/T4f1zd8zSMI/AAAAAAAAA8g/O1vSZsVfisY/6_thumb%25255B2%25255D.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="6" width="1028" /></a><br />
Confirm the Erase operation:<br />
<a href="http://lh6.ggpht.com/-ystmaqvnWGU/T4f14qjMZoI/AAAAAAAAA8o/uFFU8hgmMdg/s1600-h/7%25255B4%25255D.png"><img alt="7" border="0" height="772" src="http://lh5.ggpht.com/-zFD0NnurE00/T4f1-uRzlBI/AAAAAAAAA8w/Rq5ezcEwPX8/7_thumb%25255B2%25255D.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="7" width="1028" /></a><br />
<h2>
Start Mac OS X Installation</h2>
Follow the screen instruction to continue Mac OS X installation:<br />
<h2>
<img alt="9" border="0" height="772" src="http://lh4.ggpht.com/-34R5J7E7Yts/T4f2Xd6j-CI/AAAAAAAAA9Q/vIYkwlVm-m4/9_thumb%25255B2%25255D.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="9" width="1028" /></h2>
Confirm the installation on the new disk created:<br />
<h2>
<a href="http://lh4.ggpht.com/-gdZWGM8ak-s/T4f2cfNXUDI/AAAAAAAAA9Y/k6Rg1wRIcTc/s1600-h/10%25255B4%25255D.png"><img alt="10" border="0" height="772" src="http://lh6.ggpht.com/-lb4w2nDyD6E/T4f2ibVdHaI/AAAAAAAAA9g/LF1M5BWHrMg/10_thumb%25255B2%25255D.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="10" width="1028" /></a></h2>
<a href="http://lh3.ggpht.com/-HtzBiZsJqAw/T4f2oP6f1sI/AAAAAAAAA9o/p0snHaSN0QY/s1600-h/11%25255B4%25255D.png"><span style="color: #cc3300;">The</span></a> installation may take a while to finish:<br />
<img alt="11" border="0" height="772" src="http://lh5.ggpht.com/-4o-D6fW4nOk/T4f2tkF_-mI/AAAAAAAAA9w/tifhw8F34I4/11_thumb%25255B2%25255D.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="11" width="1028" /><br />
<h2>
Finish Mac OS X Installation</h2>
Finally, the Mac OS X installed and the first screen appear as follow:<br />
<h2>
<img alt="12" border="0" height="772" src="http://lh4.ggpht.com/-TPKUHkddQBo/T4f3MXm3o9I/AAAAAAAAA-A/ZzfFkobH_18/12_thumb%25255B2%25255D.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="12" width="1028" /></h2>
<h1>
Install VMware tools</h1>
VMware tools provide few GUI enhancement experience for Mac OS X guest. Download VMware tools ISO for OS X <a href="http://www.mediafire.com/?a42mf9t1z2sz266">here</a>. Follow the following steps to install VMware tools in OS X:<br />
<ol>
<li>Extract a ISO file (darwin.iso) from the zip archive file
</li>
<li>Mount the ISO file to Mac OS X Guest operating system<br /><br /><a href="http://lh4.ggpht.com/-HCC9Ol4T-S4/T4f3b9fJ7hI/AAAAAAAAA-o/7KP_-vN94VM/s1600-h/2%25255B8%25255D.png"><img alt="2" border="0" height="718" src="http://lh5.ggpht.com/-MwY_5QUZ4js/T4f3eKnhWnI/AAAAAAAAA-w/5fTCuk_llow/2_thumb%25255B4%25255D.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="2" width="785" /></a>
</li>
<li>Start Mac OS X guest system.
</li>
<li>Open Finder from OS X desktop and select CD/DVD ROM device.<br /><br /><a href="http://lh5.ggpht.com/-dXTOeiHvgf8/T4f3iDLp7HI/AAAAAAAAA-4/QnVzgAIZ69E/s1600-h/1%25255B16%25255D.png"><img alt="1" border="0" height="534" src="http://lh5.ggpht.com/-0q71KE05aoM/T4f3lptrp_I/AAAAAAAAA_A/v3wTXrc7BHM/1_thumb%25255B7%25255D.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="1" width="777" /></a>
</li>
<li>Double click Install VMware Tools icon to start VMware tools installation
</li>
<li>Follow the screen instruction to complete installation.</li>
</ol>
<h1>
Reference</h1>
<ol>
<li>
How To Install Fully Functional Mac OS X Lion Virtual Machine inside Windows 7 [UPDATE: 10.7.3]. URL: <a href="http://www.windows7hacker.com/index.php/2011/09/how-to-install-fully-functional-mac-os-x-lion-virtual-machine-inside-windows-7/">http://www.windows7hacker.com/index.php/2011/09/how-to-install-fully-functional-mac-os-x-lion-virtual-machine-inside-windows-7/</a></li>
</ol>Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com10tag:blogger.com,1999:blog-38385155.post-48204793394952127772012-03-08T12:57:00.000+08:002012-03-08T17:50:10.234+08:00LDAP: Introduction to OpenLDAP<p>OpenLDAP is an open-source suite of LDAP (Lightweight Directory Access Protocol) application and development tools. It is a key tool to realize single sign on operation in network environment.</p> <h1>Installation</h1> <p>These packages are required for OpenLDAP to function properly:</p> <ol> <li>yum install openldap-servers <li>yum install openldap-clients</li></ol> <h1>Start OpenLDAP service</h1> <p>The init script file for OpenLDAP is slapd.</p><pre style="background: #f1f0f0; color: #000000"># <font style="background-color: #ffff00">service slapd start
</font>Starting slapd (via systemctl): [ OK ]
</pre>
<p>Check status of OpenLDAP service:</p><pre style="background: #f1f0f0; color: #000000"># <font style="background-color: #ffff00">service slapd status
</font>slapd.service - LSB: starts and stopd OpenLDAP server daemon
Loaded: loaded (/etc/rc.d/<span style="color: #400000; font-weight: bold">init</span>.d/slapd)
Active: active (running) since Thu<span style="color: #806030">,</span> 08 Mar 2012 13:42:27 +0800; 1min 0s ago
<span style="color: #400000; font-weight: bold">Process</span>: 1669 ExecStop<span style="color: #806030">=</span>/etc/rc.d/init.d/slapd stop (code=exited<span style="color: #806030">,</span> status=<span style="color: #8c0000">0</span>/SUCCESS)
<span style="color: #400000; font-weight: bold">Process</span>: 1692 ExecStart<span style="color: #806030">=</span>/etc/rc.d/init.d/slapd start (code=exited<span style="color: #806030">,</span> status=<span style="color: #8c0000">0</span>/SUCCESS)
Main PID: 1722 (slapd)
CGroup: <span style="color: #400000; font-weight: bold">name</span><span style="color: #806030">=</span>systemd:/system/slapd.service
â 1722 /usr/sbin/slapd -h ldap:/// ldapi:/// -u ldap</pre>
<h1>Configuration - cn=config</h1>
<p>OpenLDAP use statically configured slapd.conf prior to version 2.3. A new run-time configuration and zero down-time configuration, cn=config introduced since version 2.3. A most notable cn=config is the configuration parameters may entered via ldapmodify or LDIF files. The changes has immediate effect without restart slapd service.</p>
<h1>Configuration - Add cn=config admin password</h1>
<p>The cn=config in a fresh OpenLDAP installation doesn’t has admin password. Administrator may not change OpenLDAP configuration parameters without admin password. The first task after a fresh OpenLDAP installation is add cn=config admin password.</p>
<p>Generate slapd SSHA password:</p><pre style="background: #f1f0f0; color: #000000"># <font style="background-color: #ffff00">slappasswd -h {SSHA}
</font>New password:
<span style="color: #400000; font-weight: bold">Re</span>-enter new password:
<font style="background-color: #ffff00"><strong>{SSHA}m8MhPiaG0TWmP/Ro2VcRopBqTbTm1UX1</strong>
</font></pre>
<p>We will use the new generated password “<font style="background-color: #ffff00"><strong>{SSHA}m8MhPiaG0TWmP/Ro2VcRopBqTbTm1UX1</strong> </font>” in next step.</p>
<p>Next, determine the DN (Distinguished Name) for the database that contains the RootDN password. The RootPW (root password) may not present in fresh installation:</p><pre style="background: #f1f0f0; color: #000000"># <font style="background-color: #ffff00">ldapsearch <span style="color: #e60000">-LLL -</span>Y <span style="color: #400000; font-weight: bold">EXTERNAL</span> -H ldapi:/// -b olcDatabase<span style="color: #806030">=</span>{<span style="color: #8c0000">0</span>}config<span style="color: #806030">,</span>cn=config dn olcRootDN olcRootPW</font>
SASL/<span style="color: #400000; font-weight: bold">EXTERNAL</span> authentication started
SASL username: gidNumber<span style="color: #806030">=</span><span style="color: #8c0000">0</span>+uidNumber=<span style="color: #8c0000">0</span><span style="color: #806030">,</span>cn=peercred<span style="color: #806030">,</span>cn=external<span style="color: #806030">,</span>cn=auth
SASL SSF: 0
dn: <font style="background-color: #ffff00">olcDatabase<span style="color: #806030">=</span>{<span style="color: #8c0000">0</span>}config<span style="color: #806030">,</span>cn=config
</font>olcRootDN: cn<span style="color: #806030">=</span>config
</pre>
<p>Next, add olcRootPW to <font style="background-color: #ffff00">olcDatabase<span style="color: #806030">=</span>{<span style="color: #8c0000">0</span>}config<span style="color: #806030">,</span>cn=config</font> using shell-accessible tool ldapmodify with LDIF text: </p><pre style="background: #f1f0f0; color: #000000"># <font style="background-color: #ffff00">ldapmodify <span style="color: #e60000">-Y EXTERNAL -</span>H ldapi:///</font>
SASL/<span style="color: #400000; font-weight: bold">EXTERNAL</span> authentication started
SASL username: gidNumber<span style="color: #806030">=</span><span style="color: #8c0000">0</span>+uidNumber=<span style="color: #8c0000">0</span><span style="color: #806030">,</span>cn=peercred<span style="color: #806030">,</span>cn=external<span style="color: #806030">,</span>cn=auth
SASL SSF: 0
<font style="background-color: #ffff00">dn: olcDatabase<span style="color: #806030">=</span>{<span style="color: #8c0000">0</span>}config<span style="color: #806030">,</span>cn=config
<span style="color: #400000; font-weight: bold">add</span>: olcRootPW
olcRootPW: {SSHA}m8MhPiaG0TWmP/Ro2VcRopBqTbTm1UX1
</font>
modifying entry <span style="color: #e60000">"olcDatabase={0}config,cn=config"</span>
</pre>
<p>In the above example, as soon as empty line received, the LDIF text will be processed immediately. Press Ctrl-D to end ldapmodify shell when done.</p>
<h1>GUI tools for LDAP directory</h1>
<p><a href="http://directory.apache.org/studio/">Apache Directory Studio</a> is a GUI LDAP browser and client to manage LDAP directory. It save lot of time and effort to use ldapmodify managing the directory entries.</p>
<p><a href="http://lh5.ggpht.com/-ospXSyjkBIc/T1iAFXZH8sI/AAAAAAAAA0o/yrTM4ztiy0Y/s1600-h/image3.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-DCCXw16b2eg/T1iAHUqis_I/AAAAAAAAA0w/awsV3b_Vmis/image_thumb1.png?imgmax=800" width="842" height="576"></a></p>
<h1>Manage cn=config using Apache Directory Studio</h1>
<p>Create LDAP connection in the studio:</p>
<p><a href="http://lh4.ggpht.com/-3u7_c4WNJME/T1iAIli5_hI/AAAAAAAAA04/ZzpRwK4AME0/s1600-h/image15.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-oOm0gkHp3GY/T1iAKEWWkxI/AAAAAAAAA1A/_3cyr7f4X5c/image_thumb7.png?imgmax=800" width="835" height="607"></a></p>
<p>Enter authentication information for the connection:</p>
<p><a href="http://lh6.ggpht.com/-ooq2keuGf7I/T1iAMfHE9QI/AAAAAAAAA1I/PYt1LFKw4rU/s1600-h/image19.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-8qqlsq8_jus/T1iANydwwWI/AAAAAAAAA1Q/Z32nhMju3N8/image_thumb9.png?imgmax=800" width="835" height="607"></a></p>
<p>Enter cn=config to BaseDN text box:</p>
<p><a href="http://lh4.ggpht.com/-dI2oy_CcCJE/T1iAP_qYXcI/AAAAAAAAA1U/FSk3Lymdwck/s1600-h/image23.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-8BtrvFHQyVA/T1iARaOqsbI/AAAAAAAAA1g/El9CBbZu9b4/image_thumb11.png?imgmax=800" width="835" height="607"></a></p>
<p>Commit the changes by pressing OK button. You may open the connection and start browsing the OpenLDAP configuration parameters.</p>
<h1>Configuration: olcDatabase</h1>
<p>You may start configure a new LDAP directory once OpenLDAP service is up and running. The olcSuffix parameter let you specify a unique identifier for the directory. olcRootDN specify the supervisor for the directory.</p>
<p>A olcRootPW may be added to secure the directory from anonymous changes.</p>
<p><a href="http://lh3.ggpht.com/-LzQ06FEQFzM/T1iAUfbVciI/AAAAAAAAA1o/CdQPAB1HXYs/s1600-h/image27.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-jO5r-6pXh9o/T1iAXDAph0I/AAAAAAAAA1w/YSP4-HHdWV0/image_thumb13.png?imgmax=800" width="916" height="445"></a></p>
<h1>Browse OpenLDAP directory as Manager</h1>
<p>Define a new OpenLDAP connection using RootDN to access a fresh LDAP directory:</p>
<p><a href="http://lh4.ggpht.com/-ZynrHDlxIXo/T1iAYs2J97I/AAAAAAAAA14/_5O9phWUQ4M/s1600-h/image31.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-n_ukrOtchk8/T1iAbL1VKqI/AAAAAAAAA2A/sV1lu_y_PGI/image_thumb15.png?imgmax=800" width="835" height="607"></a></p>
<p>Connect to the LDAP directory shows an empty directory:</p>
<p><a href="http://lh4.ggpht.com/-kQWKcYf7gpE/T1iAdMyLMrI/AAAAAAAAA2I/x_voyfwRxX8/s1600-h/image35.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-wvmgiZixtEY/T1iAfM8m-8I/AAAAAAAAA2Q/WVf1_uik7D0/image_thumb17.png?imgmax=800" width="840" height="455"></a></p>
<h1>Add an initial entry to LDAP directory</h1>
<p>Use “New Context Entry…” to create an initial entry to LDAP directory:</p>
<p><a href="http://lh3.ggpht.com/-N3ziVSm4Rhw/T1iAhJc-uJI/AAAAAAAAA2Y/vkD0n3pc6yg/s1600-h/image51.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-S0mVb3r_c2E/T1iAja1fxMI/AAAAAAAAA2g/8-YHVsoC9B0/image_thumb25.png?imgmax=800" width="723" height="700"></a></p>
<p>First, define a new object using dcObject and organizationUnit classes:</p>
<p><a href="http://lh6.ggpht.com/-fxI9SPOoVnc/T1iAkytuo_I/AAAAAAAAA2o/2DbdPFrfD6g/s1600-h/image39.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-5Xth6rsOHpE/T1iAmnvyTaI/AAAAAAAAA2w/yxcB9ifLaYQ/image_thumb19.png?imgmax=800" width="704" height="609"></a></p>
<p>Next, enter a DN for the object:</p>
<p><a href="http://lh5.ggpht.com/-kS9oOi_tnJ0/T1iAn9KNAzI/AAAAAAAAA24/Xdlwdd1ybz0/s1600-h/image43.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-J0jS_orqJ-U/T1iAp1rIkKI/AAAAAAAAA3A/zbMyqouPJUM/image_thumb21.png?imgmax=800" width="704" height="609"></a></p>
<p>Supply a ou value to identify the entry:<a href="http://lh6.ggpht.com/-knY9klv8YHI/T1iArWcYsoI/AAAAAAAAA3I/Pf_jX2SDYgg/s1600-h/image47.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-5uwKqAmKk2g/T1iAsuZTMzI/AAAAAAAAA3Q/SEgDkcp1_6I/image_thumb23.png?imgmax=800" width="704" height="609"></a></p>
<p>The following diagram shows the newly created object:</p>
<p><a href="http://lh5.ggpht.com/-0yrijDA1ODk/T1iAuGt8I7I/AAAAAAAAA3Y/Yhkmy6UpVCA/s1600-h/image55.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-nGBkmDZIlEQ/T1iAvwMVaMI/AAAAAAAAA3g/z0ii1LzQEBM/image_thumb27.png?imgmax=800" width="843" height="471"></a></p>
<h1>Flooding the LDAP directory</h1>
<p>You may start enter the LDAP objects to the directory:</p>
<p><a href="http://lh5.ggpht.com/-qBExHm39jTU/T1iAxQM_uBI/AAAAAAAAA3o/fTOaSFblXj8/s1600-h/image%25255B4%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-CjaHK6_Wm7Q/T1iAz0Cm74I/AAAAAAAAA3w/degy_mq8zKU/image_thumb%25255B1%25255D.png?imgmax=800" width="817" height="471"></a></p>
<h1>Reference</h1>
<ol>
<li>OpenLDAP. URL: <a href="http://www.saruman.biz/wiki/index.php/OpenLDAP">http://www.saruman.biz/wiki/index.php/OpenLDAP</a> </li></ol> Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com2tag:blogger.com,1999:blog-38385155.post-19579555301436855242011-12-02T13:55:00.001+08:002011-12-02T13:55:10.729+08:00iPXE: Boot iPXE Linux kernel via PXELinux<p>iPXE Linux kernel (ipxe.lkrn) may chain loaded by PXELinux:</p><pre style="background: #f1f0f0; color: #000000">default boot
label boot
kernel ipxe<span style="color: #8c0000">.</span>lkrn</pre>
<p>Both iPXE firmware (undionly.kpxe) or iPXE kernel image (ipxe.lkrn) has same functions. All usage of iPXE commands / scripts remain the same for both firmware and kernel.</p>
<h1>Problem with Dell Vostro notebook</h1>
<p>All the time I use PC with iPXE firmware (undionly.kpxe) with WinPE and SanBoot without problem. If I boot Dell Vostro notebook with the same booting steps as PC, the WinPE or SanBoot doesn’t work at all. The reason remain unknown. Here are my booting steps:</p>
<h2>Scenario A</h2>
<ol>
<li>Switch on machine</li>
<li>DHCP –> undionly.kpxe (undionly.0)</li>
<li>Chain to load WinPE image</li>
<li>Show blank screen after WinPE image</li></ol>
<h2>Scenario B</h2>
<ol>
<li>Switch on machine</li>
<li>DHCP –> undionly.kpxe (undionly.0)</li>
<li>sanboot iSCSI target</li>
<li>Machine hang while booting</li></ol>
<p>Both scenario A and B works fine on PC but doesn’t work on Dell Vostro notebook.</p>
<p>I suspect the problem is related to:</p>
<ol>
<li>iPXE firmware </li>
<li>Notebook network card’s firmware doesn’t work well with iPXE firmware.</li></ol>
<h1>Dell Vostro notebook work with iPXE kernel</h1>
<p>While trying to find solution solving the mystery problem with Dell Vostro notebook, I found that iPXE kernel works. I may load WinPE image or SanBoot a Windows ISCSI target with iPXE kernel chain loaded by PXELinux.</p>
<ol>
<li>Prepare ipxe.lkrn<br><pre style="background: #f1f0f0; color: #000000"><span style="color: #806030">-</span>bash<span style="color: #806030">-</span><span style="color: #8c0000">4.1</span>$ git clone git://git.ipxe.org/ipxe.git<br><span style="color: #806030">-</span>bash<span style="color: #806030">-</span><span style="color: #8c0000">4.1</span>$ cd ipxe<span style="color: #806030"><br>-</span>bash<span style="color: #806030">-</span><span style="color: #8c0000">4.1</span>$ <font style="background-color: #ffff00">make src/bin<span style="color: #806030">/</span>ipxe<span style="color: #8c0000">.</span>lkrn</font></pre></li>
<li>Copy src/bin/ipxe.lkrn to TFTP boot directory.<br><pre style="background: #f1f0f0; color: #000000"># <font style="background-color: #ffff00">cp src<span style="color: #806030">/</span>bin<span style="color: #806030">/</span>ipxe<span style="color: #8c0000">.</span>lkrn <span style="color: #806030">/</span>var<span style="color: #806030">/</span>lib<span style="color: #806030">/</span>tftpboot</font></pre></li>
<li>Update dhcp configuration file: /etc/dhcp/dhcpd.conf to prevent infinite iPXE boot when ipxe.lkrn boot:<br><pre style="background: #f1f0f0; color: #000000"> if exists user<span style="color: #806030">-</span>class and option user<span style="color: #806030">-</span>class <span style="color: #806030">=</span> <span style="color: #800000">"</span><span style="color: #e60000">iPXE</span><span style="color: #800000">"</span> <span style="color: #806030">{</span>
filename <span style="color: #800000">"</span><span style="color: #e60000"><a href="http://<ip-address>/boot.ipxe";">http://<ip-address>/boot.ipxe</span><span style="color: #800000">"</span><span style="color: #806030">;</span>
</a> <span style="color: #806030">}</span> else <span style="color: #806030">{</span>
filename <span style="color: #800000">"</span><span style="color: #e60000">pxelinux.0</span><span style="color: #800000">"</span><span style="color: #806030">;</span>
<span style="color: #806030">}</span></pre></li>
<li>Load ipxe.lkrn after PXELinux boot:<br><pre style="background: #f1f0f0; color: #000000"># cat pxelinux<span style="color: #8c0000">.</span>cfg<span style="color: #806030">/<font color="#000000">default</font></span>
default boot
label boot
kernel <font style="background-color: #ffff00">ipxe<span style="color: #8c0000">.</span>lkrn</font></pre></li>
<li>iPXE kernel will query DHCP server again, DHCP will send boot.ipxe script file via HTTP to the machine:<br><pre style="background: #f1f0f0; color: #000000">#<span style="color: #806030">!</span>ipxe
set <span style="color: #8c0000">209</span><span style="color: #806030">:</span>string <font style="background-color: #ffff00">pxelinux<span style="color: #8c0000">.</span>cfg<span style="color: #806030">/<font color="#000000">boot</font></span></font>
set <span style="color: #8c0000">210</span><span style="color: #806030">:</span>string <span style="color: #5555dd"><a href="http://<ip-address>/chain">http://<ip-address>/</span>
chain</a> $<span style="color: #806030">{</span><span style="color: #8c0000">210</span><span style="color: #806030">:</span>string<span style="color: #806030">}</span>pxelinux<span style="color: #8c0000">.0</span></pre></li>
<li>boot.ipxe will chain load pxelinux.0 with new configuration file: pxelinux.cfg/boot:<br><pre style="background: #f1f0f0; color: #000000"># cat <font style="background-color: #ffff00">pxelinux<span style="color: #8c0000">.</span>cfg<span style="color: #806030">/</span>boot</font>
default menu<span style="color: #8c0000">.</span>c32
prompt <span style="color: #8c0000">0</span>
LABEL boot<span style="color: #806030">_</span>local
menu label <span style="color: #806030">^</span>Boot Local System
menu default
localboot <span style="color: #8c0000">0</span>
timeout <span style="color: #8c0000">50</span>
LABEL boot<span style="color: #806030">_</span>san
menu label Boot <span style="color: #806030">^</span>Storage Area Network
com32 syslinux<span style="color: #806030">/</span>gpxecmd<span style="color: #8c0000">.</span>c32
append <font style="background-color: #ffff00">sanboot <span style="color: #5555dd"><font color="#cc3300">iscsi:<iscsi-host>::::iqn.example.com:win7</font><a href="http://<ip-address>/sanboot.ipxeLABEL"></span></font>
LABEL</a> WINDOWS<span style="color: #806030">_</span>PE
menu label <span style="color: #806030">^</span>Windows Preinstallation Exnvironment
kernel <font style="background-color: #ffff00">windows<span style="color: #8c0000">.</span>pe<span style="color: #806030">/</span>pxeboot<span style="color: #8c0000">.0</span></font></pre></li>
<li>Both SanBoot and Window PE image works with Dell Vostro notebook now.</li></ol> Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com0tag:blogger.com,1999:blog-38385155.post-45978050760759425222011-12-02T12:16:00.001+08:002012-05-26T10:42:26.617+08:00WAIK: Add Microsoft iSCSI service to WinPE<p>Microsoft iSCSI service allow user to connect to iSCSI target on SAN device. The default WINPE image doesn’t support iSCSI service. This topic shows how to add iSCSI service to WinPE image. Once added, you may connect to iSCSI target after boot into WinPE environment.</p> <h1>Add iSCSI service files to WinPE image</h1> <ol> <li>Start WAIK deployment Tools command prompt in privilege mode <li>Mount an WinPE image file in RW mode:<br><pre style="background: #f1f0f0; color: #000000"><font style="background-color: #ffff00">imagex <span style="color: #806030">/</span>mountrw winpe<span style="color: #8c0000">.</span>wim 1 mount</font></pre>
<li>Copy the following files into mounted winpe’s “<mount>\windows\system32” folder:<br><pre style="background: #f1f0f0; color: #000000">Windows<span style="color: #806030">\</span>System32<span style="color: #806030">\</span>iscsicli<span style="color: #8c0000">.</span>exe
Windows<span style="color: #806030">\</span>System32<span style="color: #806030">\</span>iscsicpl<span style="color: #8c0000">.</span>exe
Windows<span style="color: #806030">\</span>System32<span style="color: #806030">\</span>iscsicpl<span style="color: #8c0000">.</span>dll
Windows<span style="color: #806030">\</span>System32<span style="color: #806030">\</span>iscsidsc<span style="color: #8c0000">.</span>dll
Windows<span style="color: #806030">\</span>System32<span style="color: #806030">\</span>iscsied<span style="color: #8c0000">.</span>dll
Windows<span style="color: #806030">\</span>System32<span style="color: #806030">\</span>iscsiexe<span style="color: #8c0000">.</span>dll
Windows<span style="color: #806030">\</span>System32<span style="color: #806030">\</span>iscsilog<span style="color: #8c0000">.</span>dll
Windows<span style="color: #806030">\</span>System32<span style="color: #806030">\</span>iscsium<span style="color: #8c0000">.</span>dll
Windows<span style="color: #806030">\</span>System32<span style="color: #806030">\</span>iscsiwmi<span style="color: #8c0000">.</span>dll
Windows<span style="color: #806030">\</span>System32<span style="color: #806030">\</span>Drivers<span style="color: #806030">\</span>msiscsi<span style="color: #8c0000">.</span>sys
Windows<span style="color: #806030">\</span>System32<span style="color: #806030">\</span>en<span style="color: #806030">-</span>us<span style="color: #806030">\</span>iscsicli<span style="color: #8c0000">.</span>exe<span style="color: #8c0000">.</span>mui
Windows<span style="color: #806030">\</span>System32<span style="color: #806030">\</span>en<span style="color: #806030">-</span>us<span style="color: #806030">\</span>iscsicpl<span style="color: #8c0000">.</span>dll<span style="color: #8c0000">.</span>mui
Windows<span style="color: #806030">\</span>System32<span style="color: #806030">\</span>en<span style="color: #806030">-</span>us<span style="color: #806030">\</span>iscsicpl<span style="color: #8c0000">.</span>exe<span style="color: #8c0000">.</span>mui
Windows<span style="color: #806030">\</span>System32<span style="color: #806030">\</span>en<span style="color: #806030">-</span>us<span style="color: #806030">\</span>iscsidsc<span style="color: #8c0000">.</span>dll<span style="color: #8c0000">.</span>mui
Windows<span style="color: #806030">\</span>System32<span style="color: #806030">\</span>en<span style="color: #806030">-</span>us<span style="color: #806030">\</span>iscsiexe<span style="color: #8c0000">.</span>dll<span style="color: #8c0000">.</span>mui
Windows<span style="color: #806030">\</span>System32<span style="color: #806030">\</span>en<span style="color: #806030">-</span>us<span style="color: #806030">\</span>iscsilog<span style="color: #8c0000">.</span>dll<span style="color: #8c0000">.</span>mui</pre></li></ol>
<h1>Update WinPE registry hive</h1>
<ol>
<li>Start RegEdit.exe in privilege mode
<li>Select “HKEY_LOCAL_MACHINE”, and click File | Load Hive… to load hive file: <font style="background-color: #ffff00"><mount>\windows\system32\config\SYSTEM</font>. Use <font style="background-color: #ffff00">PE_Sys</font> as hive key name.
<li>Select “HKEY_LOCAL_MACHINE”, and click File | Load Hive… to load hive file: <font style="background-color: #ffff00"><mount>\windows\system32\config\SOFTWARE</font>. Use <font style="background-color: #ffff00">PE_Soft</font> as hive key name.
<li>The HKEY_LOCAL_MACHINE should have 2 hive loaded as follow:<br><a href="http://lh6.ggpht.com/-wEDJDFi-Vos/TthRFiGzChI/AAAAAAAAAzw/vOQkvExHX9I/s1600-h/Windows%2525207%252520x64%252520WAIK-2011-12-02-11-57-28%25255B3%25255D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Windows 7 x64 WAIK-2011-12-02-11-57-28" border="0" alt="Windows 7 x64 WAIK-2011-12-02-11-57-28" src="http://lh3.ggpht.com/-LioXrFwC-Fk/TthRGZ9RUzI/AAAAAAAAAz0/A1hyz1FRH6s/Windows%2525207%252520x64%252520WAIK-2011-12-02-11-57-28_thumb%25255B1%25255D.png?imgmax=800" width="340" height="350"></a>
<li>Create a iscsi.reg file with the following content:<br><pre style="background: #f1f0f0; color: #000000">Windows Registry Editor Version <span style="color: #8c0000">5.00</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Soft<span style="color: #806030">\</span>Microsoft<span style="color: #806030">\</span>Windows NT<span style="color: #806030">\</span>CurrentVersion<span style="color: #806030">\</span>Svchost<span style="color: #806030">]</span>
<span style="color: #800000">"</span><span style="color: #e60000">Godzilla</span><span style="color: #800000">"</span><span style="color: #806030">=</span>hex<span style="color: #806030">(</span><span style="color: #8c0000">7</span><span style="color: #806030">)</span><span style="color: #806030">:</span>4d<span style="color: #8c0000">,00</span><span style="color: #8c0000">,53</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,69</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,53</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,43</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,53</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,49</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Soft<span style="color: #806030">\</span>Microsoft<span style="color: #806030">\</span>Windows NT<span style="color: #806030">\</span>CurrentVersion<span style="color: #806030">\</span>iSCSI<span style="color: #806030">]</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Soft<span style="color: #806030">\</span>Microsoft<span style="color: #806030">\</span>Windows NT<span style="color: #806030">\</span>CurrentVersion<span style="color: #806030">\</span>iSCSI<span style="color: #806030">\</span>Discovery<span style="color: #806030">]</span>
<span style="color: #800000">"</span><span style="color: #e60000">AllowiSNSFirewallException</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000001</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Soft<span style="color: #806030">\</span>Microsoft<span style="color: #806030">\</span>Windows NT<span style="color: #806030">\</span>CurrentVersion<span style="color: #806030">\</span>iSCSI<span style="color: #806030">\</span>Discovery<span style="color: #806030">\</span>Authentication Cache<span style="color: #806030">]</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Soft<span style="color: #806030">\</span>Microsoft<span style="color: #806030">\</span>Windows NT<span style="color: #806030">\</span>CurrentVersion<span style="color: #806030">\</span>iSCSI<span style="color: #806030">\</span>Discovery<span style="color: #806030">\</span>Send Targets<span style="color: #806030">]</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Soft<span style="color: #806030">\</span>Microsoft<span style="color: #806030">\</span>Windows NT<span style="color: #806030">\</span>CurrentVersion<span style="color: #806030">\</span>iSCSI<span style="color: #806030">\</span>Discovery<span style="color: #806030">\</span>Static Targets<span style="color: #806030">]</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Soft<span style="color: #806030">\</span>Microsoft<span style="color: #806030">\</span>Windows NT<span style="color: #806030">\</span>CurrentVersion<span style="color: #806030">\</span>iSCSI<span style="color: #806030">\</span>Discovery<span style="color: #806030">\</span>Tunnel Address<span style="color: #806030">]</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Sys<span style="color: #806030">\</span>ControlSet001<span style="color: #806030">\</span>Enum<span style="color: #806030">\</span>Root<span style="color: #806030">\</span>LEGACY<span style="color: #806030">_</span>MSISCSI<span style="color: #806030">]</span>
<span style="color: #800000">"</span><span style="color: #e60000">NextInstance</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000001</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Sys<span style="color: #806030">\</span>ControlSet001<span style="color: #806030">\</span>Enum<span style="color: #806030">\</span>Root<span style="color: #806030">\</span>LEGACY<span style="color: #806030">_</span>MSISCSI<span style="color: #806030">\</span><span style="color: #8c0000">0000</span><span style="color: #806030">]</span>
<span style="color: #800000">"</span><span style="color: #e60000">Service</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">MSiSCSI</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">Legacy</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000001</span>
<span style="color: #800000">"</span><span style="color: #e60000">ConfigFlags</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000000</span>
<span style="color: #800000">"</span><span style="color: #e60000">Class</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">LegacyDriver</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">ClassGUID</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">{8ECC055D-047F-11D1-A537-0000F8753ED1}</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">DeviceDesc</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">@%SystemRoot%\\system32\\iscsidsc.dll,-5000</span><span style="color: #800000">"</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Sys<span style="color: #806030">\</span>ControlSet001<span style="color: #806030">\</span>Enum<span style="color: #806030">\</span>Root<span style="color: #806030">\</span>ISCSIPRT<span style="color: #806030">]</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Sys<span style="color: #806030">\</span>ControlSet001<span style="color: #806030">\</span>Enum<span style="color: #806030">\</span>Root<span style="color: #806030">\</span>ISCSIPRT<span style="color: #806030">\</span><span style="color: #8c0000">0000</span><span style="color: #806030">]</span>
<span style="color: #800000">"</span><span style="color: #e60000">ClassGUID</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">{4d36e97b-e325-11ce-bfc1-08002be10318}</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">Class</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">SCSIAdapter</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">HardwareID</span><span style="color: #800000">"</span><span style="color: #806030">=</span>hex<span style="color: #806030">(</span><span style="color: #8c0000">7</span><span style="color: #806030">)</span><span style="color: #806030">:</span><span style="color: #8c0000">52,00</span><span style="color: #8c0000">,</span>4f<span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>4f<span style="color: #8c0000">,00</span><span style="color: #8c0000">,54</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>5c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,69</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,53</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,43</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,53</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,49</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">00,50</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,72</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,74</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span>
<span style="color: #800000">"</span><span style="color: #e60000">ConfigFlags</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000000</span>
<span style="color: #800000">"</span><span style="color: #e60000">Driver</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">{4d36e97b-e325-11ce-bfc1-08002be10318}\\0000</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">Mfg</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">@iscsi.inf,%msft%;Microsoft</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">Service</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">iScsiPrt</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">DeviceDesc</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">@iscsi.inf,%iscsiprt%;Microsoft iSCSI Initiator</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">Capabilities</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000000</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Sys<span style="color: #806030">\</span>ControlSet001<span style="color: #806030">\</span>Enum<span style="color: #806030">\</span>Root<span style="color: #806030">\</span>ISCSIPRT<span style="color: #806030">\</span><span style="color: #8c0000">0000</span><span style="color: #806030">\</span>Device Parameters<span style="color: #806030">]</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Sys<span style="color: #806030">\</span>ControlSet001<span style="color: #806030">\</span>Enum<span style="color: #806030">\</span>Root<span style="color: #806030">\</span>ISCSIPRT<span style="color: #806030">\</span><span style="color: #8c0000">0000</span><span style="color: #806030">\</span>Device Parameters<span style="color: #806030">\</span>StorPort<span style="color: #806030">]</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Sys<span style="color: #806030">\</span>ControlSet001<span style="color: #806030">\</span>Enum<span style="color: #806030">\</span>Root<span style="color: #806030">\</span>ISCSIPRT<span style="color: #806030">\</span><span style="color: #8c0000">0000</span><span style="color: #806030">\</span>LogConf<span style="color: #806030">]</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Sys<span style="color: #806030">\</span>ControlSet001<span style="color: #806030">\</span>Enum<span style="color: #806030">\</span>Root<span style="color: #806030">\</span>ISCSIPRT<span style="color: #806030">\</span><span style="color: #8c0000">0000</span><span style="color: #806030">\</span>Control<span style="color: #806030">]</span>
<span style="color: #800000">"</span><span style="color: #e60000">ActiveService</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">iScsiPrt</span><span style="color: #800000">"</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Sys<span style="color: #806030">\</span>ControlSet001<span style="color: #806030">\</span>Services<span style="color: #806030">\</span>iScsiPrt<span style="color: #806030">]</span>
<span style="color: #800000">"</span><span style="color: #e60000">DisplayName</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">iScsiPort Driver</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">ImagePath</span><span style="color: #800000">"</span><span style="color: #806030">=</span>hex<span style="color: #806030">(</span><span style="color: #8c0000">2</span><span style="color: #806030">)</span><span style="color: #806030">:</span><span style="color: #8c0000">73,00</span><span style="color: #8c0000">,79</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,74</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6d<span style="color: #8c0000">,00</span><span style="color: #8c0000">,33</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,32</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>5c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,44</span><span style="color: #8c0000">,00</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">52,00</span><span style="color: #8c0000">,49</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,56</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,45</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,52</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,53</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>5c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6d<span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,69</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,63</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">00,69</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>2e<span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,79</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span>
<span style="color: #800000">"</span><span style="color: #e60000">ErrorControl</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000001</span>
<span style="color: #800000">"</span><span style="color: #e60000">Start</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000000</span>
<span style="color: #800000">"</span><span style="color: #e60000">Type</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000001</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Sys<span style="color: #806030">\</span>ControlSet001<span style="color: #806030">\</span>Services<span style="color: #806030">\</span>iScsiPrt<span style="color: #806030">\</span>Parameters<span style="color: #806030">]</span>
<span style="color: #800000">"</span><span style="color: #e60000">BusType</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000009</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Sys<span style="color: #806030">\</span>ControlSet001<span style="color: #806030">\</span>Services<span style="color: #806030">\</span>iScsiPrt<span style="color: #806030">\</span>Enum<span style="color: #806030">]</span>
<span style="color: #800000">"</span><span style="color: #e60000">0</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">Root\\ISCSIPRT\\0000</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">Count</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000001</span>
<span style="color: #800000">"</span><span style="color: #e60000">NextInstance</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000001</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Sys<span style="color: #806030">\</span>ControlSet001<span style="color: #806030">\</span>Services<span style="color: #806030">\</span>MSiSCSI<span style="color: #806030">]</span>
<span style="color: #800000">"</span><span style="color: #e60000">DisplayName</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">@%SystemRoot%\\system32\\iscsidsc.dll,-5000</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">Group</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">iSCSI</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">ImagePath</span><span style="color: #800000">"</span><span style="color: #806030">=</span>hex<span style="color: #806030">(</span><span style="color: #8c0000">2</span><span style="color: #806030">)</span><span style="color: #806030">:</span><span style="color: #8c0000">25,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,79</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,74</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6d<span style="color: #8c0000">,00</span><span style="color: #8c0000">,72</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6f<span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6f<span style="color: #8c0000">,00</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">74,00</span><span style="color: #8c0000">,25</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>5c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,79</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,74</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6d<span style="color: #8c0000">,00</span><span style="color: #8c0000">,33</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,32</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>5c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">00,76</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,63</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,68</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6f<span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,74</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>2e<span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,78</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,20</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>2d<span style="color: #8c0000">,00</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
6b<span style="color: #8c0000">,00</span><span style="color: #8c0000">,20</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6e<span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,74</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,76</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,63</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span>
<span style="color: #800000">"</span><span style="color: #e60000">Description</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">@%SystemRoot%\\system32\\iscsidsc.dll,-5001</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">ObjectName</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">LocalSystem</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">ErrorControl</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000001</span>
<span style="color: #800000">"</span><span style="color: #e60000">Start</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000002</span>
<span style="color: #800000">"</span><span style="color: #e60000">Type</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000020</span>
<span style="color: #800000">"</span><span style="color: #e60000">ServiceSidType</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000001</span>
<span style="color: #800000">"</span><span style="color: #e60000">RequiredPrivileges</span><span style="color: #800000">"</span><span style="color: #806030">=</span>hex<span style="color: #806030">(</span><span style="color: #8c0000">7</span><span style="color: #806030">)</span><span style="color: #806030">:</span><span style="color: #8c0000">53,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,41</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,75</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,64</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,69</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,74</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,50</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,72</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">00,69</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,76</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,69</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,67</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,53</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,43</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,68</span><span style="color: #8c0000">,00</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">61,00</span><span style="color: #8c0000">,</span>6e<span style="color: #8c0000">,00</span><span style="color: #8c0000">,67</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>4e<span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6f<span style="color: #8c0000">,00</span><span style="color: #8c0000">,74</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,69</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,66</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,79</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,50</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,72</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,69</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">00,76</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,69</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,67</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,53</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,43</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,72</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">61,00</span><span style="color: #8c0000">,74</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,47</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6f<span style="color: #8c0000">,00</span><span style="color: #8c0000">,62</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,61</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,50</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,72</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,69</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,76</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">00,69</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,67</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,53</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,43</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,72</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,61</span><span style="color: #8c0000">,00</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">74,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,50</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,72</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6d<span style="color: #8c0000">,00</span><span style="color: #8c0000">,61</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6e<span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6e<span style="color: #8c0000">,00</span><span style="color: #8c0000">,74</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,50</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,72</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">00,69</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,76</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,69</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,67</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,53</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,49</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6d<span style="color: #8c0000">,00</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">70,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,72</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6f<span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6e<span style="color: #8c0000">,00</span><span style="color: #8c0000">,61</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,74</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,50</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,72</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,69</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,76</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">00,69</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,67</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,53</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,54</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,63</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,62</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,50</span><span style="color: #8c0000">,00</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">72,00</span><span style="color: #8c0000">,69</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,76</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,69</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,67</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span>
<span style="color: #800000">"</span><span style="color: #e60000">FailureActionsOnNonCrashFailures</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000001</span>
<span style="color: #800000">"</span><span style="color: #e60000">FailureActions</span><span style="color: #800000">"</span><span style="color: #806030">=</span>hex<span style="color: #806030">:</span><span style="color: #8c0000">50,46</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,01</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,01</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,03</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,14</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">00,01</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>c0<span style="color: #8c0000">,</span>d4<span style="color: #8c0000">,01</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,01</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,e0</span><span style="color: #8c0000">,93</span><span style="color: #8c0000">,04</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span>
<span style="color: #800000">"</span><span style="color: #e60000">RebootMessage</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">See Note 3 below</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">FailureCommand</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">customScript.cmd</span><span style="color: #800000">"</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Sys<span style="color: #806030">\</span>ControlSet001<span style="color: #806030">\</span>Services<span style="color: #806030">\</span>MSiSCSI<span style="color: #806030">\</span>Parameters<span style="color: #806030">]</span>
<span style="color: #800000">"</span><span style="color: #e60000">ServiceDll</span><span style="color: #800000">"</span><span style="color: #806030">=</span>hex<span style="color: #806030">(</span><span style="color: #8c0000">2</span><span style="color: #806030">)</span><span style="color: #806030">:</span><span style="color: #8c0000">25,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,79</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,74</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6d<span style="color: #8c0000">,00</span><span style="color: #8c0000">,72</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6f<span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6f<span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">00,74</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,25</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>5c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,79</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,74</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6d<span style="color: #8c0000">,00</span><span style="color: #8c0000">,33</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,32</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>5c<span style="color: #8c0000">,00</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">69,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,63</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,69</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,78</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>2e<span style="color: #8c0000">,00</span><span style="color: #8c0000">,64</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">00</span>
<span style="color: #800000">"</span><span style="color: #e60000">ServiceDllUnloadOnStop</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000001</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Sys<span style="color: #806030">\</span>ControlSet001<span style="color: #806030">\</span>Services<span style="color: #806030">\</span>MSiSCSI<span style="color: #806030">\</span>Enum<span style="color: #806030">]</span>
<span style="color: #800000">"</span><span style="color: #e60000">0</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">Root\\LEGACY_MSISCSI\\0000</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">Count</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000001</span>
<span style="color: #800000">"</span><span style="color: #e60000">NextInstance</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000001</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Sys<span style="color: #806030">\</span>ControlSet001<span style="color: #806030">\</span>Services<span style="color: #806030">\</span>MSiSCSI<span style="color: #806030">]</span>
<span style="color: #800000">"</span><span style="color: #e60000">ImagePath</span><span style="color: #800000">"</span><span style="color: #806030">=</span>hex<span style="color: #806030">(</span><span style="color: #8c0000">2</span><span style="color: #806030">)</span><span style="color: #806030">:</span><span style="color: #8c0000">25,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,79</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,74</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6d<span style="color: #8c0000">,00</span><span style="color: #8c0000">,72</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6f<span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6f<span style="color: #8c0000">,00</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">74,00</span><span style="color: #8c0000">,25</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>5c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,79</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,74</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6d<span style="color: #8c0000">,00</span><span style="color: #8c0000">,33</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,32</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>5c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">00,76</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,63</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,68</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6f<span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,74</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>2e<span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,78</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,20</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>2d<span style="color: #8c0000">,00</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
6b<span style="color: #8c0000">,00</span><span style="color: #8c0000">,20</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,47</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6f<span style="color: #8c0000">,00</span><span style="color: #8c0000">,64</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>7a<span style="color: #8c0000">,00</span><span style="color: #8c0000">,69</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,61</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span>
Windows Registry Editor Version <span style="color: #8c0000">5.00</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Sys<span style="color: #806030">\</span>ControlSet001<span style="color: #806030">\</span>Control<span style="color: #806030">\</span>Class<span style="color: #806030">\</span><span style="color: #806030">{</span>4D36E97B<span style="color: #806030">-</span><span style="color: #8c0000">E325</span><span style="color: #806030">-</span>11CE<span style="color: #806030">-</span>BFC1<span style="color: #806030">-</span>08002BE10318<span style="color: #806030">}</span><span style="color: #806030">]</span>
<span style="color: #800000">"</span><span style="color: #e60000">LegacyAdapterDetection</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000000</span>
<span style="color: #800000">"</span><span style="color: #e60000">Class</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">SCSIAdapter</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">ClassDesc</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">@%SystemRoot%\\System32\\SysClass.Dll,-3005</span><span style="color: #800000">"</span>
@<span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">@%SystemRoot%\\System32\\SysClass.Dll,-3005</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">IconPath</span><span style="color: #800000">"</span><span style="color: #806030">=</span>hex<span style="color: #806030">(</span><span style="color: #8c0000">7</span><span style="color: #806030">)</span><span style="color: #806030">:</span><span style="color: #8c0000">25,00</span><span style="color: #8c0000">,53</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,79</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,74</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6d<span style="color: #8c0000">,00</span><span style="color: #8c0000">,52</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6f<span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6f<span style="color: #8c0000">,00</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">74,00</span><span style="color: #8c0000">,25</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>5c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,53</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,79</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,74</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6d<span style="color: #8c0000">,00</span><span style="color: #8c0000">,33</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,32</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>5c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,73</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">00,65</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,74</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,75</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,70</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,61</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,70</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,69</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>2e<span style="color: #8c0000">,00</span><span style="color: #8c0000">,64</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>6c<span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>2c<span style="color: #8c0000">,00</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
2d<span style="color: #8c0000">,00</span><span style="color: #8c0000">,31</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,30</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span>
<span style="color: #800000">"</span><span style="color: #e60000">Installer32</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">SysClass.Dll,ScsiClassInstaller</span><span style="color: #800000">"</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Sys<span style="color: #806030">\</span>ControlSet001<span style="color: #806030">\</span>Control<span style="color: #806030">\</span>Class<span style="color: #806030">\</span><span style="color: #806030">{</span>4D36E97B<span style="color: #806030">-</span><span style="color: #8c0000">E325</span><span style="color: #806030">-</span>11CE<span style="color: #806030">-</span>BFC1<span style="color: #806030">-</span>08002BE10318<span style="color: #806030">}</span><span style="color: #806030">\</span><span style="color: #8c0000">0000</span><span style="color: #806030">]</span>
<span style="color: #800000">"</span><span style="color: #e60000">InfPath</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">iscsi.inf</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">InfSection</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">iScsiPort_Install_Control</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">ProviderName</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">Microsoft</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">DriverDateData</span><span style="color: #800000">"</span><span style="color: #806030">=</span>hex<span style="color: #806030">:</span><span style="color: #8c0000">00,80</span><span style="color: #8c0000">,</span>8c<span style="color: #8c0000">,</span>a3<span style="color: #8c0000">,</span>c5<span style="color: #8c0000">,94</span><span style="color: #8c0000">,</span>c6<span style="color: #8c0000">,01</span>
<span style="color: #800000">"</span><span style="color: #e60000">DriverDate</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">6-21-2006</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">DriverVersion</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">6.0.6000.16386</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">MatchingDeviceId</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">root\\iscsiprt</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">DriverDesc</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">Microsoft iSCSI Initiator</span><span style="color: #800000">"</span>
<span style="color: #800000">"</span><span style="color: #e60000">EnumPropPages32</span><span style="color: #800000">"</span><span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #e60000">iscsipp.dll,iSCSIPropPageProvider</span><span style="color: #800000">"</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Sys<span style="color: #806030">\</span>ControlSet001<span style="color: #806030">\</span>Control<span style="color: #806030">\</span>Class<span style="color: #806030">\</span><span style="color: #806030">{</span>4D36E97B<span style="color: #806030">-</span><span style="color: #8c0000">E325</span><span style="color: #806030">-</span>11CE<span style="color: #806030">-</span>BFC1<span style="color: #806030">-</span>08002BE10318<span style="color: #806030">}</span><span style="color: #806030">\</span><span style="color: #8c0000">0000</span><span style="color: #806030">\</span>Parameters<span style="color: #806030">]</span>
<span style="color: #800000">"</span><span style="color: #e60000">TCPConnectTime</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span>0000000f
<span style="color: #800000">"</span><span style="color: #e60000">TCPDisconnectTime</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span>0000000f
<span style="color: #800000">"</span><span style="color: #e60000">WMIRequestTimeout</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span>0000001e
<span style="color: #800000">"</span><span style="color: #e60000">DelayBetweenReconnect</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000005</span>
<span style="color: #800000">"</span><span style="color: #e60000">MaxPendingRequests</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span>000000ff
<span style="color: #800000">"</span><span style="color: #e60000">EnableNOPOut</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000000</span>
<span style="color: #800000">"</span><span style="color: #e60000">MaxTransferLength</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00040000</span>
<span style="color: #800000">"</span><span style="color: #e60000">MaxBurstLength</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00040000</span>
<span style="color: #800000">"</span><span style="color: #e60000">FirstBurstLength</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00010000</span>
<span style="color: #800000">"</span><span style="color: #e60000">MaxRecvDataSegmentLength</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00010000</span>
<span style="color: #800000">"</span><span style="color: #e60000">MaxConnectionRetries</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span>ffffffff
<span style="color: #800000">"</span><span style="color: #e60000">MaxRequestHoldTime</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span>0000003c
<span style="color: #800000">"</span><span style="color: #e60000">LinkDownTime</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span>0000000f
<span style="color: #800000">"</span><span style="color: #e60000">IPSecConfigTimeout</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span>0000003c
<span style="color: #800000">"</span><span style="color: #e60000">InitialR2T</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000000</span>
<span style="color: #800000">"</span><span style="color: #e60000">ImmediateData</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000001</span>
<span style="color: #800000">"</span><span style="color: #e60000">ErrorRecoveryLevel</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000002</span>
<span style="color: #800000">"</span><span style="color: #e60000">PortalRetryCount</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000005</span>
<span style="color: #800000">"</span><span style="color: #e60000">NetworkReadyRetryCount</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span>0000000a
<span style="color: #800000">"</span><span style="color: #e60000">SrbTimeoutDelta</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span>0000000f
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Sys<span style="color: #806030">\</span>ControlSet001<span style="color: #806030">\</span>Control<span style="color: #806030">\</span>Class<span style="color: #806030">\</span><span style="color: #806030">{</span>4D36E97B<span style="color: #806030">-</span><span style="color: #8c0000">E325</span><span style="color: #806030">-</span>11CE<span style="color: #806030">-</span>BFC1<span style="color: #806030">-</span>08002BE10318<span style="color: #806030">}</span><span style="color: #806030">\</span><span style="color: #8c0000">0000</span><span style="color: #806030">\</span>PersistentTargets<span style="color: #806030">]</span>
@<span style="color: #806030">=</span><span style="color: #800000">"</span><span style="color: #800000">"</span>
<span style="color: #806030">[</span>HKEY<span style="color: #806030">_</span>LOCAL<span style="color: #806030">_</span>MACHINE<span style="color: #806030">\</span>PE<span style="color: #806030">_</span>Sys<span style="color: #806030">\</span>ControlSet001<span style="color: #806030">\</span>Control<span style="color: #806030">\</span>Class<span style="color: #806030">\</span><span style="color: #806030">{</span>4D36E97B<span style="color: #806030">-</span><span style="color: #8c0000">E325</span><span style="color: #806030">-</span>11CE<span style="color: #806030">-</span>BFC1<span style="color: #806030">-</span>08002BE10318<span style="color: #806030">}</span><span style="color: #806030">\</span>Properties<span style="color: #806030">]</span>
<span style="color: #800000">"</span><span style="color: #e60000">DeviceType</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000004</span>
<span style="color: #800000">"</span><span style="color: #e60000">DeviceCharacteristics</span><span style="color: #800000">"</span><span style="color: #806030">=</span>dword<span style="color: #806030">:</span><span style="color: #8c0000">00000100</span>
<span style="color: #800000">"</span><span style="color: #e60000">Security</span><span style="color: #800000">"</span><span style="color: #806030">=</span>hex<span style="color: #806030">:</span><span style="color: #8c0000">01,00</span><span style="color: #8c0000">,04</span><span style="color: #8c0000">,90</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,14</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,02</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">00,34</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,02</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,14</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>ff<span style="color: #8c0000">,01</span><span style="color: #8c0000">,</span>1f<span style="color: #8c0000">,10</span><span style="color: #8c0000">,01</span><span style="color: #8c0000">,01</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,05</span><span style="color: #8c0000">,12</span><span style="color: #8c0000">,00</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">00,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,18</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,</span>ff<span style="color: #8c0000">,01</span><span style="color: #8c0000">,</span>1f<span style="color: #8c0000">,10</span><span style="color: #8c0000">,01</span><span style="color: #8c0000">,02</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,05</span><span style="color: #8c0000">,20</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,00</span><span style="color: #8c0000">,20</span><span style="color: #8c0000">,02</span><span style="color: #8c0000">,00</span><span style="color: #806030">,</span><span style="color: #806030">\</span>
<span style="color: #8c0000">00</span></pre>
<li>Import iscsi.reg into registry. It should update both PE_Sys and PE_Soft hive.
<li>Unload both PE_Sys and PE_Soft hive by using File | Unload Hive… in registry editor.
<li>Unmount and commit the WinPE mount:<br><pre style="background: #f1f0f0; color: #000000"><font style="background-color: #ffff00">imagex <span style="color: #806030">/</span>unmount <span style="color: #806030">/</span>commit mount</font></pre>
<li>The WinPE image file is now ready with iSCSI service.</li></ol>
<h1>Start iSCSI service in WinPE environment</h1>
<ol>
<li>Boot the WinPE image either by using ISO or PXE
<li>To start iSCSI service:<br><pre style="background: #f1f0f0; color: #000000">X<span style="color: #806030">:</span><span style="color: #806030">\</span>windows<span style="color: #806030">\</span>system32<span style="color: #806030">></span><font style="background-color: #ffff00">net start msiscsi</font>
The Microsoft iSCSI Initiator Service service is starting<span style="color: #806030">.</span>
The Microsoft iSCSI Initiator Service service was started successfully<span style="color: #806030">.</span></pre>
<li>type <font style="background-color: #ffff00">iscsicpl</font> to start iSCSI GUI windows:<br><br><a href="http://lh6.ggpht.com/-y1KWiXcehg8/TthRIfIo0DI/AAAAAAAAAz8/tglCaPmAOKg/s1600-h/Windows%2525207-2011-12-02-12-12-55%25255B3%25255D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Windows 7-2011-12-02-12-12-55" border="0" alt="Windows 7-2011-12-02-12-12-55" src="http://lh5.ggpht.com/-d3_onH88buo/TthRLainr5I/AAAAAAAAA0I/jai9SBm6ans/Windows%2525207-2011-12-02-12-12-55_thumb%25255B1%25255D.png?imgmax=800" width="804" height="604"></a>
<li>The iSCSI initiator is now active to connect to iSCSI target.</li></ol>
<h1>Reference</h1>
<ol>
<li>WinPE v3.0 and Microsoft iSCSI Initiator. URL: <a href="http://www.gregorystrike.com/2010/01/08/winpe-v3-0-and-microsoft-iscsi-initiator/">http://www.gregorystrike.com/2010/01/08/winpe-v3-0-and-microsoft-iscsi-initiator/</a></li></ol> Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com4tag:blogger.com,1999:blog-38385155.post-791844628252019522011-12-02T11:38:00.001+08:002011-12-02T11:38:46.758+08:00PXELinux: Load menu other than default<p>When loading PXELinux via DHCP as specified in dhcp.conf:</p><pre style="background: #f1f0f0; color: #000000">filename <span style="color: #800000">"</span><span style="color: #e60000">pxelinux.0</span><span style="color: #800000">"</span><span style="color: #806030">;</span>
</pre>
<p>Once PXELinux was loaded, it will look for configuration in the following order:</p>
<ol>
<li>Client PC’s GUID</li>
<li>Client PC’s MAC Address</li>
<li>Client PC”s IP address</li>
<li>pxelinux.cfg/default</li></ol>
<p>These searching order may reveal from /var/log/messages:</p><pre style="background: #f1f0f0; color: #000000">Nov <span style="color: #8c0000">28</span> <span style="color: #8745a0">08:58:09</span> dolphin in<span style="color: #8c0000">.</span>tftpd<span style="color: #806030">[</span><span style="color: #8c0000">24603</span><span style="color: #806030">]</span><span style="color: #806030">:</span> RRQ from <span style="color: #8c0000">192.168</span><span style="color: #8c0000">.0</span><span style="color: #8c0000">.181</span> filename gpxelinux<span style="color: #8c0000">.0</span>
Nov <span style="color: #8c0000">28</span> <span style="color: #8745a0">08:58:09</span> dolphin in<span style="color: #8c0000">.</span>tftpd<span style="color: #806030">[</span><span style="color: #8c0000">24604</span><span style="color: #806030">]</span><span style="color: #806030">:</span> RRQ from <span style="color: #8c0000">192.168</span><span style="color: #8c0000">.0</span><span style="color: #8c0000">.181</span> filename pxelinux<span style="color: #8c0000">.</span>cfg<span style="color: #806030">/</span>0338a9f6<span style="color: #806030">-</span>d2b1<span style="color: #806030">-</span>11df<span style="color: #806030">-</span>9ec1
<span style="color: #806030">-</span>0013d4d9c9e8
Nov <span style="color: #8c0000">28</span> <span style="color: #8745a0">08:58:09</span> dolphin in<span style="color: #8c0000">.</span>tftpd<span style="color: #806030">[</span><span style="color: #8c0000">24605</span><span style="color: #806030">]</span><span style="color: #806030">:</span> RRQ from <span style="color: #8c0000">192.168</span><span style="color: #8c0000">.0</span><span style="color: #8c0000">.181</span> filename pxelinux<span style="color: #8c0000">.</span>cfg<span style="color: #806030">/</span><span style="color: #8c0000">01</span><span style="color: #806030">-</span><span style="color: #8c0000">70</span><span style="color: #806030">-</span><span style="color: #8c0000">71</span><span style="color: #806030">-</span>bc<span style="color: #806030">-</span>a8<span style="color: #806030">-</span>4f<span style="color: #806030">-</span><span style="color: #8c0000">43</span>
Nov <span style="color: #8c0000">28</span> <span style="color: #8745a0">08:58:09</span> dolphin in<span style="color: #8c0000">.</span>tftpd<span style="color: #806030">[</span><span style="color: #8c0000">24606</span><span style="color: #806030">]</span><span style="color: #806030">:</span> RRQ from <span style="color: #8c0000">192.168</span><span style="color: #8c0000">.0</span><span style="color: #8c0000">.181</span> filename pxelinux<span style="color: #8c0000">.</span>cfg<span style="color: #806030">/</span>C0A800B5
Nov <span style="color: #8c0000">28</span> <span style="color: #8745a0">08:58:09</span> dolphin in<span style="color: #8c0000">.</span>tftpd<span style="color: #806030">[</span><span style="color: #8c0000">24607</span><span style="color: #806030">]</span><span style="color: #806030">:</span> RRQ from <span style="color: #8c0000">192.168</span><span style="color: #8c0000">.0</span><span style="color: #8c0000">.181</span> filename pxelinux<span style="color: #8c0000">.</span>cfg<span style="color: #806030">/</span>C0A800B
Nov <span style="color: #8c0000">28</span> <span style="color: #8745a0">08:58:09</span> dolphin in<span style="color: #8c0000">.</span>tftpd<span style="color: #806030">[</span><span style="color: #8c0000">24608</span><span style="color: #806030">]</span><span style="color: #806030">:</span> RRQ from <span style="color: #8c0000">192.168</span><span style="color: #8c0000">.0</span><span style="color: #8c0000">.181</span> filename pxelinux<span style="color: #8c0000">.</span>cfg<span style="color: #806030">/</span>C0A800
Nov <span style="color: #8c0000">28</span> <span style="color: #8745a0">08:58:09</span> dolphin in<span style="color: #8c0000">.</span>tftpd<span style="color: #806030">[</span><span style="color: #8c0000">24609</span><span style="color: #806030">]</span><span style="color: #806030">:</span> RRQ from <span style="color: #8c0000">192.168</span><span style="color: #8c0000">.0</span><span style="color: #8c0000">.181</span> filename pxelinux<span style="color: #8c0000">.</span>cfg<span style="color: #806030">/</span>C0A80
Nov <span style="color: #8c0000">28</span> <span style="color: #8745a0">08:58:09</span> dolphin in<span style="color: #8c0000">.</span>tftpd<span style="color: #806030">[</span><span style="color: #8c0000">24610</span><span style="color: #806030">]</span><span style="color: #806030">:</span> RRQ from <span style="color: #8c0000">192.168</span><span style="color: #8c0000">.0</span><span style="color: #8c0000">.181</span> filename pxelinux<span style="color: #8c0000">.</span>cfg<span style="color: #806030">/</span>C0A8
Nov <span style="color: #8c0000">28</span> <span style="color: #8745a0">08:58:09</span> dolphin in<span style="color: #8c0000">.</span>tftpd<span style="color: #806030">[</span><span style="color: #8c0000">24611</span><span style="color: #806030">]</span><span style="color: #806030">:</span> RRQ from <span style="color: #8c0000">192.168</span><span style="color: #8c0000">.0</span><span style="color: #8c0000">.181</span> filename pxelinux<span style="color: #8c0000">.</span>cfg<span style="color: #806030">/</span>C0A
Nov <span style="color: #8c0000">28</span> <span style="color: #8745a0">08:58:09</span> dolphin in<span style="color: #8c0000">.</span>tftpd<span style="color: #806030">[</span><span style="color: #8c0000">24612</span><span style="color: #806030">]</span><span style="color: #806030">:</span> RRQ from <span style="color: #8c0000">192.168</span><span style="color: #8c0000">.0</span><span style="color: #8c0000">.181</span> filename pxelinux<span style="color: #8c0000">.</span>cfg<span style="color: #806030">/</span>C0
Nov <span style="color: #8c0000">28</span> <span style="color: #8745a0">08:58:09</span> dolphin in<span style="color: #8c0000">.</span>tftpd<span style="color: #806030">[</span><span style="color: #8c0000">24613</span><span style="color: #806030">]</span><span style="color: #806030">:</span> RRQ from <span style="color: #8c0000">192.168</span><span style="color: #8c0000">.0</span><span style="color: #8c0000">.181</span> filename pxelinux<span style="color: #8c0000">.</span>cfg<span style="color: #806030">/</span>C
Nov <span style="color: #8c0000">28</span> <span style="color: #8745a0">08:58:09</span> dolphin in<span style="color: #8c0000">.</span>tftpd<span style="color: #806030">[</span><span style="color: #8c0000">24614</span><span style="color: #806030">]</span><span style="color: #806030">:</span> RRQ from <span style="color: #8c0000">192.168</span><span style="color: #8c0000">.0</span><span style="color: #8c0000">.181</span> filename pxelinux<span style="color: #8c0000">.</span>cfg<span style="color: #806030">/</span>default
</pre>
<p>In most situation, create a default configuration file works well. There are some situations where we want to force the pxelinux to load menu configuration file other than default.</p>
<p>Here is a DHCP configuration that force pxelinux to load menu pxelinux.cfg/boot:</p>
<div style="border-bottom: #d0d0d0 1px solid; border-left: #d0d0d0 1px solid; background-color: #f0f0f0; font-family: monospace; color: #006; border-top: #d0d0d0 1px solid; border-right: #d0d0d0 1px solid" class="text">
<ol>
<li style="font: 130% 'Courier New', courier, monospace; color: #003030; vertical-align: top">
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 1em/1.2em monospace; background: none transparent scroll repeat 0% 0%; color: #000020; vertical-align: top; padding-top: 0px">option space pxelinux;</div></li>
<li style="font: 130% 'Courier New', courier, monospace; color: #003030; vertical-align: top">
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 1em/1.2em monospace; background: none transparent scroll repeat 0% 0%; color: #000020; vertical-align: top; padding-top: 0px">option pxelinux.magic code 208 = string;</div></li>
<li style="font: 130% 'Courier New', courier, monospace; color: #003030; vertical-align: top">
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 1em/1.2em monospace; background: none transparent scroll repeat 0% 0%; color: #000020; vertical-align: top; padding-top: 0px">option pxelinux.configfile code 209 = text;</div></li>
<li style="font: 130% 'Courier New', courier, monospace; color: #003030; vertical-align: top">
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 1em/1.2em monospace; background: none transparent scroll repeat 0% 0%; color: #000020; vertical-align: top; padding-top: 0px">option pxelinux.pathprefix code 210 = text;</div></li>
<li style="font: 130% 'Courier New', courier, monospace; color: #003030; vertical-align: top">
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 1em/1.2em monospace; background: none transparent scroll repeat 0% 0%; color: #000020; vertical-align: top; padding-top: 0px">option pxelinux.reboottime code 211 = unsigned integer 32;</div></li>
<li style="font: 130% 'Courier New', courier, monospace; color: #003030; vertical-align: top">
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 1em/1.2em monospace; background: none transparent scroll repeat 0% 0%; color: #000020; vertical-align: top; padding-top: 0px"> </div></li>
<li style="font: 130% 'Courier New', courier, monospace; color: #003030; vertical-align: top">
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 1em/1.2em monospace; background: none transparent scroll repeat 0% 0%; color: #000020; vertical-align: top; padding-top: 0px">site-option-space "pxelinux";</div></li>
<li style="font: 130% 'Courier New', courier, monospace; color: #003030; vertical-align: top">
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 1em/1.2em monospace; background: none transparent scroll repeat 0% 0%; color: #000020; vertical-align: top; padding-top: 0px">if exists dhcp-parameter-request-list {</div></li>
<li style="font: 130% 'Courier New', courier, monospace; color: #003030; vertical-align: top">
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 1em/1.2em monospace; background: none transparent scroll repeat 0% 0%; color: #000020; vertical-align: top; padding-top: 0px"> # Always send the PXELINUX options</div></li>
<li style="font: 130% 'Courier New', courier, monospace; color: #003030; vertical-align: top">
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 1em/1.2em monospace; background: none transparent scroll repeat 0% 0%; color: #000020; vertical-align: top; padding-top: 0px"> option dhcp-parameter-request-list = concat(option-dhcp-parameter-request-list, "208,209,210,211");</div></li>
<li style="font: 130% 'Courier New', courier, monospace; color: #003030; vertical-align: top">
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 1em/1.2em monospace; background: none transparent scroll repeat 0% 0%; color: #000020; vertical-align: top; padding-top: 0px">}</div></li>
<li style="font: 130% 'Courier New', courier, monospace; color: #003030; vertical-align: top">
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 1em/1.2em monospace; background: none transparent scroll repeat 0% 0%; color: #000020; vertical-align: top; padding-top: 0px"> </div></li>
<li style="font: 130% 'Courier New', courier, monospace; color: #003030; vertical-align: top">
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 1em/1.2em monospace; background: none transparent scroll repeat 0% 0%; color: #000020; vertical-align: top; padding-top: 0px">option pxelinux.configfile "pxelinux.cfg/boot";</div></li>
<li style="font: 130% 'Courier New', courier, monospace; color: #003030; vertical-align: top">
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 1em/1.2em monospace; background: none transparent scroll repeat 0% 0%; color: #000020; vertical-align: top; padding-top: 0px">filename "pxelinux.0";</div></li></ol></div>
<p>The DHCP option 209 is the option to specify PXELinux config file. Line 10 specify option additional parameters that will pass to dhcp client.</p> Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com0tag:blogger.com,1999:blog-38385155.post-72777000542097746262011-12-02T11:17:00.001+08:002011-12-02T11:17:37.043+08:00PXELinux: Boot ISO image from network<p>PXELinux’s memdisk module may boot ISO image from network. However, not all ISO file support network booting. It is worth to try if you need the boot ISO image via PXELinux.</p> <p>The following example shows two configuration to boot WinPE and SeaTools ISO. The PXE supports iPXE/gPXE to allow HTTP loading of ISO file. You may use native TFTP protocol for file loading too.</p><pre style="background: #f1f0f0; color: #000000">label WinPE ISO
kernel syslinux<span style="color: #806030">/</span>memdisk
append iso
initrd <a href="http://<ip-address>/winpe7_x64.isolabel">http<span style="color: #806030">:</span><span style="color: #c34e00">//<ip-address>/winpe7_x64.iso</span>
label</a> SeaTools
menu label SeaTools <span style="color: #400000; font-weight: bold">for</span> DOS v2<span style="color: #806030">.</span><span style="color: #c00000">23</span>
kernel syslinux<span style="color: #806030">/</span>memdisk
append iso
initrd <a href="http://<ip-address>/SeaToolsDOS223ALL.ISO">http<span style="color: #806030">:</span><span style="color: #c34e00">//<ip-address>/SeaToolsDOS223ALL.ISO</span>
</a></pre> Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com0tag:blogger.com,1999:blog-38385155.post-71863110665179376912011-11-28T17:51:00.001+08:002012-08-28T10:12:14.499+08:00iPXE: iSCSI for Microsoft Windows<h1>Prepare environment to install and boot from iSCSI target</h1> <ol> <li>Syslinux 3.86 is the last known working version that may work with gpxe/ipxe. Prepare a TFTP boot folder as following:<br><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># tree</span>
<span style="color: #400000; font-weight: bold">.</span>
├── pxelinux<span style="color: #400000; font-weight: bold">.</span>cfg
│ └── default
├── syslinux -<span style="color: #e34adc">></span> syslinux<span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">386</span>
├── syslinux<span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">386</span>
│ ├── advdump<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── c32echo<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── cat<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── chain<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── cmd<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── comecho<span style="color: #400000; font-weight: bold">.</span>com
│ ├── complex<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── config<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── copybs<span style="color: #400000; font-weight: bold">.</span>com
│ ├── cpuid<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── cpuidtest<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── disk<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── display<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── dmitest<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── elf<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── entrydump<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── ethersel<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── fancyhello<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── fd<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── filetest<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── gfxboot<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── gfxboot<span style="color: #400000; font-weight: bold">.</span>com
│ ├── gpxecmd<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── gpxelinux<span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">0</span>
│ ├── hdt<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── hello2<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── hello<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── ifcpu64<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── ifcpu<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── int18<span style="color: #400000; font-weight: bold">.</span>com
│ ├── kbdmap<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── keytest<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── linux<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── localboot<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── mboot<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── mdiskchk<span style="color: #400000; font-weight: bold">.</span>com
│ ├── memdump<span style="color: #400000; font-weight: bold">.</span>com
│ ├── meminfo<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── menu<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── pcitest<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── pmload<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── poweroff<span style="color: #400000; font-weight: bold">.</span>com
│ ├── pxechain<span style="color: #400000; font-weight: bold">.</span>com
│ ├── pxelinux<span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">0</span>
│ ├── reboot<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── resolv<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── rosh<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── sanboot<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── sdi<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── serialinfo<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── simple<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── sysdump<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── syslinux<span style="color: #400000; font-weight: bold">.</span>com
│ ├── test2<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── <span style="color: #bb7977; font-weight: bold">test</span><span style="color: #400000; font-weight: bold">.</span>c32
│ ├── vesainfo<span style="color: #400000; font-weight: bold">.</span>c32
│ ├── vesamenu<span style="color: #400000; font-weight: bold">.</span>c32
│ └── vpdtest<span style="color: #400000; font-weight: bold">.</span>c32
├── undionly<span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">0</span> -<span style="color: #e34adc">></span> undionly<span style="color: #400000; font-weight: bold">.</span>kpxe
├── undionly<span style="color: #400000; font-weight: bold">.</span>kpxe
└── windows<span style="color: #400000; font-weight: bold">.</span>pe
├── BCD
├── bootmgr<span style="color: #400000; font-weight: bold">.</span>exe
├── boot<span style="color: #400000; font-weight: bold">.</span>sdi
├── fonts
│ ├── chs_boot<span style="color: #400000; font-weight: bold">.</span>ttf
│ ├── cht_boot<span style="color: #400000; font-weight: bold">.</span>ttf
│ ├── jpn_boot<span style="color: #400000; font-weight: bold">.</span>ttf
│ ├── kor_boot<span style="color: #400000; font-weight: bold">.</span>ttf
│ └── wgl4_boot<span style="color: #400000; font-weight: bold">.</span>ttf
├── pxeboot<span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">0</span> -<span style="color: #e34adc">></span> pxeboot<span style="color: #400000; font-weight: bold">.</span>n12
├── pxeboot<span style="color: #400000; font-weight: bold">.</span>n12
├── vista_x64<span style="color: #400000; font-weight: bold">.</span>wim
├── vista_x86<span style="color: #400000; font-weight: bold">.</span>wim
├── win7_x64<span style="color: #400000; font-weight: bold">.</span>wim
└── win7_x86<span style="color: #400000; font-weight: bold">.</span>wim</pre>
<li>Update /etc/dhcp/dhcpd.conf to use gpxelinux.0<br><pre style="background: #f1f0f0; color: #000000">filename <span style="color: #e60000">"gpxelinux.0"</span><span style="color: #806030">;</span></pre>
<li>Restart dhcpd service<br><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># <font style="background-color: #ffff00">service dhcpd restart</font></span>
Shutting down dhcpd<span style="color: #806030">:</span> <span style="color: #806030">[</span> OK <span style="color: #806030">]</span>
Starting dhcpd<span style="color: #806030">:</span> <span style="color: #806030">[</span> OK <span style="color: #806030">]</span></pre>
<li>Update pxelinux.cfg/default:<br><pre style="background: #f1f0f0; color: #000000">LABEL boot_san
menu label Boot ^Storage Area Network
menu indent <span style="color: #c00000">5</span>
com32 <span style="color: #40015a">syslinux/gpxecmd.c32</span>
append chain tftp<span style="color: #806030">:</span><span style="color: #40015a">/</span><span style="color: #40015a">/boot.example.com/sanboot.gpxe</span>
label undionly
menu label Boot iPXE UNDI
menu indent <span style="color: #c00000">5</span>
kernel undionly<span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">0</span></pre>
<li>Create a sanboot.gpxe script file:<br><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># cat sanboot.gpxe</span>
<span style="color: #c34e00">#!</span><span style="color: #007997">gpxe</span>
login
chain tftp<span style="color: #806030">:</span><span style="color: #40015a">/</span><span style="color: #40015a">/boot.example.com/syslinux/menu.c32</span> <a href="http://${username}:${password}@boot.example.com/~${username}/menu.cfg">http<span style="color: #806030">:</span><span style="color: #40015a">/</span><span style="color: #40015a">/</span>${username}<span style="color: #806030">:</span>${password}@boot<span style="color: #400000; font-weight: bold">.example.com</span><span style="color: #40015a">/</span>~${username}<span style="color: #40015a">/menu.cfg</a></span></pre>
<li>A sample menu.cfg file:<br><pre style="background: #f1f0f0; color: #000000">UI <span style="color: #40015a">syslinux/vesamenu.c32</span>
LABEL Windows <span style="color: #c00000">7</span> x64
com32 cmd<span style="color: #400000; font-weight: bold">.</span>c32
append sanboot iscsi<span style="color: #806030">:</span>nas<span style="color: #400000; font-weight: bold">.example.com</span><span style="color: #806030">:</span><span style="color: #806030">:</span><span style="color: #806030">:</span><span style="color: #806030">:</span>iqn<span style="color: #400000; font-weight: bold">.</span>example.com<span style="color: #806030">:</span>win7-x64
LABEL Windows <span style="color: #c00000">8</span> x64
com32 cmd<span style="color: #400000; font-weight: bold">.</span>c32
append sanboot iscsi<span style="color: #806030">:</span>nas<span style="color: #400000; font-weight: bold">.</span>example.com<span style="color: #806030">:</span><span style="color: #806030">:</span><span style="color: #806030">:</span><span style="color: #806030">:</span>iqn<span style="color: #400000; font-weight: bold">.example.com</span><span style="color: #806030">:w</span>in8-x64</pre></li></ol>
<h1>Install Windows 7 on iSCSI target</h1>
<ol>
<li>Boot machine into iPXE kernel (Boot iPXE UNDI or undionly.0)
<li>Press <font style="background-color: #ffff00">Ctrl-B</font> to start iPXE command line <br><a href="http://lh6.ggpht.com/-aGT6uOrStRI/TtRLTBTpmzI/AAAAAAAAAzg/4lBIwTshX6E/s1600-h/MS-DOS-2011-11-15-11-49-38%25255B3%25255D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="MS-DOS-2011-11-15-11-49-38" border="0" alt="MS-DOS-2011-11-15-11-49-38" src="http://lh5.ggpht.com/-JRonW0NlzVs/TtRLT5q9JjI/AAAAAAAAAzo/ilNUOG3lFRg/MS-DOS-2011-11-15-11-49-38_thumb%25255B1%25255D.png?imgmax=800" width="724" height="404"></a>
<li>Obtain an IP address from dhcp<br><pre style="background: #f1f0f0; color: #000000">iPXE> <font style="background-color: #ffff00">dhcp net0</font></pre>
<li>Preserve SAN device<br><pre style="background: #f1f0f0; color: #000000"><span style="color: #bb7977; font-weight: bold">iPXE> <font style="background-color: #ffff00">set</font></span><font style="background-color: #ffff00"> keep-san <span style="color: #c00000">1</span></font></pre>
<li>Supply chap information if necessary:<br><pre style="background: #f1f0f0; color: #000000">iPXE> <font style="background-color: #ffff00">login</font></pre>
<li>Initialize iSCSI target:<br><pre style="background: #f1f0f0; color: #000000"><span style="color: #bb7977; font-weight: bold">iPXE></span> <font style="background-color: #ffff00">sanboot</font> iscsi<span style="color: #806030">:nas.example.com</span><span style="color: #806030">:</span><span style="color: #806030">:</span><span style="color: #806030">:</span><span style="color: #806030">:</span>iqn<span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">2011</span>-<span style="color: #c00000">03</span><span style="color: #400000; font-weight: bold">.</span>example<span style="color: #400000; font-weight: bold">.com</span><span style="color: #806030">:<font color="#000000">my-iscsi<br>Registered SAN device 0x80<br>Booting from SAN device 0x80<br>Boot from SAN device 0x80 failed: Operation canceled (<a href="http://ipxe.org/0x8080a0">http://ipxe.org/0x8080a0</a>)<br>Preserving SAN device 0x80</font></span><span style="color: #806030"><font color="#000000"><br></font></span></pre>
<li>
<p>Chain boot to Windows PE:</p><pre style="background: #f1f0f0; color: #000000">iPXE> <font style="background-color: #ffff00">chain</font> tftp<span style="color: #806030">:</span><span style="color: #40015a">/</span><span style="color: #40015a">/boot.example.com/windows.pe/pxeboot.0</span></pre>
<ol><!--EndFragment--></ol>
<li>Or chain boot to Windows PE ISO:</li><pre style="background: #f1f0f0; color: #000000">iPXE> <font style="background-color: #ffff00">kernel</font> syslinux/memdisk iso<br>iPXE> <font style="background-color: #ffff00">initrd</font> <a href="http://<ip-address>/winpe7_x64.iso">http://<ip-address>/winpe7_x64.iso</a><br>iPXE> <font style="background-color: #ffff00">boot</font></pre>
<ol></ol>
<li>Once boot into Windows PE, you may use the iSCSI target just like your local storage. You may install a Windows OS into the iSCSI target directly.</li></ol>
<h1>Boot from iSCSI target using iPXE</h1>
<ol>
<li>Boot machine into iPXE kernel
<li>Press Ctrl-B to start iPXE command line
<li>
<p>Obtain an IP address from DHCP</p><pre style="background: #f1f0f0; color: #000000">iPXE> <font style="background-color: #ffff00">dhcp net0</font></pre>
<ol><!--EndFragment--></ol>
<li>
<p>Supply chap information if necessary:</p><pre style="background: #f1f0f0; color: #000000">iPXE> <font style="background-color: #ffff00">login</font></pre>
<ol><!--EndFragment--></ol>
<li>
<p>Boot from iSCSI target:</p><pre style="background: #f1f0f0; color: #000000"><span style="color: #bb7977; font-weight: bold">iPXE></span> <font style="background-color: #ffff00">sanboot</font> iscsi<span style="color: #806030">:nas.example.com</span><span style="color: #806030">:</span><span style="color: #806030">:</span><span style="color: #806030">:</span><span style="color: #806030">:</span>iqn<span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">2011</span>-<span style="color: #c00000">03</span><span style="color: #400000; font-weight: bold">.</span>example<span style="color: #400000; font-weight: bold">.com</span><span style="color: #806030">:<font color="#000000">my-iscsi</font></span></pre></li></ol>
<h1>Boot from iSCSI using PXE using HTTP</h1>
<ol>
<li>Boot from PXE
<li>Use the pxe menu configuration to boot iSCSI target introduced in section “Prepare environment to install and boot from iSCSI target”</li></ol>
<h1>Reference</h1>
<ol>
<li>User-specific boot menus. URL: <a href="http://etherboot.org/wiki/appnotes/authmenus">http://etherboot.org/wiki/appnotes/authmenus</a>
<li>Installing Windows Server 2008 to an iSCSI target. URL: <a href="http://etherboot.org/wiki/sanboot/win2k8_iscsi_install">http://etherboot.org/wiki/sanboot/win2k8_iscsi_install</a></li></ol> Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com0tag:blogger.com,1999:blog-38385155.post-87307624635554150932011-11-17T16:01:00.001+08:002011-11-17T16:01:30.868+08:00iPXE: Boot iPXE firmware<p><a href="http://ipxe.org/">iPXE</a> (formerly known as <a href="http://etherboot.org/wiki/start">gPXE</a>) is an open source network boot firmware. The most obvious reason of using iPXE is the ability to download image from HTTP and Boot ISCSI target but not limited to that. For illustration purpose, this topic focus on chain load usage of iPXE image.</p> <h1>Prepare iPXE image</h1> <ol> <li>Get a copy of the iPXE source<br><pre style="background: #f1f0f0; color: #000000"># <font style="background-color: #ffff00">git clone git<span style="color: #806030">:</span><span style="color: #40015a">/</span><span style="color: #40015a">/git.ipxe.org/ipxe.git</span></font></pre></li>
<li>Build chain load iPXE image:<br><pre style="background: #f1f0f0; color: #000000"><span style="color: #bb7977; font-weight: bold"># <font style="background-color: #ffff00">cd</font></span><font style="background-color: #ffff00"> ipxe
</font># <font style="background-color: #ffff00">make <span style="color: #40015a">src/bin/undionly.kpxe</span></font></pre></li>
<li>Chain load iPXE image file:<br><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># <font style="background-color: #ffffff">ls -algG src/bin/undionly.kpxe -al</font></span>
-rw-r--r-- <span style="color: #c00000">1</span> <span style="color: #c00000">62326</span> Nov <span style="color: #c00000">15</span> <span style="color: #c00000">11</span><span style="color: #806030">:</span><span style="color: #c00000">38</span> <span style="color: #40015a">src/bin/<font style="background-color: #ffff00">undionly.kpxe</font></span></pre></li>
<li>Refer to: <a href="http://ipxe.org/download">http://ipxe.org/download</a> for more information on preparing iPXE image.</li></ol>
<h1>Chain loading iPXE from PXE ROM</h1>
<ol>
<li>Deploy iPXE image to TFTP boot folder:<br><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># <font style="background-color: #ffff00">cp src/bin/undionly.kpxe /var/lib/tftpboot</font></span></pre></li>
<li>Change dhcp configuration file to boot iPXE image:<br><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># vi /etc/dhcp/dhcpd.conf</span>
next-server <span style="color: #e34adc"><</span>tftp-server<span style="color: #e34adc">></span><span style="color: #806030">;</span>
filename <span style="color: #e60000">"<font style="background-color: #ffff00">undionly.kpxe</font>"</span><span style="color: #806030">;</span></pre></li>
<li>Restart dhcpd service:<br><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># <strong>service dhcpd restart</strong></span></pre></li>
<li>Power on machine and boot to network using existing PXE ROM. You should see the machine will boot into iPXE shell after PXE ROM:<br><br><a href="http://lh4.ggpht.com/-pB9z9_Lh4CQ/TsS_PXHqb5I/AAAAAAAAAyc/gaikSuH0RUE/s1600-h/MS-DOS-2011-11-15-11-49-38%25255B4%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="MS-DOS-2011-11-15-11-49-38" border="0" alt="MS-DOS-2011-11-15-11-49-38" src="http://lh3.ggpht.com/-PjMPZqGaLr0/TsS_QVDZ_qI/AAAAAAAAAyk/AkKBvWcZrWE/MS-DOS-2011-11-15-11-49-38_thumb.png?imgmax=800" width="724" height="404"></a></li>
<li>Press Ctrl-B for enter iPXE cli mode.</li>
<li>Type help to get a list of available commands:<br><a href="http://lh5.ggpht.com/-chr0Dv-Glx0/TsS_RDCoxEI/AAAAAAAAAys/47U55AovTMA/s1600-h/MS-DOS-2011-11-17-15-08-47%25255B3%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="MS-DOS-2011-11-17-15-08-47" border="0" alt="MS-DOS-2011-11-17-15-08-47" src="http://lh5.ggpht.com/-2QOxBOKCLtE/TsS_SFjIqaI/AAAAAAAAAy0/pvBhXUphOGU/MS-DOS-2011-11-17-15-08-47_thumb%25255B1%25255D.png?imgmax=800" width="724" height="404"></a></li></ol>
<h1>iPXE options for DHCP</h1>
<ol>
<li>Construct a list of iPXE options for DHCP configuration:<br><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># cat <font style="background-color: #ffff00">/etc/dhcp/ipxe.options</font></span>
<span style="color: #c34e00"># iPXE specific options</span>
option space ipxe<span style="color: #806030">;</span>
option ipxe-encap-opts code <span style="color: #c00000">175</span> <span style="color: #44aadd">=</span> encapsulate ipxe<span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>priority code <span style="color: #c00000">1</span> <span style="color: #44aadd">=</span> signed integer <span style="color: #c00000">8</span><span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>keep-san code <span style="color: #c00000">8</span> <span style="color: #44aadd">=</span> unsigned integer <span style="color: #c00000">8</span><span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>skip-san-boot code <span style="color: #c00000">9</span> <span style="color: #44aadd">=</span> unsigned integer <span style="color: #c00000">8</span><span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>no-pxedhcp code <span style="color: #c00000">176</span> <span style="color: #44aadd">=</span> unsigned integer <span style="color: #c00000">8</span><span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>bus-id code <span style="color: #c00000">177</span> <span style="color: #44aadd">=</span> string<span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>bios-drive code <span style="color: #c00000">189</span> <span style="color: #44aadd">=</span> unsigned integer <span style="color: #c00000">8</span><span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>username code <span style="color: #c00000">190</span> <span style="color: #44aadd">=</span> string<span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>password code <span style="color: #c00000">191</span> <span style="color: #44aadd">=</span> string<span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>reverse-username code <span style="color: #c00000">192</span> <span style="color: #44aadd">=</span> string<span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>reverse-password code <span style="color: #c00000">193</span> <span style="color: #44aadd">=</span> string<span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>version code <span style="color: #c00000">235</span> <span style="color: #44aadd">=</span> string<span style="color: #806030">;</span>
option iscsi-initiator-iqn code <span style="color: #c00000">203</span> <span style="color: #44aadd">=</span> string<span style="color: #806030">;</span>
<span style="color: #c34e00"># Feature indicators</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>pxeext code <span style="color: #c00000">16</span> <span style="color: #44aadd">=</span> unsigned integer <span style="color: #c00000">8</span><span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>iscsi code <span style="color: #c00000">17</span> <span style="color: #44aadd">=</span> unsigned integer <span style="color: #c00000">8</span><span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>aoe code <span style="color: #c00000">18</span> <span style="color: #44aadd">=</span> unsigned integer <span style="color: #c00000">8</span><span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>http code <span style="color: #c00000">19</span> <span style="color: #44aadd">=</span> unsigned integer <span style="color: #c00000">8</span><span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>https code <span style="color: #c00000">20</span> <span style="color: #44aadd">=</span> unsigned integer <span style="color: #c00000">8</span><span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>tftp code <span style="color: #c00000">21</span> <span style="color: #44aadd">=</span> unsigned integer <span style="color: #c00000">8</span><span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>ftp code <span style="color: #c00000">22</span> <span style="color: #44aadd">=</span> unsigned integer <span style="color: #c00000">8</span><span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>dns code <span style="color: #c00000">23</span> <span style="color: #44aadd">=</span> unsigned integer <span style="color: #c00000">8</span><span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>bzimage code <span style="color: #c00000">24</span> <span style="color: #44aadd">=</span> unsigned integer <span style="color: #c00000">8</span><span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>multiboot code <span style="color: #c00000">25</span> <span style="color: #44aadd">=</span> unsigned integer <span style="color: #c00000">8</span><span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>slam code <span style="color: #c00000">26</span> <span style="color: #44aadd">=</span> unsigned integer <span style="color: #c00000">8</span><span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>srp code <span style="color: #c00000">27</span> <span style="color: #44aadd">=</span> unsigned integer <span style="color: #c00000">8</span><span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>nbi code <span style="color: #c00000">32</span> <span style="color: #44aadd">=</span> unsigned integer <span style="color: #c00000">8</span><span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>pxe code <span style="color: #c00000">33</span> <span style="color: #44aadd">=</span> unsigned integer <span style="color: #c00000">8</span><span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>elf code <span style="color: #c00000">34</span> <span style="color: #44aadd">=</span> unsigned integer <span style="color: #c00000">8</span><span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>comboot code <span style="color: #c00000">35</span> <span style="color: #44aadd">=</span> unsigned integer <span style="color: #c00000">8</span><span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>efi code <span style="color: #c00000">36</span> <span style="color: #44aadd">=</span> unsigned integer <span style="color: #c00000">8</span><span style="color: #806030">;</span>
option ipxe<span style="color: #400000; font-weight: bold">.</span>fcoe code <span style="color: #c00000">37</span> <span style="color: #44aadd">=</span> unsigned integer <span style="color: #c00000">8</span><span style="color: #806030">;</span></pre></li>
<li>These options are useful for advance configuration of iPXE booting.</li></ol>
<h1>Prevent infinite iPXE boot</h1>
<ol>
<li>You will notice that booting undionly.kpxe basically just boot iPXE firmware. The iPXE will keep obtain iPXE image from DHCP server and boot itself infinitely. To instruct iPXE to do other work once iPXE has been loaded, make changes to dhcpd.conf:<br><pre style="background: #f1f0f0; color: #000000">include <span style="color: #e60000">"</span><span style="color: #40015a"><font style="background-color: #ffff00">/etc/dhcp/ipxe.options</font></span><span style="color: #e60000">"</span><span style="color: #806030">;</span>
next-server <span style="color: #e34adc"><</span>tftp-server<span style="color: #e34adc">></span><span style="color: #806030">;</span>
<span style="color: #400000; font-weight: bold">if</span> <font style="background-color: #ffff00">exists user-class and option user-class <span style="color: #44aadd">=</span> <span style="color: #e60000">"iPXE"</span></font> <span style="color: #806030">{</span>
filename <span style="color: #e60000">"http:</span><span style="color: #40015a">/</span><span style="color: #40015a">/boot-server/boot.ipxe</span><span style="color: #e60000">"</span><span style="color: #806030">;</span>
<span style="color: #806030">}</span> <span style="color: #400000; font-weight: bold">else</span> <span style="color: #806030">{</span>
filename <span style="color: #e60000">"undionly.kpxe"</span><span style="color: #806030">;</span>
<span style="color: #806030">}</span></pre></li>
<li>Restart dhcpd service:<br><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># <font style="background-color: #ffff00">service dhcpd restart</font></span>
Shutting down dhcpd<span style="color: #806030">:</span> <span style="color: #806030">[</span> OK <span style="color: #806030">]</span>
Starting dhcpd<span style="color: #806030">:</span> <span style="color: #806030">[</span> OK <span style="color: #806030">]</span></pre></li>
<li>The above changes will first boot iPXE image (undionly.kpxe), followed by booting a iPXE script from http service.</li>
<li>The iPXE script (boot.ipxe) can be as simple as:<br><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># <font style="background-color: #ffff00">cat boot.ipxe</font></span>
<span style="color: #c34e00">#!</span><span style="color: #007997">ipxe</span>
login</pre></li>
<li>Here is an output screen of boot.ipxe:<br><br><a href="http://lh6.ggpht.com/-FW0d1e1Qs7I/TsS_TEOhiNI/AAAAAAAAAy8/ZwAfwtJnE2E/s1600-h/MS-DOS-2011-11-17-15-26-11%25255B3%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="MS-DOS-2011-11-17-15-26-11" border="0" alt="MS-DOS-2011-11-17-15-26-11" src="http://lh5.ggpht.com/-0N3dtzZ1ZNo/TsS_UDVI78I/AAAAAAAAAzE/j4101Vlo-8U/MS-DOS-2011-11-17-15-26-11_thumb%25255B1%25255D.png?imgmax=800" width="724" height="404"></a></li></ol>
<h1>Speeding iPXE boot</h1>
<p>iPXE booting will wait for replies from a ProxyDHCP server before booting. If you are not using a ProxyDHCP server, then this creates an unnecessary delay of several seconds. You can eliminate this delay by adding an option in dhcpd.conf:</p><pre style="background: #f1f0f0; color: #000000">option ipxe<span style="color: #400000; font-weight: bold">.</span>no-pxedhcp <span style="color: #c00000">1</span><span style="color: #806030">;</span></pre>
<h1>Simple iPXE Commands</h1>
<ol>
<li>Obtain an IP for interface net0:<br><pre style="background: #f1f0f0; color: #000000">IPXE<span style="color: #e34adc">></span> <font style="background-color: #ffffff"><font style="background-color: #ffff00">dhcp</font> net0</font></pre></li>
<li>Interactive Configuration Tools:<br><pre style="background: #f1f0f0; color: #000000">IPXE<span style="color: #e34adc">></span> <font style="background-color: #ffff00">config</font>
</pre><br><a href="http://lh6.ggpht.com/-q4b9DxFoQcc/TsS_VKVxk9I/AAAAAAAAAzM/ukvABUKMxlI/s1600-h/MS-DOS-2011-11-15-14-38-44%25255B4%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="MS-DOS-2011-11-15-14-38-44" border="0" alt="MS-DOS-2011-11-15-14-38-44" src="http://lh4.ggpht.com/-W1hx8d1qmPQ/TsS_WP87KeI/AAAAAAAAAzU/jnmZQD9xWUQ/MS-DOS-2011-11-15-14-38-44_thumb.png?imgmax=800" width="724" height="404"></a></li>
<li>Boot an image<br><pre style="background: #f1f0f0; color: #000000">IPXE<span style="color: #e34adc">></span> <font style="background-color: #ffff00">chain</font> pxelinux<span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">0</span></pre></li>
<li>
<p>Boot a ISCSI target:</p><pre style="background: #f1f0f0; color: #000000">IPXE<span style="color: #e34adc">></span> <font style="background-color: #ffff00">sanboot</font> iscsi<span style="color: #806030">:</span><span style="color: #e34adc"><</span>ip-address<span style="color: #e34adc">></span><span style="color: #806030">:</span><span style="color: #806030">:</span><span style="color: #806030">:</span><span style="color: #806030">:</span>iqn<span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">2011</span>-<span style="color: #c00000">03</span><span style="color: #400000; font-weight: bold">.</span>example<span style="color: #400000; font-weight: bold">.</span>org<span style="color: #806030">:</span>my-target</pre></li>
<ol><!--EndFragment--></ol>
<li>You may aggregate iPXE commands to form a iPXE script file:<br><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00">#!</span><span style="color: #007997">ipxe</span>
login
<span style="color: #bb7977; font-weight: bold">echo</span> ${username}
<span style="color: #bb7977; font-weight: bold">echo</span> ${password}
sanboot iscsi<span style="color: #806030">:</span><span style="color: #e34adc"><</span>ip-address<span style="color: #e34adc">></span><span style="color: #806030">:</span><span style="color: #806030">:</span><span style="color: #806030">:</span><span style="color: #806030">:</span>iqn<span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">2011</span>-<span style="color: #c00000">03</span><span style="color: #400000; font-weight: bold">.</span>example<span style="color: #400000; font-weight: bold">.</span>org<span style="color: #806030">:</span>my-target</pre></li></ol>
<h1>Chain loading iPXE from PXELinux</h1>
<ol>
<li>If you have deployed PXELinux in your network and want to preserve it while enjoying the iPXE’s extra functionalities, you may chain load iPXE from PXELinux’s configuration</li>
<li>PXELinux requires boot image file to have suffix of .0. Make a symbolic link reference:<br><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># <font style="background-color: #ffff00">ln -s undionly.kpxe undionly.0</font></span>
<span style="color: #c34e00"># ls -algG undionly*</span>
lrwxrwxrwx <span style="color: #c00000">1</span> <span style="color: #c00000">13</span> Nov <span style="color: #c00000">12</span> <span style="color: #c00000">10</span><span style="color: #806030">:</span><span style="color: #c00000">35</span> <font style="background-color: #ffff00">undionly<span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">0</span> -<span style="color: #e34adc">></span> undionly<span style="color: #400000; font-weight: bold">.</span>kpxe</font>
-rw-r--r-- <span style="color: #c00000">1</span> <span style="color: #c00000">55168</span> Nov <span style="color: #c00000">12</span> <span style="color: #c00000">09</span><span style="color: #806030">:</span><span style="color: #c00000">54</span> undionly<span style="color: #400000; font-weight: bold">.</span>kpxe</pre></li>
<li>Add a menu entry to PXELinux to boot iPXE image:<br><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># vi pxelinux.cfg/default</span>
LABEL iPXE
<font style="background-color: #ffff00">kernel undionly<span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">0</span></font></pre></li>
<li>You may now boot iPXE from PXELinux menu</li></ol>
<h1>Reference</h1>
<ol>
<li>Network-booting machines over HTTP. URL: <a href="http://jpmens.net/2011/07/18/network-booting-machines-over-http/">http://jpmens.net/2011/07/18/network-booting-machines-over-http/</a>
<li>iPXE - open source boot firmware. URL: <a href="http://ipxe.org/">http://ipxe.org/</a></li></ol> Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com0tag:blogger.com,1999:blog-38385155.post-82360639075076703632011-11-13T13:47:00.001+08:002011-11-13T13:48:11.895+08:00Make host based USB printer work with OpenWrt’s P910nd print server<p>A host-based printer like HP-LaserJet 1020 needs to download a firmware every time when boot up or else it won’t print. These printers works fine when connect to Windows that has drivers install. For Linux, <a href="http://foo2zjs.rkkda.com/">foo2zjs</a> may help upload the firmware to printer by USB hotplug daemon.</p> <p>It is very hard to make host-based printers work with networked print server appliance as the printer won’t work without firmware. Most print server appliance don’t have firmware ready or it won’t upload the firmware to printer.</p> <p>Some print server like D-Link DPR 1061 claims to work with host based printer but it is a different story. A software (PS-Link or PS-Wizard) is required to deploy on workstations in network to act as USB redirector to send firmware to printer. This isn’t a favor solution as it increase deployment effort on workstation.</p> <p>This topic use TP-Link 1043ND wireless router as hardware device to act as printer server alternative to those branded printer server in market. The TP-Link 1043ND is patched with <a href="http://www.gargoyle-router.com/phpbb/viewtopic.php?f=6&t=1857">Gargoyle WRT</a> (backed by <a href="https://openwrt.org/">OpenWrt</a>). A small printer daemon <a href="http://p910nd.sourceforge.net/">p910nd</a> is installed in the device to serve as printer server for network.</p> <p>Here are some brief steps to install and configure:</p> <ol> <li>Find a low cost router that has few RJ45 network sockets (usually 4 LAN port + 1 WAN port) and USB port <li>Patch the device with OpenWrt or Gargoyle Wrt <li>Install p910nd daemon <li>Download Printer Firmware <li>Configure USB hotplug daemon to send firmware to printer <li>Add a printer device in Windows / Linux workstation that print to Standard TCP/IP port (e.g.: Port 9100)</li></ol> <h1>Print Server Device: TP-Link 1043ND</h1> <p>In this article, A gigabit wireless router: TP-Link 1043ND is used as example. The router has 4 LAN + 1 WAN ports and a USB port mainly for flash drive. We will make the USB port work with USB host based printer.</p> <h1>Printer: HP Laser Jet 1020</h1> <p>HP laser jet 1020 is a USB host based printer that is not friendly to many network print server in the market.</p> <h1>Patch with Gargoyle WRT</h1> <p><a href="http://www.gargoyle-router.com/download.php">Download suitable flash firmware</a> for TP-Link 1043ND from Gargoyle. Follow instruction to patch the device. After finish patching, do some simple configuration:</p> <ol> <li>Set the root access password <li>Set IP address for the device (e.g.: 192.168.1.1) <li>Enable SSH access to the device (e.g.: port 22) <li>Try using SSH console like Putty to access the device</li></ol> <h1>Install software on device</h1> <ol> <li>SSH into device. e.g.: ssh 192.168.1.1 <li>Enter “root” as username and supply with password <li>Update OpenWRT software packages:<br><pre style="background: #ffffff; color: #000000">root@Gargoyle<span style="color: #808030">:</span>~<span style="color: #696969"># <font style="background-color: #ffff00">opkg update</font></span></pre>
<li>Install Kernel modules for USB Printer support:<br><pre style="background: #ffffff; color: #000000">root@Gargoyle<span style="color: #808030">:</span>~<span style="color: #696969"># <font style="background-color: #ffff00">opkg install kmod-usb-printer</font></span></pre>
<li>Install printer server:<br><pre style="background: #ffffff; color: #000000">root@Gargoyle<span style="color: #808030">:</span>~<span style="color: #696969"># <font style="background-color: #ffff00">opkg install p910nd</font></span></pre></li></ol>
<h1>Configure Printer Server: P910nd</h1>
<ol>
<li>
<p>Enable p910nd daemon that sustain for device fresh booting:</p><pre style="background: #ffffff; color: #000000"><a href="mailto:root@Gargoyle">root@Gargoyle</a><span style="color: #808030">:</span>~<span style="color: #696969"># <font style="background-color: #ffff00">/etc/init.d/p910nd enable</font></span></pre>
<li>Start p910nd daemon for current session<br><pre style="background: #ffffff; color: #000000">root@Gargoyle<span style="color: #808030">:</span>~<span style="color: #696969"># <font style="background-color: #ffff00">/etc/init.d/p910nd start</font></span></pre></li></ol>
<h1>Printer Firmware</h1>
<ol>
<li>Download a suitable printer firmware (e.g.: <a href="http://oleg.wl500g.info/hplj/)">http://oleg.wl500g.info/hplj/)</a><br><pre style="background: #ffffff; color: #000000">root@Gargoyle<span style="color: #808030">:</span>~<span style="color: #696969"># <font style="background-color: #ffff00">wget -o /usr/lib/sihp1020.dl </font></span><font style="background-color: #ffff00"><span style="color: #5555dd"><a href="http://oleg.wl500g.info/hplj/sihp1020.dlroot@Gargoyle">http://oleg.wl500g.info/hpl</span>
<span style="color: #40015a">j/sihp1020.dl<font style="background-color: #ffff00"><font style="background-color: #ffffff"><br>root@Gargoyle</a><span style="color: #808030">:</span>~<span style="color: #696969"># <font style="background-color: #ffff00">ls -al1 /usr/lib/si*</font></span>
-rw-r--r-- <span style="color: #008c00">1</span> <span style="color: #008c00">126151</span> Nov <span style="color: #008c00">12</span> <span style="color: #008c00">16</span><span style="color: #808030">:</span><span style="color: #008c00">31</span> <span style="color: #40015a">/usr/lib/sihp1020.dl</span></font></font></span></font></pre>
<li>Create a USB hotplug script file (/etc/hotplug.d/20-hpjl1020) for printer HP1020:<br><pre style="background: #ffffff; color: #000000"><a href="mailto:root@Gargoyle">root@Gargoyle<span style="color: #808030">:~</span></a><span style="color: #696969"># <font style="background-color: #ffff00">cat /etc/hotplug.d/usb/20-hplj1020</font></span>
<span style="color: #696969">#!</span><span style="color: #007997">/bin/sh</span>
<span style="color: #797997">FIRMWARE</span><span style="color: #808030">=</span><span style="color: #0000e6">"</span><span style="color: #40015a"><font style="background-color: #ffff00">/usr/lib/sihp1020.dl</font></span><span style="color: #0000e6">"</span>
<span style="color: #797997">DEVICE</span><span style="color: #808030">=</span><span style="color: #40015a"><font style="background-color: #ffff00">/dev/lp0</font></span>
<span style="color: #797997">LOGFILE</span><span style="color: #808030">=</span><span style="color: #40015a">/var/log/hp</span>
<span style="color: #800000; font-weight: bold">if</span> <span style="color: #808030">[</span> <span style="color: #0000e6">"</span><span style="color: #797997">$PRODUCT</span><span style="color: #0000e6">"</span> <span style="color: #44aadd">=</span> <span style="color: #0000e6">"</span><span style="color: #40015a"><font style="background-color: #ffff00">3f0/2b17/100</font></span><span style="color: #0000e6">"</span> <span style="color: #44aadd">-a</span> <span style="color: #0000e6">"</span><span style="color: #797997">$ACTION</span><span style="color: #0000e6">"</span> <span style="color: #44aadd">=</span> <span style="color: #0000e6">"<font style="background-color: #ffff00">add</font>"</span> <span style="color: #808030">]</span>
<span style="color: #800000; font-weight: bold">then</span>
<span style="color: #800000; font-weight: bold">for</span> i <span style="color: #800000; font-weight: bold">in</span> $<span style="color: #800080">(</span>seq <span style="color: #008c00">30</span><span style="color: #800080">)</span><span style="color: #800080">;</span> <span style="color: #800000; font-weight: bold">do</span>
<span style="color: #800000; font-weight: bold">if</span> <span style="color: #808030">[</span> <span style="color: #44aadd">-c</span> <span style="color: #797997">$DEVICE</span> <span style="color: #808030">]</span><span style="color: #800080">;</span> <span style="color: #800000; font-weight: bold">then</span>
<span style="color: #bb7977; font-weight: bold">echo</span> <span style="color: #0000e6">"$(date) : Sending firmware to printer."</span> <span style="color: #e34adc">></span> <span style="color: #797997">$LOGFILE</span>
<font style="background-color: #ffff00">cat <span style="color: #797997">$FIRMWARE</span> <span style="color: #e34adc">></span> <span style="color: #797997">$DEVICE</span></font>
<span style="color: #bb7977; font-weight: bold">echo</span> <span style="color: #0000e6">"$(date) : done."</span> <span style="color: #e34adc">></span><span style="color: #e34adc">></span> <span style="color: #797997">$LOGFILE</span>
<span style="color: #bb7977; font-weight: bold">exit</span>
<span style="color: #800000; font-weight: bold">fi</span>
sleep <span style="color: #008c00">1</span>
<span style="color: #800000; font-weight: bold">done</span>
<span style="color: #800000; font-weight: bold">fi</span></pre>
<li>You may adjust parameters in the script file to suit you environment.
<li>Product ID: “3f0/2b17/100” is the printer ID for my HP Laser Jet 1020. Change it to suitable ID for the printer you attempt to connect. You may attempt to grep the printer ID by patching the script file to output printer id to a log file.</li></ol>
<h1>Test Printer Firmware</h1>
<ol>
<li>Plug printer USB cable to device and check log file:<br><pre style="background: #ffffff; color: #000000">root@Gargoyle<span style="color: #808030">:</span>~<span style="color: #696969"># cat /var/log/hp</span></pre></li>
<li>The log file consist some information that is useful for troubleshooting</li>
<li>Power off both printer and device</li>
<li>Power on both printer and device</li>
<li>Check log file again to make sure firmware may send to printer properly</li></ol>
<h1>Print from Windows</h1>
<ol>
<li>Logon to Windows workstation and add a local printer:<br><a href="http://lh3.ggpht.com/-UEv0_YuzZtM/Tr9ZvFpTBoI/AAAAAAAAAw4/JAOvz2IImFs/s1600-h/1%25255B3%25255D.png"><img title="1" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="1" src="http://lh6.ggpht.com/-ixk-tOnmvKQ/Tr9Zv-2PMlI/AAAAAAAAAxA/juW4SPk9H6E/1_thumb%25255B1%25255D.png?imgmax=800" width="632" height="462"></a></li>
<li>Create a new Standard TCP/IP port for the printer:<br><a href="http://lh4.ggpht.com/-AUI3vWsihkY/Tr9Zw1HJSrI/AAAAAAAAAxI/Q6X0Z-EnRcw/s1600-h/2%25255B3%25255D.png"><img title="2" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="2" src="http://lh4.ggpht.com/-IGZxeTwF6gc/Tr9ZxwxZ8WI/AAAAAAAAAxQ/jz8LtxacN4o/2_thumb%25255B1%25255D.png?imgmax=800" width="632" height="462"></a></li>
<li>Enter IP Address for the printer: e.g.: 192.168.1.1<br><a href="http://lh5.ggpht.com/-QhR9dnAAlhE/Tr9ZyeSMmWI/AAAAAAAAAxY/kDtaSi1m2TE/s1600-h/3%25255B3%25255D.png"><img title="3" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="3" src="http://lh4.ggpht.com/-r0Vo9Nu3KkQ/Tr9ZzaiTCRI/AAAAAAAAAxg/io6S_1VtszM/3_thumb%25255B1%25255D.png?imgmax=800" width="632" height="462"></a></li>
<li>Specify additional information for the connection:<br><a href="http://lh3.ggpht.com/-L5eOu6NP0ks/Tr9Z0k353xI/AAAAAAAAAxo/d6UR5OrDuuw/s1600-h/4%25255B3%25255D.png"><img title="4" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="4" src="http://lh3.ggpht.com/-o6jMrlc-ViI/Tr9Z1p9Nz4I/AAAAAAAAAxw/c65R4aCq-74/4_thumb%25255B1%25255D.png?imgmax=800" width="632" height="462"></a></li>
<li>Choose “Raw” protocol and set port number. e.g.: 9100<br><a href="http://lh5.ggpht.com/-tBxo2v4J_9w/Tr9Z2amkueI/AAAAAAAAAx4/R7OypZdM7Vk/s1600-h/5%25255B3%25255D.png"><img title="5" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="5" src="http://lh5.ggpht.com/-MziMctZfljk/Tr9Z3Jcd4SI/AAAAAAAAAyA/nSr5sa9Ytf8/5_thumb%25255B1%25255D.png?imgmax=800" width="492" height="520"></a></li>
<li>Pick a suitable printer driver:<br><a href="http://lh3.ggpht.com/-oMikHBSrQ98/Tr9Z4MHznvI/AAAAAAAAAyI/Dh_UMJ9l7O0/s1600-h/6%25255B3%25255D.png"><img title="6" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="6" src="http://lh3.ggpht.com/-geVDBYuWxzM/Tr9Z5F1TPqI/AAAAAAAAAyQ/wc5zYCYbH7M/6_thumb%25255B1%25255D.png?imgmax=800" width="632" height="462"></a></li>
<li>You may try to print a test page to the printer.</li></ol>
<h1></h1>
<h1>Reference</h1>
<ol>
<li>p910nd Printer Server. URL: <a href="http://wiki.openwrt.org/doc/howto/p910nd.server">http://wiki.openwrt.org/doc/howto/p910nd.server</a></li></ol> Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com5tag:blogger.com,1999:blog-38385155.post-39695770547285661902011-11-11T17:33:00.001+08:002011-11-11T17:33:57.650+08:00Linux: Install Conexant USB modem <p>This article showing how to install Conexant USB modem on Linux machine. The Conexant USB module has a RJ11 socket at one end for phone line connection and USB connector on another end to plug into USB port:</p> <p><img style="display: block; float: none; margin-left: auto; margin-right: auto" src="http://www.sella.co.nz/images/thumb/q/r/5/4z7qr5-210x158-bg.jpg"></p> <h1>Identify modem model</h1> <ol> <li>Plug Conexant USB modem into machine.</li> <li>Identity modem model:<br><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># <font style="background-color: #ffff00">lsusb</font> </span>
Bus <span style="color: #c00000">005</span> Device <span style="color: #c00000">001</span><span style="color: #806030">:</span> ID 1d6b<span style="color: #806030">:</span><span style="color: #c00000">0001</span> Linux Foundation <span style="color: #c00000">1</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">1</span> root hub
<font style="background-color: #ffff00">Bus <span style="color: #c00000">004</span> Device <span style="color: #c00000">002</span><span style="color: #806030">:</span> ID <span style="color: #c00000">0572</span><span style="color: #806030">:</span><span style="color: #c00000">1324</span> Conexant Systems <span style="color: #806030">(</span>Rockwell<span style="color: #806030">)</span>, Inc<span style="color: #400000; font-weight: bold">.</span>
</font>Bus <span style="color: #c00000">004</span> Device <span style="color: #c00000">001</span><span style="color: #806030">:</span> ID 1d6b<span style="color: #806030">:</span><span style="color: #c00000">0001</span> Linux Foundation <span style="color: #c00000">1</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">1</span> root hub
Bus <span style="color: #c00000">003</span> Device <span style="color: #c00000">001</span><span style="color: #806030">:</span> ID 1d6b<span style="color: #806030">:</span><span style="color: #c00000">0001</span> Linux Foundation <span style="color: #c00000">1</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">1</span> root hub
Bus <span style="color: #c00000">002</span> Device <span style="color: #c00000">001</span><span style="color: #806030">:</span> ID 1d6b<span style="color: #806030">:</span><span style="color: #c00000">0001</span> Linux Foundation <span style="color: #c00000">1</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">1</span> root hub
Bus <span style="color: #c00000">001</span> Device <span style="color: #c00000">001</span><span style="color: #806030">:</span> ID 1d6b<span style="color: #806030">:</span><span style="color: #c00000">0002</span> Linux Foundation <span style="color: #c00000">2</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">0</span> root hub</pre></li></ol>
<h1><font size="1" face="Courier New"></font>Download modem driver</h1>
<ol>
<li>Visit <a href="http://www.linuxant.com/">http://www.linuxant.com</a> to download the modem driver.</li>
<li>The modem ID in this example is 0572:1324, so DGC softmodem is the suitable driver.</li>
<li>For illustration purpose, this example use dgcmodem-1.13-1.i386.rpm.zip</li></ol>
<h1>Build modem driver</h1>
<ol>
<li>Prepare to build modem driver. You may skip some of the following rpm package depends on your system: <br><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># <font style="background-color: #ffff00">yum install dgcmodem-1.13-1.i386.rpm</font> </span>
<span style="color: #c34e00"># <font style="background-color: #ffff00">yum install kernel-devel-2.6.33</font></span></pre></li>
<li>Configure modem driver:<br><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># <font style="background-color: #ffff00">/usr/sbin/dgcconfig</font></span></pre></li>
<li>Check modem installation:<br><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># <font style="background-color: #ffff00">ls /dev/ttyACM* -al</font> </span>
crw-rw---- <span style="color: #c00000">1</span> root dialout <span style="color: #c00000">166</span>, <span style="color: #c00000">0</span> Jan <span style="color: #c00000">8</span> <span style="color: #c00000">15</span><span style="color: #806030">:</span><span style="color: #c00000">04</span> <span style="color: #40015a">/dev/ttyACM0</span>
<span style="color: #c34e00"># <font style="background-color: #ffff00">ls /dev/modem -al</font> </span>
lrwxrwxrwx <span style="color: #c00000">1</span> root root <span style="color: #c00000">7</span> Jan <span style="color: #c00000">8</span> <span style="color: #c00000">15</span><span style="color: #806030">:</span><span style="color: #c00000">04</span> <span style="color: #40015a">/dev/modem</span> -<span style="color: #e34adc">></span> ttyACM0</pre></li></ol>
<h1>Reference</h1>
<ol>
<li>Linuxant. <a href="http://www.linuxant.com/">http://www.linuxant.com</a></li></ol> Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com0tag:blogger.com,1999:blog-38385155.post-74867177228078718782011-11-11T17:16:00.001+08:002012-05-19T11:13:17.218+08:00BackTrack 5: Accelerate pyrit with NVIDIA GPU processor<p><a href="http://code.google.com/p/pyrit/">Pyrit</a> is a cryptography tool that may decrypt WPA/WPA2 capture handshake in 802.11 wireless traffic (WIFI) using brute force approach. The original Pyrit performs calculation using CPU cores. This article introduces how to compile Pyrit to facilitate NVIDIA GPUs that may boost performance for 10x to 20x or even more depends on GPU cores and models.</p> <h1>Download NVIDIA driver and toolkit</h1> <ol> <li>Download NVIDIA drivers according to your CPU architecture: <ul> <li>32 bit: <a href="http://developer.download.nvidia.com/compute/cuda/4_0_rc2/drivers/devdriver_4.0_linux_32_270.40.run">http://developer.download.nvidia.com/compute/cuda/4_0_rc2/drivers/devdriver_4.0_linux_32_270.40.run</a></li></ul> <ul> <li>64 bit: <a href="http://developer.download.nvidia.com/compute/cuda/4_0_rc2/drivers/devdriver_4.0_linux_64_270.40.run">http://developer.download.nvidia.com/compute/cuda/4_0_rc2/drivers/devdriver_4.0_linux_64_270.40.run</a></li></ul> <li>Next, download the CUDA toolkit, according to your CPU architecture: <ul> <li>32 bit: <a href="http://www.nvidia.com/object/thankyou.html?url=/compute/cuda/4_0_rc2/toolkit/cudatoolkit_4.0.13_linux_32_ubuntu10.10.run">http://www.nvidia.com/object/thankyou.html?url=/compute/cuda/4_0_rc2/toolkit/cudatoolkit_4.0.13_linux_32_ubuntu10.10.run</a> </li></ul> <ul> <li>64 bit: <a href="http://www.nvidia.com/object/thankyou.html?url=/compute/cuda/4_0_rc2/toolkit/cudatoolkit_4.0.13_linux_64_ubuntu10.10.run">http://www.nvidia.com/object/thankyou.html?url=/compute/cuda/4_0_rc2/toolkit/cudatoolkit_4.0.13_linux_64_ubuntu10.10.run</a></li></ul></li></ol> <h1>Disable Kernel Nouveau</h1> <p>Install NVIDIA display driver may fail if kernel Nouveau is running, the kernel should disable first:</p> <ol> <li>Disable Kernel Nouveau:<br><pre style="background: #f1f0f0; color: #000000">root@bt<span style="color: #806030">:</span>~<span style="color: #c34e00"># <font style="background-color: #ffff00">echo options nouveau modeset=0 | tee -a /etc/modprobe.d/nouveau-kms.conf</font></span>
root@bt<span style="color: #806030">:</span>~<span style="color: #c34e00"># <font style="background-color: #ffff00">update-initramfs -u</font></span>
update-initramfs<span style="color: #806030">:</span> Generating <span style="color: #40015a">/boot/initrd.img-2.6.39.4</span></pre>
<li>Reboot machine </li></ol>
<h1>Install NVIDIA driver</h1>
<ol>
<li>Make sure you are not in an X session (log out to console)
<li>Run Nvidia driver installer:<br><pre style="background: #f1f0f0; color: #000000">root@bt<span style="color: #806030">:</span>~<span style="color: #40015a">/</span><span style="color: #c34e00"># <font style="background-color: #ffff00">./devdriver_4.0_linux_64_270.40.run</font></span>
Verifying archive integrity<span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span> OK
Uncompressing NVIDIA Accelerated Graphics Driver <span style="color: #400000; font-weight: bold">for</span> Linux-x86_64 <span style="color: #c00000">270</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">40</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span></pre>
<li>Follow screen instruction to complete installation </li></ol>
<h1>Install NVIDIA CUDA toolkit</h1>
<p><pre style="background: #f1f0f0; color: #000000">root@bt<span style="color: #806030">:</span>~<span style="color: #40015a">/</span><span style="color: #c34e00"># <font style="background-color: #ffff00">./cudatoolkit_4.0.17_linux_64_ubuntu10.10.run</font></span>
Verifying archive integrity<span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span> All good<span style="color: #400000; font-weight: bold">.</span>
Uncompressing NVIDIA CUDA<span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span>
Enter install path <span style="color: #806030">(</span>default <span style="color: #40015a">/usr/local/cuda</span>, <span style="color: #e60000">'/cuda'</span> will be appended<span style="color: #806030">)</span><span style="color: #806030">:</span>
========================================
<span style="color: #806030">*</span> Please make sure your PATH includes <span style="color: #40015a">/usr/local/cuda/bin</span>
<span style="color: #806030">*</span> Please make sure your LD_LIBRARY_PATH
<span style="color: #806030">*</span> <span style="color: #400000; font-weight: bold">for</span> <span style="color: #c00000">32</span>-bit Linux distributions includes <span style="color: #40015a">/usr/local/cuda/lib</span>
<span style="color: #806030">*</span> <span style="color: #400000; font-weight: bold">for</span> <span style="color: #c00000">64</span>-bit Linux distributions includes <span style="color: #40015a">/usr/local/cuda/lib64</span><span style="color: #806030">:</span><span style="color: #40015a">/usr/local/cuda/lib</span>
<span style="color: #806030">*</span> OR
<span style="color: #806030">*</span> <span style="color: #400000; font-weight: bold">for</span> <span style="color: #c00000">32</span>-bit Linux distributions add <span style="color: #40015a">/usr/local/cuda/lib</span>
<span style="color: #806030">*</span> <span style="color: #400000; font-weight: bold">for</span> <span style="color: #c00000">64</span>-bit Linux distributions add <span style="color: #40015a">/usr/local/cuda/lib64</span> and <span style="color: #40015a">/usr/local/cuda/lib</span>
<span style="color: #806030">*</span> to <span style="color: #40015a">/etc/ld.so.conf</span> and run ldconfig as root
<span style="color: #806030">*</span> Please <span style="color: #bb7977; font-weight: bold">read</span> the release notes <span style="color: #400000; font-weight: bold">in</span> <span style="color: #40015a">/usr/local/cuda/doc</span><span style="color: #40015a">/</span>
<span style="color: #806030">*</span> To uninstall CUDA, delete <span style="color: #40015a">/usr/local/cuda</span>
<span style="color: #806030">*</span> Installation Complete</pre>
<h1>Prepare CUDA for Pyrit</h1>
<ol>
<li>Prepare kernel sources:<br><pre style="background: #f1f0f0; color: #000000">root@bt<span style="color: #806030">:</span>~<span style="color: #c34e00"># <font style="background-color: #ffff00">prepare-kernel-sources</font></span>
<span style="color: #806030">[</span><span style="color: #e60000">*</span><span style="color: #806030">]</span> apt-getting linux-source<span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span>
Reading package lists<span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span> Done
Building dependency tree
Reading state information<span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span> Done
linux-source is already the newest version<span style="color: #400000; font-weight: bold">.</span>
The following packages were automatically installed and are no longer required<span style="color: #806030">:</span>
libecryptfs0 libdmraid1<span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">0</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">0</span><span style="color: #400000; font-weight: bold">.</span>rc16 libdebconfclient0 ecryptfs-utils cryptsetup
rdate bogl-bterm libdebian-installer4 reiserfsprogs dmraid python-pyicu
Use <span style="color: #e60000">'apt-get autoremove'</span> to remove them<span style="color: #400000; font-weight: bold">.</span>
<span style="color: #c00000">0</span> upgraded, <span style="color: #c00000">0</span> newly installed, <span style="color: #c00000">0</span> to remove and <span style="color: #c00000">0</span> not upgraded<span style="color: #400000; font-weight: bold">.</span>
<span style="color: #806030">[</span><span style="color: #e60000">*</span><span style="color: #806030">]</span> extracting sources, please <span style="color: #bb7977; font-weight: bold">wait</span>
tar<span style="color: #806030">:</span> linux-source-<span style="color: #c00000">2</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">6</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">39</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">4</span><span style="color: #400000; font-weight: bold">.</span>tar<span style="color: #400000; font-weight: bold">.</span>bz2<span style="color: #806030">:</span> Cannot open<span style="color: #806030">:</span> No such file or directory
tar<span style="color: #806030">:</span> Error is not recoverable<span style="color: #806030">:</span> exiting now
tar<span style="color: #806030">:</span> Child returned status <span style="color: #c00000">2</span>
tar<span style="color: #806030">:</span> Exiting with failure status due to previous errors
<span style="color: #806030">[</span><span style="color: #e60000">*</span><span style="color: #806030">]</span> doing stuff<span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span>
cp<span style="color: #806030">:</span> missing destination file operand after <span style="background: #ffffe8; color: #000000">`</span><span style="background: #ffffe8; color: #40015a">/boot</span><span style="background: #ffffe8; color: #40015a">/</span><span style="background: #ffffe8; color: #e60000">'</span>
<span style="background: #ffffe8; color: #e60000">Try `cp --help'</span><span style="background: #ffffe8; color: #000000"> </span><span style="background: #ffffe8; color: #400000; font-weight: bold">for</span><span style="background: #ffffe8; color: #000000"> more information</span><span style="background: #ffffe8; color: #400000; font-weight: bold">.</span><span style="background: #ffffe8; color: #000000"></span>
<span style="background: #ffffe8; color: #40015a">scripts/kconfig/conf</span><span style="background: #ffffe8; color: #000000"> --silentoldconfig Kconfig</span>
<span style="background: #ffffe8; color: #000000">CHK </span><span style="background: #ffffe8; color: #40015a">include/linux/version.h</span><span style="background: #ffffe8; color: #000000"></span>
<span style="background: #ffffe8; color: #000000">CHK </span><span style="background: #ffffe8; color: #40015a">include/generated/utsrelease.h</span><span style="background: #ffffe8; color: #000000"></span>
<span style="background: #ffffe8; color: #000000">CALL </span><span style="background: #ffffe8; color: #40015a">scripts/checksyscalls.sh</span><span style="background: #ffffe8; color: #000000"></span>
<span style="background: #ffffe8; color: #806030">[</span><span style="background: #ffffe8; color: #e60000">*</span><span style="background: #ffffe8; color: #806030">]</span><span style="background: #ffffe8; color: #000000"> tada</span><span style="background: #ffffe8; color: #400000; font-weight: bold">!</span><span style="background: #ffffe8; color: #000000"></span>
<span style="background: #ffffe8; color: #000000">root@bt</span><span style="background: #ffffe8; color: #806030">:</span><span style="background: #ffffe8; color: #000000">~</span><span style="background: #ffffe8; color: #c34e00"># <font style="background-color: #ffff00">cd /usr/src/linux</font></span><span style="background: #ffffe8; color: #000000"></span>
<span style="background: #ffffe8; color: #000000">root@bt</span><span style="background: #ffffe8; color: #806030">:</span><span style="background: #ffffe8; color: #40015a">/usr/src/linux</span><span style="background: #ffffe8; color: #c34e00"># <font style="background-color: #ffff00">cp -rf include/generated/* include/linux/</font></span></pre>
<li>Set Environment <a href="mailto:variableroot@bt">variable</a><br><pre style="background: #f1f0f0; color: #000000">root@bt<span style="color: #806030">:</span>~<span style="color: #c34e00"># <font style="background-color: #ffff00">vi ~/.bashrc</font></span>
PATH<span style="color: #806030">=</span>$PATH<span style="color: #806030">:</span><span style="color: #40015a">/usr/local/cuda/bin</span>
LD_LIBRARY_PATH<span style="color: #806030">=</span>$LD_LIBRARY_PATH<span style="color: #806030">:</span><span style="color: #40015a">/usr/local/cuda/lib64</span>
<span style="color: #bb7977; font-weight: bold">export</span> PATH
<span style="color: #bb7977; font-weight: bold">export</span> LD_LIBRARY_PATHroot@bt<span style="color: #806030">:</span>~<span style="color: #c34e00"># source /root/.bashrc</span>
root@bt<span style="color: #806030">:</span>~<span style="color: #c34e00"># <strong><font style="background-color: #ffff00">ldconfig</font></strong></span></pre>
<li>Check NVIDIA compiler:<br><pre style="background: #f1f0f0; color: #000000">root@bt<span style="color: #806030">:</span>~<span style="color: #c34e00"># <font style="background-color: #ffff00">which nvcc</font></span>
<span style="color: #40015a">/usr/local/cuda/bin/nvcc</span>
root@bt<span style="color: #806030">:</span>~<span style="color: #c34e00"># <font style="background-color: #ffff00">nvcc -V</font></span>
nvcc<span style="color: #806030">:</span> NVIDIA <span style="color: #806030">(</span>R<span style="color: #806030">)</span> Cuda compiler driver
Copyright <span style="color: #806030">(</span>c<span style="color: #806030">)</span> <span style="color: #c00000">2005</span>-<span style="color: #c00000">2011</span> NVIDIA Corporation
Built on Thu_May_12_11<span style="color: #806030">:</span><span style="color: #c00000">09</span><span style="color: #806030">:</span>45_PDT_2011
Cuda compilation tools, release <span style="color: #c00000">4</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">0</span>, V0<span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">2</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">1221</span><br></pre></li></ol>
<h1>Setup pyrit</h1>
<ol>
<li>Setup pyrit dependent packages:<br><pre style="background: #f1f0f0; color: #000000">root@bt<span style="color: #806030">:</span>~<span style="color: #c34e00"># <font style="background-color: #ffff00">apt-get install libssl-dev</font></span>
root@bt<span style="color: #806030">:</span>~<span style="color: #c34e00"># <font style="background-color: #ffff00">apt-get install scapy</font></span>
root@bt<span style="color: #806030">:</span>~<span style="color: #c34e00"># <font style="background-color: #ffff00">apt-get install python-dev<br></font></span>root@bt<span style="color: #806030">:</span>~<span style="color: #c34e00"># <font style="background-color: #ffff00">apt-get install python-sqlalchemy <font style="background-color: #ffffff">// optional: if using sqlite database</font><br></font></span></pre>
<li>Check out Pyrit SVN trunk:<br><pre style="background: #f1f0f0; color: #000000">root@bt<span style="color: #806030">:</span>~<span style="color: #c34e00"># svn checkout </span><span style="color: #5555dd">http://pyrit.googlecode.com/svn/trunk/</span><span style="color: #c34e00"> pyrit</span></pre>
<li>Build Pyrit:<br><pre style="background: #f1f0f0; color: #000000">root@bt<span style="color: #806030">:</span>~<span style="color: #c34e00"># <font style="background-color: #ffff00">cd pyrit/pyrit/</font></span>
root@bt<span style="color: #806030">:</span>~<span style="color: #40015a">/pyrit/pyrit</span><span style="color: #c34e00"># <font style="background-color: #ffff00">python setup.py build</font></span>
root@bt<span style="color: #806030">:</span>~<span style="color: #40015a">/pyrit/pyrit</span><span style="color: #c34e00"># <font style="background-color: #ffff00">python setup.py install</font></span></pre>
<li>Test Pyrit:<br><pre style="background: #f1f0f0; color: #000000">root@bt<span style="color: #806030">:</span>~<span style="color: #40015a">/pyrit/pyrit</span><span style="color: #c34e00"># <font style="background-color: #ffff00">pyrit list_cores</font></span>
Pyrit <span style="color: #c00000">0</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">4</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">1</span>-dev <span style="color: #806030">(</span>svn r308<span style="color: #806030">)</span> <span style="color: #806030">(</span>C<span style="color: #806030">)</span> <span style="color: #c00000">2008</span>-<span style="color: #c00000">2011</span> Lukas Lueg http<span style="color: #806030">:</span><span style="color: #40015a">/</span><span style="color: #40015a">/pyrit.googlecode.com</span>
This code is distributed under the GNU General Public License v3+
The following cores seem available<span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span>
<span style="color: #c34e00">#1: 'CPU-Core (SSE2)'</span>
<span style="color: #c34e00">#2: 'CPU-Core (SSE2)'</span>
<span style="color: #c34e00">#3: 'CPU-Core (SSE2)'</span>
<span style="color: #c34e00">#4: 'CPU-Core (SSE2)'</span>
<span style="color: #c34e00">#5: 'CPU-Core (SSE2)'</span>
<span style="color: #c34e00">#6: 'CPU-Core (SSE2)'</span>
<span style="color: #c34e00">#7: 'CPU-Core (SSE2)'</span>
<span style="color: #c34e00">#8: 'CPU-Core (SSE2)'</span></pre></li></ol>
<h1>Setup CUDA for Pyrit</h1>
<ol>
<li>Build CUDA for Pyrit:<br><pre style="background: #f1f0f0; color: #000000">root@bt<span style="color: #806030">:</span>~<span style="color: #40015a">/pyrit/pyrit</span><span style="color: #c34e00"># <font style="background-color: #ffff00">cd ../cpyrit_cuda/</font></span>
root@bt<span style="color: #806030">:</span>~<span style="color: #40015a">/pyrit/cpyrit_cuda</span><span style="color: #c34e00"># <font style="background-color: #ffff00">python setup.py build</font></span>
root@bt<span style="color: #806030">:</span>~<span style="color: #40015a">/pyrit/cpyrit_cuda</span><span style="color: #c34e00"># <font style="background-color: #ffff00">python setup.py install</font></span></pre>
<li>Test CUDA for Pyrit:<br><pre style="background: #f1f0f0; color: #000000">root@bt<span style="color: #806030">:</span>~<span style="color: #40015a">/pyrit/cpyrit_cuda</span><span style="color: #c34e00"># <font style="background-color: #ffff00">pyrit list_cores</font></span>
Pyrit <span style="color: #c00000">0</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">4</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">1</span>-dev <span style="color: #806030">(</span>svn r308<span style="color: #806030">)</span> <span style="color: #806030">(</span>C<span style="color: #806030">)</span> <span style="color: #c00000">2008</span>-<span style="color: #c00000">2011</span> Lukas Lueg http<span style="color: #806030">:</span><span style="color: #40015a">/</span><span style="color: #40015a">/pyrit.googlecode.com</span>
This code is distributed under the GNU General Public License v3+
The following cores seem available<span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span>
<font style="background-color: #ffff00"><span style="color: #c34e00">#1: 'CUDA-Device #1 'GeForce 8400 GS''</span>
</font><span style="color: #c34e00">#2: 'CPU-Core (SSE2)'</span>
<span style="color: #c34e00">#3: 'CPU-Core (SSE2)'</span>
<span style="color: #c34e00">#4: 'CPU-Core (SSE2)'</span>
<span style="color: #c34e00">#5: 'CPU-Core (SSE2)'</span>
<span style="color: #c34e00">#6: 'CPU-Core (SSE2)'</span>
<span style="color: #c34e00">#7: 'CPU-Core (SSE2)'</span>
<span style="color: #c34e00">#8: 'CPU-Core (SSE2)'</span>
root@bt<span style="color: #806030">:</span>~<span style="color: #40015a">/pyrit/cpyrit_cuda</span><span style="color: #c34e00"># <font style="background-color: #ffff00">pyrit benchmark</font></span>
Pyrit <span style="color: #c00000">0</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">4</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">1</span>-dev <span style="color: #806030">(</span>svn r308<span style="color: #806030">)</span> <span style="color: #806030">(</span>C<span style="color: #806030">)</span> <span style="color: #c00000">2008</span>-<span style="color: #c00000">2011</span> Lukas Lueg http<span style="color: #806030">:</span><span style="color: #40015a">/</span><span style="color: #40015a">/pyrit.googlecode.com</span>
This code is distributed under the GNU General Public License v3+
Running benchmark <span style="color: #806030">(</span><span style="color: #c00000">3240</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">1</span> <span style="color: #40015a">PMKs/s</span><span style="color: #806030">)</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span> <span style="color: #0f6900">\</span>
Computed <span style="color: #c00000">3240</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">14</span> <span style="color: #40015a">PMKs/s</span> total<span style="color: #400000; font-weight: bold">.</span>
<font style="background-color: #ffff00"><span style="color: #c34e00">#1: 'CUDA-Device #1 'GeForce 8400 GS'': 457.5 PMKs/s (RTT 3.2)</span>
</font><span style="color: #c34e00">#2: 'CPU-Core (SSE2)': 425.5 PMKs/s (RTT 3.0)</span>
<span style="color: #c34e00">#3: 'CPU-Core (SSE2)': 425.9 PMKs/s (RTT 3.0)</span>
<span style="color: #c34e00">#4: 'CPU-Core (SSE2)': 426.2 PMKs/s (RTT 3.0)</span>
<span style="color: #c34e00">#5: 'CPU-Core (SSE2)': 425.5 PMKs/s (RTT 2.9)</span>
<span style="color: #c34e00">#6: 'CPU-Core (SSE2)': 425.6 PMKs/s (RTT 3.1)</span>
<span style="color: #c34e00">#7: 'CPU-Core (SSE2)': 453.3 PMKs/s (RTT 3.0)</span>
<span style="color: #c34e00">#8: 'CPU-Core (SSE2)': 422.3 PMKs/s (RTT 3.1)</span></pre>
<li>The benchmark for GeForce GPU doesn’t shows much improvement on calculation as the GPU is a low end graphic card.</li></ol> Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com6tag:blogger.com,1999:blog-38385155.post-59538330990796078662011-11-11T16:14:00.001+08:002011-11-11T16:16:40.213+08:00BackTrack 5: Installation and Configuration<p>BackTrack Linux is an operating system based on the Ubuntu GNU/Linux distribution aimed at digital forensics and penetration testing use.[8] It is named after backtracking, a search algorithm. For more information and download a copy of backtrack, visit <a href="http://www.backtrack-linux.org/">http://www.backtrack-linux.org/</a></p> <h1>Boot BackTrack via USB Flash Drive</h1> <ol> <li>The USB flash drive should have enough space to fit the BackTrack Linux ISO file <li>Format USB flash drive to file system FAT32 <li>Download an utility UNetbootin (<a href="http://unetbootin.sourceforge.net/">http://unetbootin.sourceforge.net/</a>) to create a bootable Live USB. <li>Launch UNetbootin and burn the iso file into USB flash drive. <li>The following screen shows UNetbootin usage:<br><br><a href="http://lh6.ggpht.com/-kEcca3K1cXY/TrzZEAYFP1I/AAAAAAAAAwY/7ggnRORrfg4/s1600-h/Capture%25255B3%25255D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Capture" border="0" alt="Capture" src="http://lh4.ggpht.com/-49rdVNIyEpo/TrzZFBr3f7I/AAAAAAAAAwg/FpC99TR09Js/Capture_thumb%25255B1%25255D.png?imgmax=800" width="544" height="402"></a> <br> <li>Once done, configure machine to boot from USB storage, plug in USB flash drive and boot the machine <li>BackTrack Linux should be ready to use after booting</li></ol> <h1>Boot BackTrack via PXE</h1> <p>PXE booting is another interesting configuration that may boot system from network.</p> <ol> <li>Mount BackTrack ISO file to extract two files requires for PXE booting: initrd.gz and vmlinuz <br><pre style="background: #f1f0f0; color: #000000">-bash-<span style="color: #c00000">4</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">1</span>$ ls <span style="color: #40015a">/mnt/iso/bt5/casper</span><span style="color: #40015a">/</span> -al
total <span style="color: #c00000">2030472</span>
dr-xr-xr-x <span style="color: #c00000">2</span> root root <span style="color: #c00000">2048</span> Aug <span style="color: #c00000">18</span> <span style="color: #c00000">13</span><span style="color: #806030">:</span><span style="color: #c00000">37</span> <span style="color: #400000; font-weight: bold">.</span>
dr-xr-xr-x <span style="color: #c00000">6</span> root root <span style="color: #c00000">2048</span> Aug <span style="color: #c00000">18</span> <span style="color: #c00000">13</span><span style="color: #806030">:</span><span style="color: #c00000">48</span> <span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span>
-r--r--r-- <span style="color: #c00000">1</span> root root <span style="color: #c00000">46099</span> Aug <span style="color: #c00000">18</span> <span style="color: #c00000">13</span><span style="color: #806030">:</span><span style="color: #c00000">37</span> filesystem<span style="color: #400000; font-weight: bold">.</span>manifest
-r--r--r-- <span style="color: #c00000">1</span> root root <span style="color: #c00000">45951</span> Aug <span style="color: #c00000">18</span> <span style="color: #c00000">13</span><span style="color: #806030">:</span><span style="color: #c00000">37</span> filesystem<span style="color: #400000; font-weight: bold">.</span>manifest-desktop
-r--r--r-- <span style="color: #c00000">1</span> root root <span style="color: #c00000">10</span> Mar <span style="color: #c00000">6</span> <span style="color: #c00000">2011</span> filesystem<span style="color: #400000; font-weight: bold">.</span>size
-r-xr-xr-x <span style="color: #c00000">1</span> root root <span style="color: #c00000">2023530496</span> Aug <span style="color: #c00000">18</span> <span style="color: #c00000">13</span><span style="color: #806030">:</span><span style="color: #c00000">48</span> filesystem<span style="color: #400000; font-weight: bold">.</span>squashfs
-r--r--r-- <span style="color: #c00000">1</span> root root <span style="color: #c00000">17036519</span> Aug <span style="color: #c00000">18</span> <span style="color: #c00000">13</span><span style="color: #806030">:</span><span style="color: #c00000">18</span> initrdf<span style="color: #400000; font-weight: bold">.</span>gz
-r--r--r-- <span style="color: #c00000">1</span> root root <span style="color: #c00000">17036173</span> Aug <span style="color: #c00000">18</span> <span style="color: #c00000">13</span><span style="color: #806030">:</span><span style="color: #c00000">18</span> <font style="background-color: #ffff00">initrd<span style="color: #400000; font-weight: bold">.</span>gz</font>
-r--r--r-- <span style="color: #c00000">1</span> root root <span style="color: #c00000">17038433</span> Aug <span style="color: #c00000">18</span> <span style="color: #c00000">13</span><span style="color: #806030">:</span><span style="color: #c00000">18</span> initrds<span style="color: #400000; font-weight: bold">.</span>gz
-r--r--r-- <span style="color: #c00000">1</span> root root <span style="color: #c00000">200</span> Mar <span style="color: #c00000">6</span> <span style="color: #c00000">2011</span> README<span style="color: #400000; font-weight: bold">.</span>diskdefines
-r--r--r-- <span style="color: #c00000">1</span> root root <span style="color: #c00000">4462512</span> Aug <span style="color: #c00000">18</span> <span style="color: #c00000">13</span><span style="color: #806030">:</span><span style="color: #c00000">18</span> <font style="background-color: #ffff00">vmlinuz</font>
</pre>
<li>Copy initrd.gz and vmlinuz to TFTP boot folder. The following shows BackTrack 4 and 5 TFTP boot folder:<br><pre style="background: #f1f0f0; color: #000000">-bash-<span style="color: #c00000">4</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">1</span>$ ls -gGal bt<span style="color: #806030">*</span>
bt4<span style="color: #806030">:</span>
total <span style="color: #c00000">12948</span>
drwxr-xr-x <span style="color: #c00000">2</span> <span style="color: #c00000">4096</span> Jul <span style="color: #c00000">22</span> <span style="color: #c00000">13</span><span style="color: #806030">:</span><span style="color: #c00000">35</span> <span style="color: #400000; font-weight: bold">.</span>
drwxr-xr-x <span style="color: #c00000">26</span> <span style="color: #c00000">4096</span> Nov <span style="color: #c00000">3</span> <span style="color: #c00000">17</span><span style="color: #806030">:</span><span style="color: #c00000">15</span> <span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span>
-r--r--r-- <span style="color: #c00000">1</span> <span style="color: #c00000">8555925</span> Jan <span style="color: #c00000">1</span> <span style="color: #c00000">2010</span> initrd<span style="color: #400000; font-weight: bold">.</span>gz
-r--r--r-- <span style="color: #c00000">1</span> <span style="color: #c00000">4690640</span> Dec <span style="color: #c00000">14</span> <span style="color: #c00000">2009</span> vmlinuz
bt5<span style="color: #806030">:</span>
total <span style="color: #c00000">21008</span>
drwxr-xr-x <span style="color: #c00000">2</span> <span style="color: #c00000">4096</span> Jul <span style="color: #c00000">23</span> <span style="color: #c00000">07</span><span style="color: #806030">:</span><span style="color: #c00000">43</span> <span style="color: #400000; font-weight: bold">.</span>
drwxr-xr-x <span style="color: #c00000">26</span> <span style="color: #c00000">4096</span> Nov <span style="color: #c00000">3</span> <span style="color: #c00000">17</span><span style="color: #806030">:</span><span style="color: #c00000">15</span> <span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span>
-r--r--r-- <span style="color: #c00000">1</span> <span style="color: #c00000">17036173</span> Oct <span style="color: #c00000">15</span> <span style="color: #c00000">09</span><span style="color: #806030">:</span><span style="color: #c00000">29</span> initrd<span style="color: #400000; font-weight: bold">.</span>gz
-r--r--r-- <span style="color: #c00000">1</span> <span style="color: #c00000">4462512</span> Oct <span style="color: #c00000">15</span> <span style="color: #c00000">09</span><span style="color: #806030">:</span><span style="color: #c00000">29</span> vmlinuz</pre>
<li>Mount BackTrack ISO file and setup NFS access to the mount point. <li>Configure PXE boot configuration file:<br><pre style="background: #f1f0f0; color: #000000">label BackTrack <span style="color: #c00000">4</span>
menu label Backtrack Linux <span style="color: #c00000">4</span>
kernel <span style="color: #40015a">bt4/vmlinuz</span>
append initrd<span style="color: #806030">=</span><span style="color: #40015a">bt4/initrd.gz</span> BOOT<span style="color: #806030">=</span>casper boot<span style="color: #806030">=</span>casper nopersistent rw quite vga<span style="color: #806030">=</span><span style="color: #c00000">0x317</span> netboot<span style="color: #806030">=</span>nfs nfsroot<span style="color: #806030">=</span><span style="color: #c00000">192</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">168</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">1</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">1</span><span style="color: #806030">:</span><span style="color: #40015a">/mnt/bt4</span>
label BackTrack <span style="color: #c00000">5</span>
menu label Backtrack Linux <span style="color: #c00000">5</span>
kernel <span style="color: #40015a">bt5/vmlinuz</span>
append initrd<span style="color: #806030">=</span><span style="color: #40015a">bt5/initrd.gz</span> boot<span style="color: #806030">=</span>casper text vga<span style="color: #806030">=</span><span style="color: #c00000">791</span> netboot<span style="color: #806030">=</span>nfs nfsroot<span style="color: #806030">=</span><span style="color: #c00000">192</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">168</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">1</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">1</span><span style="color: #806030">:</span><span style="color: #40015a">/mnt/bt5</span></pre>
<li>Configure machine to Boot from PXE and select BackTrack item to boot BackTrack Linux</li></ol>
<h1>Install BackTrack to Local Storage</h1>
<ol>
<li>Boot BackTrack Linux and start GUI interface by typing “startx” in shell prompt:<br><br><a href="http://lh3.ggpht.com/-V1edN7Iykwo/TrzZP0-H3CI/AAAAAAAAAwo/QFl03mfJ2rQ/s1600-h/2%25255B3%25255D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="2" border="0" alt="2" src="http://lh6.ggpht.com/-qtu3n-tgDmA/TrzZZ9ZixcI/AAAAAAAAAww/VAJBDIUGsvM/2_thumb%25255B1%25255D.png?imgmax=800" width="804" height="604"></a><br>
<li>Double click “Install BackTrack” icon on the screen to start install BackTrack to local storage</li></ol>
<h1>Configure: Start DHCP client</h1>
<p>Start ethernet adapter eth0 with DHCP client:</p><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># dhclient eth0</span>
</pre>
<p>Configure eth0 to act as DHCP client permanently:</p><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># cat /etc/network/interfaces</span>
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet <strong><font style="background-color: #ffff00">dhcp</font></strong>
</pre>
<h1>Configure: Enable SSH</h1>
<p>Generate SSH RSA key pair for first use:</p><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># sshd-generate</span>
</pre>
<p>To start ssh manually:</p><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># service ssh start</span>
</pre>
<p><strong></strong></p>
<p>Start SSH service when startup:</p><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># update-rc.d -f ssh defaults</span></pre> Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com0tag:blogger.com,1999:blog-38385155.post-35876489065328680992011-11-04T18:25:00.003+08:002013-12-03T14:09:56.045+08:00WAIK: Install Windows XP via WinPETo install Windows XP via WinPE/PXE without DVD installation, Windows XP needs:<br />
<ol>
<li>A bootable partition </li>
<li>The partition contains the installation files</li>
</ol>
<h1>
Prepare Windows XP installation</h1>
<ol>
<li>Network boot bare bone machine and execute WinPE via PXE </li>
<li>Use “diskpart” to create and format the parition. Assign driver letter C: to the partition. </li>
<li>Run<br /><pre style="background: #f1f0f0; color: black;">X:\> <span style="background-color: yellow;">Bootsect.exe <span style="color: #806030;">/</span>nt52 c<span style="color: #806030;">:</span> <span style="color: #806030;">/</span>force <span style="color: #806030;">/</span>mbr</span></pre>
</li>
<li>Mount the Windows installation share:<br /><pre style="background: #f1f0f0; color: black;"><span style="color: #400000; font-weight: bold;">X:\> <span style="background-color: yellow;">net</span></span><span style="background-color: yellow;"> <span style="color: #400000; font-weight: bold;">use</span> s<span style="color: #806030;">:</span> <span style="color: #806030;">\</span>Windows<span style="color: #806030;">-</span>xp<span style="color: #806030;">-</span>setup<span style="color: #806030;">-</span>folder<span style="color: #e60000;">">\Windows-xp-setup-folder"</span><span style="color: #806030;">></span><span style="color: #806030;">\</span>Windows<span style="color: #806030;">-</span>xp<span style="color: #806030;">-</span>setup<span style="color: #806030;">-</span>folder"<span style="color: #806030;">></span><span style="color: #806030;">\</span><span style="color: #806030;">\</span><server><span style="color: #806030;">\</span>Windows<span style="color: #806030;">-</span>xp<span style="color: #806030;">-</span>setup<span style="color: #806030;">-</span>folder</span></pre>
</li>
<li>Prepare local installation files: <br /><pre style="background: #f1f0f0; color: black;">X:\> <span style="background-color: yellow;">s<span style="color: #806030;">:</span><span style="color: #806030;">\</span><win-xp><span style="color: #806030;">\</span>i386<span style="color: #806030;">\</span>winnt32.exe <span style="color: #806030;">/</span>syspart<span style="color: #806030;">:</span>c<span style="color: #806030;">:</span> /tempdrive:c: <span style="color: #806030;">/</span>makelocalsource</span></pre>
</li>
<li>Follow the screen instruction to enter proper information
</li>
<li>After the files has been copied to hard drive, Winnt32.exe will exit and back to WINPE
</li>
<li>Type "Exit" to restart PC
</li>
<li>Windows XP installation will continue as usual </li>
</ol>
<h1>
Unattended Windows XP installation </h1>
<ol>
<li>Prepare unattend answer file:<br /><pre style="background: #f1f0f0; color: black;"><span style="color: #806030;">;</span>SetupMgrTag
<span style="color: #806030;">[</span><span style="color: #e60000;">Data</span><span style="color: #806030;">]</span>
AutoPartition<span style="color: #806030;">=</span><span style="color: #c00000;">1</span>
MsDosInitiated<span style="color: #806030;">=</span><span style="color: #e60000;">"0"</span>
UnattendedInstall<span style="color: #806030;">=</span><span style="color: #e60000;">"Yes"</span>
<span style="color: #806030;">[</span><span style="color: #e60000;">Unattended</span><span style="color: #806030;">]</span>
UnattendMode<span style="color: #806030;">=</span>FullUnattended
OemSkipEula<span style="color: #806030;">=</span>Yes
Setting OemPreInstall<span style="color: #806030;">=</span>Yes is necessary <span style="color: #400000; font-weight: bold;">if</span> you create an $OEM$
directory under <span style="color: #0f6900;">\i</span>386 to copy files to the target PC <span style="color: #40015a;">and/or</span> are using a cmdlines<span style="color: #400000; font-weight: bold;">.</span>txt
file<span style="color: #400000; font-weight: bold;">.</span> If you aren<span style="color: #e60000;">'t copying files to the target PC or using a cmdlines.txt file,</span>
<span style="color: #e60000;">then set it to No</span>
<span style="color: #e60000;">OemPreinstall=Yes</span>
<span style="color: #e60000;">TargetPath=\WINDOWS</span>
<span style="color: #e60000;">The 2 lines below are used to convert the file system to NTFS</span>
<span style="color: #e60000;">and then extend the boot/system partition an extra 4GB.</span>
<span style="color: #e60000;">FileSystem=ConvertNTFS</span>
<span style="color: #e60000;">ExtendOEMPartition=4000</span>
<span style="color: #e60000;"></span>
<span style="color: #e60000;">[GuiUnattended]</span>
<span style="color: #e60000;">AdminPassword="happyday"</span>
<span style="color: #e60000;">EncryptedAdminPassword=NO</span>
<span style="color: #e60000;">OEMSkipRegional=1</span>
<span style="color: #e60000;">TimeZone=35</span>
<span style="color: #e60000;">OemSkipWelcome=1</span>
<span style="color: #e60000;">The following 2 lines tell setup to login 1 time automatically after</span>
<span style="color: #e60000;">the installation has finished. Setup will only use the local Administrator</span>
<span style="color: #e60000;">account to login</span>
<span style="color: #e60000;">AutoLogon=Yes</span>
<span style="color: #e60000;">AutoLogonCount=1</span>
<span style="color: #e60000;"></span>
<span style="color: #e60000;">[UserData]</span>
<span style="color: #e60000;">You could add a ComputerName= line in this section. However,</span>
<span style="color: #e60000;">if you are installing multiple PCs, and since each PC needs a</span>
<span style="color: #e60000;">unique computer name, leaving out this line causes Setup to prompt</span>
<span style="color: #e60000;">you for a computer name. Alternatively, you could use a UDF file to provide</span>
<span style="color: #e60000;">unique user information.</span>
<span style="color: #e60000;">ProductID=xxxxx-xxxxx-xxxxx-xxxxx-xxxxx</span>
<span style="color: #e60000;">FullName="Jane Doe"</span>
<span style="color: #e60000;">OrgName="Widgets"</span>
<span style="color: #e60000;"></span>
<span style="color: #e60000;">[Display]</span>
<span style="color: #e60000;">BitsPerPel=32</span>
<span style="color: #e60000;">Xresolution=1024</span>
<span style="color: #e60000;">YResolution=768</span>
<span style="color: #e60000;">Vrefresh=75</span>
<span style="color: #e60000;"></span>
<span style="color: #e60000;">[Components]</span>
<span style="color: #e60000;">This section is where you tell XP to not install certain components.</span>
<span style="color: #e60000;">The line below tells XP not to install MSN Explorer.</span>
<span style="color: #e60000;">msnexplr=off</span>
<span style="color: #e60000;"></span>
<span style="color: #e60000;">[TapiLocation]</span>
<span style="color: #e60000;">CountryCode=1</span>
<span style="color: #e60000;">Dialing=Tone</span>
<span style="color: #e60000;">AreaCode=305</span>
<span style="color: #e60000;"></span>
<span style="color: #e60000;">[RegionalSettings]</span>
<span style="color: #e60000;">LanguageGroup=1</span>
<span style="color: #e60000;">Language=00000409</span>
<span style="color: #e60000;"></span>
<span style="color: #e60000;">[Branding]</span>
<span style="color: #e60000;">BrandIEUsingUnattended=Yes</span>
<span style="color: #e60000;"></span>
<span style="color: #e60000;">[URL]</span>
<span style="color: #e60000;">Home_Page=www.svrops.com</span>
<span style="color: #e60000;"></span>
<span style="color: #e60000;">[Proxy]</span>
<span style="color: #e60000;">Proxy_Enable=0</span>
<span style="color: #e60000;">Use_Same_Proxy=1</span>
<span style="color: #e60000;"></span>
<span style="color: #e60000;">[Identification]</span>
<span style="color: #e60000;">This section joins your PC to the domain indicated, creates a computer</span>
<span style="color: #e60000;">account and uses the username and password indicated to create the account.</span>
<span style="color: #e60000;">JoinDomain=MYDOMAIN.com</span>
<span style="color: #e60000;">CreateComputerAccountInDomain=Yes</span>
<span style="color: #e60000;">DomainAdmin=msmith</span>
<span style="color: #e60000;">DomainAdminPassword=password</span>
<span style="color: #e60000;"></span>
<span style="color: #e60000;">[Networking]</span>
<span style="color: #e60000;">This section and the ones to follow were generated by Setup Manager.</span>
<span style="color: #e60000;">They describe what networking protocols and components to install.</span>
<span style="color: #e60000;">InstallDefaultComponents=No</span>
<span style="color: #e60000;"></span>
<span style="color: #e60000;">[NetAdapters]</span>
<span style="color: #e60000;">Adapter1=params.Adapter1</span>
<span style="color: #e60000;"></span>
<span style="color: #e60000;">[params.Adapter1]</span>
<span style="color: #e60000;">INFID=*</span>
<span style="color: #e60000;"></span>
<span style="color: #e60000;">[NetClients]</span>
<span style="color: #e60000;">MS_MSClient=params.MS_MSClient</span>
<span style="color: #e60000;"></span>
<span style="color: #e60000;">[NetServices]</span>
<span style="color: #e60000;">MS_SERVER=params.MS_SERVER</span>
<span style="color: #e60000;"></span>
<span style="color: #e60000;">[NetProtocols]</span>
<span style="color: #e60000;">MS_TCPIP=params.MS_TCPIP</span>
<span style="color: #e60000;"></span>
<span style="color: #e60000;">[params.MS_TCPIP]</span>
<span style="color: #e60000;">DNS=Yes</span>
<span style="color: #e60000;">UseDomainNameDevolution=No</span>
<span style="color: #e60000;">EnableLMHosts=Yes</span>
<span style="color: #e60000;">AdapterSections=params.MS_TCPIP.Adapter1</span>
<span style="color: #e60000;"></span>
<span style="color: #e60000;">[params.MS_TCPIP.Adapter1]</span>
<span style="color: #e60000;">SpecificTo=Adapter1</span>
<span style="color: #e60000;">DHCP=Yes</span>
<span style="color: #e60000;">WINS=No</span>
<span style="color: #e60000;">NetBIOSOptions=0</span></pre>
</li>
<li>Install Windows XP with unattend answer file:<br /><pre style="background: #f1f0f0; color: black;"><span style="background-color: yellow;">s<span style="color: #806030;">:</span><span style="color: #0f6900;">\<</span>win-xp<span style="color: #e34adc;">></span><span style="color: #0f6900;">\i</span>386<span style="color: #0f6900;">\w</span>innt32<span style="color: #400000; font-weight: bold;">.</span>exe <span style="color: #40015a;">/syspart</span><span style="color: #806030;">:</span>c<span style="color: #806030;">:</span> <span style="color: #40015a;">/makelocalsource</span> <span style="color: #40015a;">/unattend</span><span style="color: #806030;">:</span><span style="color: #40015a;">un</span>attend<span style="color: #400000; font-weight: bold;">.</span>txt</span></pre>
</li>
</ol>
<h1>
Troubleshoot: "setup cannot load the keyboard layout file kbdus.dll" </h1>
If you encounter errors during the installation (e.g.: "setup cannot load the keyboard layout file kbdus.dll"), please make sure the installation partition is not hidden if you have hide it unintentionally. <br />
To check if the partition is hidden: <br />
<ul>
<li>diskpart
</li>
<li>select disk 0
</li>
<li>select part 1
</li>
<li>detail part </li>
</ul>
To unhide the volume: <br />
<ul>
<li>diskpart
</li>
<li>select disk 0
</li>
<li>select part 1
</li>
<li>attributes volume clear hidden </li>
</ul>
Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com2tag:blogger.com,1999:blog-38385155.post-81182671917531826372011-11-04T18:25:00.001+08:002011-11-04T18:25:22.193+08:00WAIK: Deploy WinPE via PXE<p>Additional configuration is required to make WinPE works well with PXE.</p> <h1>Prepare Boot Configuration file: BCD</h1> <p>Boot Configuration Data (BCD) contain information required by Windows boot kernel how to load Windows operating system. The following batch script shows how to prepare a single BCD that may boot from 4 available WinPE images:</p> <ol> <li>vista_x86.wim</li> <li>vista_x64.wim</li> <li>win7_x86.wim</li> <li>win7_x64.wim</li></ol> <p>These files should be keep in TFTP’s folder: /windows_pe/</p><pre style="background: #f1f0f0; color: #000000"><span style="color: #806030">@</span><span style="color: #400000; font-weight: bold">echo off</span>
<span style="color: #400000; font-weight: bold">Del</span> BCD_PXE
bcdedit <span style="color: #806030">/</span>createstore BCD_PXE
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span>create <span style="color: #806030">{</span>ramdiskoptions<span style="color: #806030">}</span>
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span><span style="color: #400000; font-weight: bold">set</span> <span style="color: #806030">{</span>ramdiskoptions<span style="color: #806030">}</span> ramdisksdidevice boot
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span><span style="color: #400000; font-weight: bold">set</span> <span style="color: #806030">{</span>ramdiskoptions<span style="color: #806030">}</span> ramdisksdipath <span style="color: #806030">\</span>windows.pe<span style="color: #806030">\</span>boot.sdi
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span>create <span style="color: #806030">{</span><span style="color: #8c0000">88C83FCF</span><span style="color: #806030">-</span><span style="color: #8c0000">809E</span><span style="color: #806030">-</span><span style="color: #8c0000">4B72</span><span style="color: #806030">-</span><span style="color: #8c0000">8921</span><span style="color: #806030">-</span>D91E37DCD052<span style="color: #806030">}</span> <span style="color: #806030">/</span>application osloader <span style="color: #806030">/</span>d <span style="color: #e60000">"Windows Vista 32-bit PE"</span>
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span><span style="color: #400000; font-weight: bold">set</span> <span style="color: #806030">{</span><span style="color: #8c0000">88C83FCF</span><span style="color: #806030">-</span><span style="color: #8c0000">809E</span><span style="color: #806030">-</span><span style="color: #8c0000">4B72</span><span style="color: #806030">-</span><span style="color: #8c0000">8921</span><span style="color: #806030">-</span>D91E37DCD052<span style="color: #806030">}</span> systemroot <span style="color: #806030">\</span>Windows
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span><span style="color: #400000; font-weight: bold">set</span> <span style="color: #806030">{</span><span style="color: #8c0000">88C83FCF</span><span style="color: #806030">-</span><span style="color: #8c0000">809E</span><span style="color: #806030">-</span><span style="color: #8c0000">4B72</span><span style="color: #806030">-</span><span style="color: #8c0000">8921</span><span style="color: #806030">-</span>D91E37DCD052<span style="color: #806030">}</span> detecthal Yes
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span><span style="color: #400000; font-weight: bold">set</span> <span style="color: #806030">{</span><span style="color: #8c0000">88C83FCF</span><span style="color: #806030">-</span><span style="color: #8c0000">809E</span><span style="color: #806030">-</span><span style="color: #8c0000">4B72</span><span style="color: #806030">-</span><span style="color: #8c0000">8921</span><span style="color: #806030">-</span>D91E37DCD052<span style="color: #806030">}</span> winpe Yes
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span><span style="color: #400000; font-weight: bold">set</span> <span style="color: #806030">{</span><span style="color: #8c0000">88C83FCF</span><span style="color: #806030">-</span><span style="color: #8c0000">809E</span><span style="color: #806030">-</span><span style="color: #8c0000">4B72</span><span style="color: #806030">-</span><span style="color: #8c0000">8921</span><span style="color: #806030">-</span>D91E37DCD052<span style="color: #806030">}</span> osdevice ramdisk<span style="color: #806030">=</span><span style="color: #806030">[</span>boot<span style="color: #806030">]</span><span style="color: #806030">\</span>windows.pe<span style="color: #806030">\</span>vista_x86.wim<span style="color: #806030">,</span><span style="color: #806030">{</span>ramdiskoptions<span style="color: #806030">}</span>
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span><span style="color: #400000; font-weight: bold">set</span> <span style="color: #806030">{</span><span style="color: #8c0000">88C83FCF</span><span style="color: #806030">-</span><span style="color: #8c0000">809E</span><span style="color: #806030">-</span><span style="color: #8c0000">4B72</span><span style="color: #806030">-</span><span style="color: #8c0000">8921</span><span style="color: #806030">-</span>D91E37DCD052<span style="color: #806030">}</span> <span style="color: #400000; font-weight: bold">device</span> ramdisk<span style="color: #806030">=</span><span style="color: #806030">[</span>boot<span style="color: #806030">]</span><span style="color: #806030">\</span>windows.pe<span style="color: #806030">\</span>vista_x86.wim<span style="color: #806030">,</span><span style="color: #806030">{</span>ramdiskoptions<span style="color: #806030">}</span>
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span>create <span style="color: #806030">{</span><span style="color: #8c0000">7A213FBD</span><span style="color: #806030">-</span><span style="color: #8c0000">69BE</span><span style="color: #806030">-</span><span style="color: #8c0000">4B3F</span><span style="color: #806030">-</span>B08C<span style="color: #806030">-</span>B9A94CD929AC<span style="color: #806030">}</span> <span style="color: #806030">/</span>application osloader <span style="color: #806030">/</span>d <span style="color: #e60000">"Windows Vista 64-bit PE"</span>
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span><span style="color: #400000; font-weight: bold">set</span> <span style="color: #806030">{</span><span style="color: #8c0000">7A213FBD</span><span style="color: #806030">-</span><span style="color: #8c0000">69BE</span><span style="color: #806030">-</span><span style="color: #8c0000">4B3F</span><span style="color: #806030">-</span>B08C<span style="color: #806030">-</span>B9A94CD929AC<span style="color: #806030">}</span> systemroot <span style="color: #806030">\</span>Windows
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span><span style="color: #400000; font-weight: bold">set</span> <span style="color: #806030">{</span><span style="color: #8c0000">7A213FBD</span><span style="color: #806030">-</span><span style="color: #8c0000">69BE</span><span style="color: #806030">-</span><span style="color: #8c0000">4B3F</span><span style="color: #806030">-</span>B08C<span style="color: #806030">-</span>B9A94CD929AC<span style="color: #806030">}</span> detecthal Yes
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span><span style="color: #400000; font-weight: bold">set</span> <span style="color: #806030">{</span><span style="color: #8c0000">7A213FBD</span><span style="color: #806030">-</span><span style="color: #8c0000">69BE</span><span style="color: #806030">-</span><span style="color: #8c0000">4B3F</span><span style="color: #806030">-</span>B08C<span style="color: #806030">-</span>B9A94CD929AC<span style="color: #806030">}</span> winpe Yes
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span><span style="color: #400000; font-weight: bold">set</span> <span style="color: #806030">{</span><span style="color: #8c0000">7A213FBD</span><span style="color: #806030">-</span><span style="color: #8c0000">69BE</span><span style="color: #806030">-</span><span style="color: #8c0000">4B3F</span><span style="color: #806030">-</span>B08C<span style="color: #806030">-</span>B9A94CD929AC<span style="color: #806030">}</span> osdevice ramdisk<span style="color: #806030">=</span><span style="color: #806030">[</span>boot<span style="color: #806030">]</span><span style="color: #806030">\</span>windows.pe<span style="color: #806030">\</span>vista_x64.wim<span style="color: #806030">,</span><span style="color: #806030">{</span>ramdiskoptions<span style="color: #806030">}</span>
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span><span style="color: #400000; font-weight: bold">set</span> <span style="color: #806030">{</span><span style="color: #8c0000">7A213FBD</span><span style="color: #806030">-</span><span style="color: #8c0000">69BE</span><span style="color: #806030">-</span><span style="color: #8c0000">4B3F</span><span style="color: #806030">-</span>B08C<span style="color: #806030">-</span>B9A94CD929AC<span style="color: #806030">}</span> <span style="color: #400000; font-weight: bold">device</span> ramdisk<span style="color: #806030">=</span><span style="color: #806030">[</span>boot<span style="color: #806030">]</span><span style="color: #806030">\</span>windows.pe<span style="color: #806030">\</span>vista_x64.wim<span style="color: #806030">,</span><span style="color: #806030">{</span>ramdiskoptions<span style="color: #806030">}</span>
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span>create <span style="color: #806030">{</span>A5A5F300<span style="color: #806030">-</span><span style="color: #8c0000">04D4</span><span style="color: #806030">-</span><span style="color: #8c0000">4D98</span><span style="color: #806030">-</span><span style="color: #8c0000">9FD3</span><span style="color: #806030">-</span><span style="color: #8c0000">57E2E00E58D0</span><span style="color: #806030">}</span> <span style="color: #806030">/</span>application osloader <span style="color: #806030">/</span>d <span style="color: #e60000">"Windows 7 32-bit PE"</span>
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span><span style="color: #400000; font-weight: bold">set</span> <span style="color: #806030">{</span>A5A5F300<span style="color: #806030">-</span><span style="color: #8c0000">04D4</span><span style="color: #806030">-</span><span style="color: #8c0000">4D98</span><span style="color: #806030">-</span><span style="color: #8c0000">9FD3</span><span style="color: #806030">-</span><span style="color: #8c0000">57E2E00E58D0</span><span style="color: #806030">}</span> systemroot <span style="color: #806030">\</span>Windows
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span><span style="color: #400000; font-weight: bold">set</span> <span style="color: #806030">{</span>A5A5F300<span style="color: #806030">-</span><span style="color: #8c0000">04D4</span><span style="color: #806030">-</span><span style="color: #8c0000">4D98</span><span style="color: #806030">-</span><span style="color: #8c0000">9FD3</span><span style="color: #806030">-</span><span style="color: #8c0000">57E2E00E58D0</span><span style="color: #806030">}</span> detecthal Yes
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span><span style="color: #400000; font-weight: bold">set</span> <span style="color: #806030">{</span>A5A5F300<span style="color: #806030">-</span><span style="color: #8c0000">04D4</span><span style="color: #806030">-</span><span style="color: #8c0000">4D98</span><span style="color: #806030">-</span><span style="color: #8c0000">9FD3</span><span style="color: #806030">-</span><span style="color: #8c0000">57E2E00E58D0</span><span style="color: #806030">}</span> winpe Yes
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span><span style="color: #400000; font-weight: bold">set</span> <span style="color: #806030">{</span>A5A5F300<span style="color: #806030">-</span><span style="color: #8c0000">04D4</span><span style="color: #806030">-</span><span style="color: #8c0000">4D98</span><span style="color: #806030">-</span><span style="color: #8c0000">9FD3</span><span style="color: #806030">-</span><span style="color: #8c0000">57E2E00E58D0</span><span style="color: #806030">}</span> osdevice ramdisk<span style="color: #806030">=</span><span style="color: #806030">[</span>boot<span style="color: #806030">]</span><span style="color: #806030">\</span>windows.pe<span style="color: #806030">\</span>win7_x86.wim<span style="color: #806030">,</span><span style="color: #806030">{</span>ramdiskoptions<span style="color: #806030">}</span>
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span><span style="color: #400000; font-weight: bold">set</span> <span style="color: #806030">{</span>A5A5F300<span style="color: #806030">-</span><span style="color: #8c0000">04D4</span><span style="color: #806030">-</span><span style="color: #8c0000">4D98</span><span style="color: #806030">-</span><span style="color: #8c0000">9FD3</span><span style="color: #806030">-</span><span style="color: #8c0000">57E2E00E58D0</span><span style="color: #806030">}</span> <span style="color: #400000; font-weight: bold">device</span> ramdisk<span style="color: #806030">=</span><span style="color: #806030">[</span>boot<span style="color: #806030">]</span><span style="color: #806030">\</span>windows.pe<span style="color: #806030">\</span>win7_x86.wim<span style="color: #806030">,</span><span style="color: #806030">{</span>ramdiskoptions<span style="color: #806030">}</span>
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span>create <span style="color: #806030">{</span><span style="color: #8c0000">0341BB74</span><span style="color: #806030">-</span>EF1A<span style="color: #806030">-</span><span style="color: #8c0000">463C</span><span style="color: #806030">-</span><span style="color: #8c0000">8AFB</span><span style="color: #806030">-</span><span style="color: #8c0000">4025472EC7DB</span><span style="color: #806030">}</span> <span style="color: #806030">/</span>application osloader <span style="color: #806030">/</span>d <span style="color: #e60000">"Windows 7 64-bit PE"</span>
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span><span style="color: #400000; font-weight: bold">set</span> <span style="color: #806030">{</span><span style="color: #8c0000">0341BB74</span><span style="color: #806030">-</span>EF1A<span style="color: #806030">-</span><span style="color: #8c0000">463C</span><span style="color: #806030">-</span><span style="color: #8c0000">8AFB</span><span style="color: #806030">-</span><span style="color: #8c0000">4025472EC7DB</span><span style="color: #806030">}</span> systemroot <span style="color: #806030">\</span>Windows
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span><span style="color: #400000; font-weight: bold">set</span> <span style="color: #806030">{</span><span style="color: #8c0000">0341BB74</span><span style="color: #806030">-</span>EF1A<span style="color: #806030">-</span><span style="color: #8c0000">463C</span><span style="color: #806030">-</span><span style="color: #8c0000">8AFB</span><span style="color: #806030">-</span><span style="color: #8c0000">4025472EC7DB</span><span style="color: #806030">}</span> detecthal Yes
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span><span style="color: #400000; font-weight: bold">set</span> <span style="color: #806030">{</span><span style="color: #8c0000">0341BB74</span><span style="color: #806030">-</span>EF1A<span style="color: #806030">-</span><span style="color: #8c0000">463C</span><span style="color: #806030">-</span><span style="color: #8c0000">8AFB</span><span style="color: #806030">-</span><span style="color: #8c0000">4025472EC7DB</span><span style="color: #806030">}</span> winpe Yes
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span><span style="color: #400000; font-weight: bold">set</span> <span style="color: #806030">{</span><span style="color: #8c0000">0341BB74</span><span style="color: #806030">-</span>EF1A<span style="color: #806030">-</span><span style="color: #8c0000">463C</span><span style="color: #806030">-</span><span style="color: #8c0000">8AFB</span><span style="color: #806030">-</span><span style="color: #8c0000">4025472EC7DB</span><span style="color: #806030">}</span> osdevice ramdisk<span style="color: #806030">=</span><span style="color: #806030">[</span>boot<span style="color: #806030">]</span><span style="color: #806030">\</span>windows.pe<span style="color: #806030">\</span>win7_x64.wim<span style="color: #806030">,</span><span style="color: #806030">{</span>ramdiskoptions<span style="color: #806030">}</span>
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span><span style="color: #400000; font-weight: bold">set</span> <span style="color: #806030">{</span><span style="color: #8c0000">0341BB74</span><span style="color: #806030">-</span>EF1A<span style="color: #806030">-</span><span style="color: #8c0000">463C</span><span style="color: #806030">-</span><span style="color: #8c0000">8AFB</span><span style="color: #806030">-</span><span style="color: #8c0000">4025472EC7DB</span><span style="color: #806030">}</span> <span style="color: #400000; font-weight: bold">device</span> ramdisk<span style="color: #806030">=</span><span style="color: #806030">[</span>boot<span style="color: #806030">]</span><span style="color: #806030">\</span>windows.pe<span style="color: #806030">\</span>win7_x64.wim<span style="color: #806030">,</span><span style="color: #806030">{</span>ramdiskoptions<span style="color: #806030">}</span>
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span>create <span style="color: #806030">{</span>bootmgr<span style="color: #806030">}</span>
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span><span style="color: #400000; font-weight: bold">set</span> <span style="color: #806030">{</span>bootmgr<span style="color: #806030">}</span> timeout <span style="color: #8c0000">10</span>
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span>displayorder <span style="color: #806030">{</span><span style="color: #8c0000">88C83FCF</span><span style="color: #806030">-</span><span style="color: #8c0000">809E</span><span style="color: #806030">-</span><span style="color: #8c0000">4B72</span><span style="color: #806030">-</span><span style="color: #8c0000">8921</span><span style="color: #806030">-</span>D91E37DCD052<span style="color: #806030">}</span> <span style="color: #806030">{</span><span style="color: #8c0000">7A213FBD</span><span style="color: #806030">-</span><span style="color: #8c0000">69BE</span><span style="color: #806030">-</span><span style="color: #8c0000">4B3F</span><span style="color: #806030">-</span>B08C<span style="color: #806030">-</span>B9A94CD929AC<span style="color: #806030">}</span> <span style="color: #806030">{</span>A5A5F300<span style="color: #806030">-</span><span style="color: #8c0000">04D4</span><span style="color: #806030">-</span><span style="color: #8c0000">4D98</span><span style="color: #806030">-</span><span style="color: #8c0000">9FD3</span><span style="color: #806030">-</span><span style="color: #8c0000">57E2E00E58D0</span><span style="color: #806030">}</span> <span style="color: #806030">{</span><span style="color: #8c0000">0341BB74</span><span style="color: #806030">-</span>EF1A<span style="color: #806030">-</span><span style="color: #8c0000">463C</span><span style="color: #806030">-</span><span style="color: #8c0000">8AFB</span><span style="color: #806030">-</span><span style="color: #8c0000">4025472EC7DB</span><span style="color: #806030">}</span>
bcdedit <span style="color: #806030">/</span>store BCD_PXE <span style="color: #806030">/</span>default <span style="color: #806030">{</span><span style="color: #8c0000">0341BB74</span><span style="color: #806030">-</span>EF1A<span style="color: #806030">-</span><span style="color: #8c0000">463C</span><span style="color: #806030">-</span><span style="color: #8c0000">8AFB</span><span style="color: #806030">-</span><span style="color: #8c0000">4025472EC7DB</span><span style="color: #806030">}</span></pre>
<p>Execute the batch file should yield a new file: BCD_PXE. We need this file in later stage</p>
<h1>Files required by Windows PXE Boot Kernel</h1>
<p>Windows PXE kernel requires the following files to boot WinPE properly:</p><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># ls -l windows.pe</span>
total <span style="color: #c00000">829716</span>
-rwxr--r-- <span style="color: #c00000">1</span> root root <span style="color: #c00000">24576</span> Nov <span style="color: #c00000">3</span> <span style="color: #c00000">16</span><span style="color: #806030">:</span><span style="color: #c00000">55</span> BCD
-r-xr--r-- <span style="color: #c00000">1</span> root root <span style="color: #c00000">523328</span> Jul <span style="color: #c00000">14</span> <span style="color: #c00000">2009</span> bootmgr<span style="color: #400000; font-weight: bold">.</span>exe
-r-xr--r-- <span style="color: #c00000">1</span> root root <span style="color: #c00000">3170304</span> Jun <span style="color: #c00000">10</span> <span style="color: #c00000">2009</span> boot<span style="color: #400000; font-weight: bold">.</span>sdi
drwxr-xr-x <span style="color: #c00000">2</span> root root <span style="color: #c00000">4096</span> Nov <span style="color: #c00000">3</span> <span style="color: #c00000">17</span><span style="color: #806030">:</span><span style="color: #c00000">12</span> fonts
lrwxrwxrwx <span style="color: #c00000">1</span> root root <span style="color: #c00000">11</span> Nov <span style="color: #c00000">4</span> <span style="color: #c00000">16</span><span style="color: #806030">:</span><span style="color: #c00000">33</span> pxeboot<span style="color: #400000; font-weight: bold">.</span><span style="color: #c00000">0</span> -<span style="color: #e34adc">></span> pxeboot<span style="color: #400000; font-weight: bold">.</span>n12
-r-xr--r-- <span style="color: #c00000">1</span> root root <span style="color: #c00000">25772</span> Jun <span style="color: #c00000">11</span> <span style="color: #c00000">2009</span> pxeboot<span style="color: #400000; font-weight: bold">.</span>n12
-rwxr--r-- <span style="color: #c00000">1</span> root root <span style="color: #c00000">201179410</span> Nov <span style="color: #c00000">3</span> <span style="color: #c00000">13</span><span style="color: #806030">:</span><span style="color: #c00000">46</span> vista_x64<span style="color: #400000; font-weight: bold">.</span>wim
-rwxr--r-- <span style="color: #c00000">1</span> root root <span style="color: #c00000">182745379</span> Jan <span style="color: #c00000">23</span> <span style="color: #c00000">2008</span> vista_x86<span style="color: #400000; font-weight: bold">.</span>wim
-r-xr--r-- <span style="color: #c00000">1</span> root root <span style="color: #c00000">168390841</span> Jul <span style="color: #c00000">14</span> <span style="color: #c00000">2009</span> win7_re_x64<span style="color: #400000; font-weight: bold">.</span>wim
-r-xr--r-- <span style="color: #c00000">1</span> root root <span style="color: #c00000">145287084</span> Nov <span style="color: #c00000">20</span> <span style="color: #c00000">2010</span> win7_re_x86<span style="color: #400000; font-weight: bold">.</span>wim
-rwxr--r-- <span style="color: #c00000">1</span> root root <span style="color: #c00000">148246498</span> Nov <span style="color: #c00000">3</span> <span style="color: #c00000">18</span><span style="color: #806030">:</span><span style="color: #c00000">04</span> win7_x64<span style="color: #400000; font-weight: bold">.</span>wim</pre>
<h2>File: BCD</h2>
<p>BCD file should configure via BCDEdit tool. The above batch script generate a BCD file with file name BCD_PXE. Rename it to BCD and keep in TFTP folder</p>
<h2>File: bootmgr.exe, pxeboot.n12</h2>
<p>Obtain from mounted WinPE image: <mount-dir>\Windows\Boot\PXE</p>
<h2>File: boot.sdi</h2>
<p>Obtain from mounted WinPE image: <mount-dir>\Windows\Boot\DVD\PCAT</p>
<h2>Folder: fonts</h2>
<p>Obtain from mounted WinPE image: <mount-dir>\Windows\Boot\Fonts</p>
<h1></h1>
<h2></h2>
<h2>File: *.wim</h2>
<p>WinPE images. Prepared by WAIK tools.</p>
<h1>Configure PXE Service </h1>
<h2>Windows PXE boot kernel file</h2>
<p>The default Windows PXE boot kernel file has named as “pxeboot.n12”. PXELinux requires Windows PXE boot kernel with suffix of .0 instead of .n12, use </p><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># ln -s pxeboot.n12 pxeboot.0</span></pre>
<h2>PXE menus</h2>
<p>Add a menu entry in pxelinux configuration that boot Windows PXE boot Kernel:</p><pre style="background: #f1f0f0; color: #000000">$ cat /var/lib/tftpboot/<span style="color: #40015a">pxelinux.cfg/default</span>
<span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span>
LABEL WINDOWS_PE
menu label ^Windows Preinstallation Exnvironment
kernel <span style="color: #40015a">windows.pe/pxeboot.0</span>
<span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span><span style="color: #400000; font-weight: bold">.</span>
</pre>
<h2>TFTP server file name remapping: /var/lib/tftpboot/rules</h2>
<p>Windows PXE boot kernel requires files in specific location, use TFTP server file name remapping option to remap the file name to actual location.</p>
<p>Locate TFTP rules file:</p><pre style="background: #f1f0f0; color: #000000"><span style="color: #c34e00"># cat /etc/xinetd.d/tftp</span>
service tftp
<span style="color: #806030">{</span>
disable <span style="color: #44aadd">=</span> no
socket_type <span style="color: #44aadd">=</span> dgram
protocol <span style="color: #44aadd">=</span> udp
<span style="color: #bb7977; font-weight: bold">wait</span> <span style="color: #44aadd">=</span> yes
user <span style="color: #44aadd">=</span> root
server <span style="color: #44aadd">=</span> <span style="color: #40015a">/usr/sbin/in.tftpd</span>
server_args <span style="color: #44aadd">=</span> <span style="color: #44aadd">-v</span> -m <span style="color: #40015a">/var/lib/tftpboot/rules</span> <span style="color: #44aadd">-s</span> <span style="color: #40015a">/var/lib/tftpboot</span>
per_source <span style="color: #44aadd">=</span> <span style="color: #c00000">11</span>
cps <span style="color: #44aadd">=</span> <span style="color: #c00000">100</span> <span style="color: #c00000">2</span>
flags <span style="color: #44aadd">=</span> IPv4
<span style="color: #806030">}</span>
</pre>
<p>Enable remapping as follow:</p><pre style="background: #f1f0f0; color: #000000">$ cat /var/lib/tftpboot/rules
rg <span style="color: #0f6900">\\</span> / <span style="color: #c34e00"># convert backslashes to slashes (useful for windows file names)</span>
r ^bootmgr<span style="color: #0f6900">\.</span>exe <span style="color: #40015a">/windows.pe/bootmgr.exe</span>
r ^<span style="color: #40015a">/Boot</span> <span style="color: #40015a">/windows.pe</span></pre>
<p>Try boot a bare bone machine with network PXE enabled and see if the Windows PXE kernel and WinPE files boot properly</p>
<h1>Reference</h1>
<ol>
<li>h<a href="http://solitudo.net/blah/posts/Create_Windows_PE_rescue_and_installation_images_using_WAIK_for_Windows_7_and_configure_Linux_boot_server_for_PXE_booting_the_images/">ttp://solitudo.net/blah/posts/Create_Windows_PE_rescue_and_installation_images_using_WAIK_for_Windows_7_and_configure_Linux_boot_server_for_PXE_booting_the_images/</a> </li></ol> Chau Chee Yanghttp://www.blogger.com/profile/11816699461509455308noreply@blogger.com1