<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:georss="http://www.georss.org/georss" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Mick's Breeze Blogs - Biztalk/Sharepoint/... - WinPE</title>
    <link>http://blogs.breeze.net/mickb/</link>
    <description>Things hard and not so hard....</description>
    <language>en-us</language>
    <copyright>Breeze</copyright>
    <lastBuildDate>Mon, 19 Oct 2009 00:24:16 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>mickb@breezetraining.com.au</managingEditor>
    <webMaster>mickb@breezetraining.com.au</webMaster>
    <item>
      <trackback:ping>http://blogs.breeze.net/mickb/Trackback.aspx?guid=661ec631-4f23-410c-ab2b-32358a2fd6fa</trackback:ping>
      <pingback:server>http://blogs.breeze.net/mickb/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.breeze.net/mickb/PermaLink,guid,661ec631-4f23-410c-ab2b-32358a2fd6fa.aspx</pingback:target>
      <dc:creator>Mick Badran</dc:creator>
      <wfw:comment>http://blogs.breeze.net/mickb/CommentView,guid,661ec631-4f23-410c-ab2b-32358a2fd6fa.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.breeze.net/mickb/SyndicationService.asmx/GetEntryCommentsRss?guid=661ec631-4f23-410c-ab2b-32358a2fd6fa</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Whilst on my travels last week I also ran into Oleg Lofman (MCS SharePoint Consultant)
whom amongst other things (showed me a great travel game - <a href="http://www.travelpod.com/traveler-iq?ba96=7587">http://www.travelpod.com/traveler-iq?ba96=7587</a>)
pointed me towards a tool called <strong>WIM2VHD</strong>.
</p>
        <p>
Basically this tool allows you to go straight from a <strong>WIM file to VHD!! </strong>You
can even specify an Answer file also. So no need to mount the ISO, go through the
bootloader and copy all the files needed, then expand etc etc as part of the setup.
</p>
        <p>
So seeing that Windows 7/Server 2008 R2 has a bunch of WIMs under the \Sources folder,
you can simply go there and take your pick as to how extensive you want the base OS
to be : Core…or something more!
</p>
        <p>
Check it out:
</p>
        <p>
          <a title="http://code.msdn.microsoft.com/wim2vhd" href="http://code.msdn.microsoft.com/wim2vhd">http://code.msdn.microsoft.com/wim2vhd</a>
        </p>
        <p>
As you can see below, it’s a pretty extensive and detailed tool: (you can even apply
hotfixes to the VHD during this process)
</p>
        <p>
--- snip from the above page ---
</p>
        <h4>Usage 
</h4>
        <a name="usage">
        </a>
        <pre>Usage: WIM2VHD.WSF /wim:&lt;wimPath&gt; /sku:&lt;sku&gt;
[/vhd:&lt;vhdPath&gt;] [/size:&lt;vhdSizeInMb&gt;] [/disktype:&lt;dynamic|fixed&gt;]
[/unattend:&lt;unattendXmlPath&gt;] [/qfe:&lt;qfe1,...,qfeN&gt;]
[/ref:&lt;ref1,...,refN] [/dbg:&lt;args&gt;] [/copylocal:&lt;localFolder&gt;]
[/passthru:&lt;physicalDrive&gt;] [/signdisk:&lt;true|false&gt;]
[/mergefolder:&lt;folderToMerge&gt;]
 
Required parameters:
 
  /wim:&lt;wimPath&gt;
 
    The path of the WIM file to use when creating the VHD.  For example:
    X:\sources\install.wim
 
    Where X: is the drive letter of your DVD ROM drive.
 
  /sku:&lt;skuName&gt;|&lt;skuIndex&gt;
 
    The SKU within the WIM to use when creating the VHD (e.g. "ServerStandard",
    "ServerDatacenterCore", "2", etc.).  This value can either be passed as a
    SKU name (typically the easiest method) or as a SKU index (which requires
    you to have manually inspected the WIM with a tool like IMAGEX.EXE).
 
Optional parameters:
 
  /vhd:&lt;vhdPath&gt;
 
    The path and name of the VHD to be created.  If a file with this name
    already exists, it will be overwritten.  If no VHD is specified, a VHD will
    be created in the current folder with a name in the following format:
    &lt;Major&gt;.&lt;Minor&gt;.&lt;Build&gt;.&lt;Rev&gt;.&lt;Arch&gt;.&lt;Branch&gt;.&lt;Timestamp&gt;.&lt;SKU&gt;.&lt;Lang&gt;.vhd
    ex:
       6.1.7100.0.x86fre.winmain_win7rc.090421-1700.Ultimate.en-us.vhd
 
    NOTE: If the language cannot be determined from the WIM, no &lt;Lang&gt; block
    will be included in the VHD name.
 
  /size:&lt;vhdSizeInMb&gt;
 
    For Fixed disks, this is the size in MB of the VHD that will be created.
    For Dynamic disks, this is the maximum size in MB that the VHD can grow to
    as additional space is required.
    If unspecified, a default value of 40960 MB (40 GB) will be used.
 
  /disktype:&lt;Dynamic|Fixed&gt;
 
    Specifies what kind of VHD should be created: Dynamic or Fixed.
    A Fixed disk allocates all of the necessary disk space for the VHD upon
    creation.  A Dynamic disk only allocates the space required by files in
    the VHD at any given time, and will grow as more space is required.
    The default value is Dynamic.
 
  /unattend:&lt;unattendXmlPath&gt;
 
    The path to an unattend.xml file that will be used to automate the OOBE
    portion of Windows setup the first time the VHD is booted.
 
  /qfe:&lt;qfe1,...,qfeN&gt;
 
    A comma-separated list of QFEs to apply to the VHD after the WIM is
    applied.  QFEs must be in the .MSU file format, which is the default
    QFE format for Windows 7.  They can also be provided in a .CAB format
    if you'd prefer to extract the .CABs from the .MSU files.
 
    To extract a CAB from an .MSU, use the following command:
 
    expand -f:win*.cab &lt;.MSU file&gt; &lt;location to extract to&gt;
 
  /ref:&lt;ref1,...,refN&gt;
 
    A comma-separated list of WIM pieces to apply to the VHD.
    A "WIM piece" is the result of a Split WIM, and typically has a .SWM
    file extension.  The first piece of the Split WIM should be specified with
    the /WIM switch. Subsequent pieces should be specified with /REF.
      ex: WIM2VHD.WSF /WIM:C:\split.swm /REF:C:\split2.swm,c:\split3.swm
 
    See IMAGEX.EXE /SPLIT /? for more information.
 
  /dbg:&lt;protocol&gt;,&lt;port/channel/target&gt;[,&lt;baudrate&gt;]
 
    Configures debugging in the OS on the VHD.
    examples:
      /dbg:serial,1,115200 - configures serial debugging on COM1 at 115200bps
      /dbg:1394,10 - configures 1394 debugging on channel 10
      /dbg:usb,debugging - configures USB debugging with the target DEBUGGING
 
  /copylocal:&lt;localFolder&gt;
 
    Copies all of the files necessary to run WIM2VHD.WSF to localFolder,
    eliminating the need to install the Windows AIK or OPK.  This does not
    include any WIM files, just the binaries that WIM2VHD.WSF depends on.
    After this operating completes, run WIM2VHD.WSF from localFolder.
    If this switch is specified, no VHD will be created.
 
  /passthru:&lt;physicalDrive&gt;
 
    Applies the WIM directly to the specified drive and makes it bootable.
    NOTE: The partition on the disk must be marked as ACTIVE in order to boot
    successfully. This action is NOT performed by WIM2VHD.WSF.
 
  /signdisk:&lt;true|false&gt;
 
    Specifies whether or not WIM2VHD.WSF should leave a signature on the VHD
    that indicates what version of WIM2VHD.WSF created the VHD, and the date
    of creation.  The signature will be located at &lt;VHD&gt;:\Windows\WIM2VHD.TXT.
    The default value is "true".
 
  /mergefolder:&lt;folderToMerge&gt;
 
    Copies the contents of folderToMerge to the root directory of the VHD.
    This includes all subfiles and subfolders.  Any files that already exist on
    the VHD will be overwritten.
</pre>
        <p>
          <br />
 
</p>
        <p>
 
</p>
        <p>
This will certainly make my life easier when it comes to building VMs!!! Thanks Oleg
for the tip.
</p>
        <img width="0" height="0" src="http://blogs.breeze.net/mickb/aggbug.ashx?id=661ec631-4f23-410c-ab2b-32358a2fd6fa" />
      </body>
      <title>Making a Windows 7/ 2008 R2 Server VM the Easy Way – WIM2VHD Tool</title>
      <guid isPermaLink="false">http://blogs.breeze.net/mickb/PermaLink,guid,661ec631-4f23-410c-ab2b-32358a2fd6fa.aspx</guid>
      <link>http://blogs.breeze.net/mickb/2009/10/19/MakingAWindows72008R2ServerVMTheEasyWayWIM2VHDTool.aspx</link>
      <pubDate>Mon, 19 Oct 2009 00:24:16 GMT</pubDate>
      <description>&lt;p&gt;
Whilst on my travels last week I also ran into Oleg Lofman (MCS SharePoint Consultant)
whom amongst other things (showed me a great travel game - &lt;a href="http://www.travelpod.com/traveler-iq?ba96=7587"&gt;http://www.travelpod.com/traveler-iq?ba96=7587&lt;/a&gt;)
pointed me towards a tool called &lt;strong&gt;WIM2VHD&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
Basically this tool allows you to go straight from a &lt;strong&gt;WIM file to VHD!! &lt;/strong&gt;You
can even specify an Answer file also. So no need to mount the ISO, go through the
bootloader and copy all the files needed, then expand etc etc as part of the setup.
&lt;/p&gt;
&lt;p&gt;
So seeing that Windows 7/Server 2008 R2 has a bunch of WIMs under the \Sources folder,
you can simply go there and take your pick as to how extensive you want the base OS
to be : Core…or something more!
&lt;/p&gt;
&lt;p&gt;
Check it out:
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://code.msdn.microsoft.com/wim2vhd" href="http://code.msdn.microsoft.com/wim2vhd"&gt;http://code.msdn.microsoft.com/wim2vhd&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
As you can see below, it’s a pretty extensive and detailed tool: (you can even apply
hotfixes to the VHD during this process)
&lt;/p&gt;
&lt;p&gt;
--- snip from the above page ---
&lt;/p&gt;
&lt;h4&gt;Usage 
&lt;/h4&gt;
&lt;a name="usage"&gt;&lt;/a&gt;&lt;pre&gt;Usage: WIM2VHD.WSF /wim:&amp;lt;wimPath&amp;gt; /sku:&amp;lt;sku&amp;gt;
[/vhd:&amp;lt;vhdPath&amp;gt;] [/size:&amp;lt;vhdSizeInMb&amp;gt;] [/disktype:&amp;lt;dynamic|fixed&amp;gt;]
[/unattend:&amp;lt;unattendXmlPath&amp;gt;] [/qfe:&amp;lt;qfe1,...,qfeN&amp;gt;]
[/ref:&amp;lt;ref1,...,refN] [/dbg:&amp;lt;args&amp;gt;] [/copylocal:&amp;lt;localFolder&amp;gt;]
[/passthru:&amp;lt;physicalDrive&amp;gt;] [/signdisk:&amp;lt;true|false&amp;gt;]
[/mergefolder:&amp;lt;folderToMerge&amp;gt;]
 
Required parameters:
 
  /wim:&amp;lt;wimPath&amp;gt;
 
    The path of the WIM file to use when creating the VHD.  For example:
    X:\sources\install.wim
 
    Where X: is the drive letter of your DVD ROM drive.
 
  /sku:&amp;lt;skuName&amp;gt;|&amp;lt;skuIndex&amp;gt;
 
    The SKU within the WIM to use when creating the VHD (e.g. "ServerStandard",
    "ServerDatacenterCore", "2", etc.).  This value can either be passed as a
    SKU name (typically the easiest method) or as a SKU index (which requires
    you to have manually inspected the WIM with a tool like IMAGEX.EXE).
 
Optional parameters:
 
  /vhd:&amp;lt;vhdPath&amp;gt;
 
    The path and name of the VHD to be created.  If a file with this name
    already exists, it will be overwritten.  If no VHD is specified, a VHD will
    be created in the current folder with a name in the following format:
    &amp;lt;Major&amp;gt;.&amp;lt;Minor&amp;gt;.&amp;lt;Build&amp;gt;.&amp;lt;Rev&amp;gt;.&amp;lt;Arch&amp;gt;.&amp;lt;Branch&amp;gt;.&amp;lt;Timestamp&amp;gt;.&amp;lt;SKU&amp;gt;.&amp;lt;Lang&amp;gt;.vhd
    ex:
       6.1.7100.0.x86fre.winmain_win7rc.090421-1700.Ultimate.en-us.vhd
 
    NOTE: If the language cannot be determined from the WIM, no &amp;lt;Lang&amp;gt; block
    will be included in the VHD name.
 
  /size:&amp;lt;vhdSizeInMb&amp;gt;
 
    For Fixed disks, this is the size in MB of the VHD that will be created.
    For Dynamic disks, this is the maximum size in MB that the VHD can grow to
    as additional space is required.
    If unspecified, a default value of 40960 MB (40 GB) will be used.
 
  /disktype:&amp;lt;Dynamic|Fixed&amp;gt;
 
    Specifies what kind of VHD should be created: Dynamic or Fixed.
    A Fixed disk allocates all of the necessary disk space for the VHD upon
    creation.  A Dynamic disk only allocates the space required by files in
    the VHD at any given time, and will grow as more space is required.
    The default value is Dynamic.
 
  /unattend:&amp;lt;unattendXmlPath&amp;gt;
 
    The path to an unattend.xml file that will be used to automate the OOBE
    portion of Windows setup the first time the VHD is booted.
 
  /qfe:&amp;lt;qfe1,...,qfeN&amp;gt;
 
    A comma-separated list of QFEs to apply to the VHD after the WIM is
    applied.  QFEs must be in the .MSU file format, which is the default
    QFE format for Windows 7.  They can also be provided in a .CAB format
    if you'd prefer to extract the .CABs from the .MSU files.
 
    To extract a CAB from an .MSU, use the following command:
 
    expand -f:win*.cab &amp;lt;.MSU file&amp;gt; &amp;lt;location to extract to&amp;gt;
 
  /ref:&amp;lt;ref1,...,refN&amp;gt;
 
    A comma-separated list of WIM pieces to apply to the VHD.
    A "WIM piece" is the result of a Split WIM, and typically has a .SWM
    file extension.  The first piece of the Split WIM should be specified with
    the /WIM switch. Subsequent pieces should be specified with /REF.
      ex: WIM2VHD.WSF /WIM:C:\split.swm /REF:C:\split2.swm,c:\split3.swm
 
    See IMAGEX.EXE /SPLIT /? for more information.
 
  /dbg:&amp;lt;protocol&amp;gt;,&amp;lt;port/channel/target&amp;gt;[,&amp;lt;baudrate&amp;gt;]
 
    Configures debugging in the OS on the VHD.
    examples:
      /dbg:serial,1,115200 - configures serial debugging on COM1 at 115200bps
      /dbg:1394,10 - configures 1394 debugging on channel 10
      /dbg:usb,debugging - configures USB debugging with the target DEBUGGING
 
  /copylocal:&amp;lt;localFolder&amp;gt;
 
    Copies all of the files necessary to run WIM2VHD.WSF to localFolder,
    eliminating the need to install the Windows AIK or OPK.  This does not
    include any WIM files, just the binaries that WIM2VHD.WSF depends on.
    After this operating completes, run WIM2VHD.WSF from localFolder.
    If this switch is specified, no VHD will be created.
 
  /passthru:&amp;lt;physicalDrive&amp;gt;
 
    Applies the WIM directly to the specified drive and makes it bootable.
    NOTE: The partition on the disk must be marked as ACTIVE in order to boot
    successfully. This action is NOT performed by WIM2VHD.WSF.
 
  /signdisk:&amp;lt;true|false&amp;gt;
 
    Specifies whether or not WIM2VHD.WSF should leave a signature on the VHD
    that indicates what version of WIM2VHD.WSF created the VHD, and the date
    of creation.  The signature will be located at &amp;lt;VHD&amp;gt;:\Windows\WIM2VHD.TXT.
    The default value is "true".
 
  /mergefolder:&amp;lt;folderToMerge&amp;gt;
 
    Copies the contents of folderToMerge to the root directory of the VHD.
    This includes all subfiles and subfolders.  Any files that already exist on
    the VHD will be overwritten.
&lt;/pre&gt;
&lt;p&gt;
&lt;br&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
This will certainly make my life easier when it comes to building VMs!!! Thanks Oleg
for the tip.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.breeze.net/mickb/aggbug.ashx?id=661ec631-4f23-410c-ab2b-32358a2fd6fa" /&gt;</description>
      <comments>http://blogs.breeze.net/mickb/CommentView,guid,661ec631-4f23-410c-ab2b-32358a2fd6fa.aspx</comments>
      <category>Tips</category>
      <category>WinPE</category>
    </item>
    <item>
      <trackback:ping>http://blogs.breeze.net/mickb/Trackback.aspx?guid=cbd5193b-ebf4-47d5-8c22-dff27caebd0f</trackback:ping>
      <pingback:server>http://blogs.breeze.net/mickb/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.breeze.net/mickb/PermaLink,guid,cbd5193b-ebf4-47d5-8c22-dff27caebd0f.aspx</pingback:target>
      <dc:creator>Mick Badran</dc:creator>
      <wfw:comment>http://blogs.breeze.net/mickb/CommentView,guid,cbd5193b-ebf4-47d5-8c22-dff27caebd0f.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.breeze.net/mickb/SyndicationService.asmx/GetEntryCommentsRss?guid=cbd5193b-ebf4-47d5-8c22-dff27caebd0f</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Well after a few hardware failures at work and many hours rebuilding servers that
are *supposed* to have RAID 5 on them, I’m back online.<br />
(They had RAID enabled at the BIOS level, and there’s a BIOS boot based tool that
let’s you create/delete stripes etc. BUT you need to use the ‘Windows’ version of
their tool to ‘REPAIR’ the volume. Now if you can’t boot to an O/S….here in lies my
problem… I want to plug the new drive in and ‘boom’ rebuild done… but no!)
</p>
        <p>
I wanted to share a tip which came out of all of this – <strong>Creating a Windows
7 Boot WinPE USB Key</strong>.<br />
You know the 20 odd things you have lying around and are wondering what you could
do with 1GB, 512MB etc keys.<br /><br />
You can make a boot disk out of them…cool… (provided your machine supports booting
from USB, unlike my mac_mini at home running Windows 7 :)<br />
You could make an x86 boot and on another create a x64 AND you can still store your
data.
</p>
        <p>
It’s not too tough really – couple of things you need upfront
</p>
        <ol>
          <li>
USB Key, drive or whatever</li>
          <li>
            <a href="http://download.microsoft.com/download/C/1/F/C1F49C3C-D633-4249-82ED-B3148EA09B45/KB3AIK_EN.iso" target="_blank">Windows
Application Installation Kit for Windows 7 RC</a> (WAIK) – free download with the
WinPE ‘image’ in it and all the tools (a WIM file)</li>
          <li>
Some of your favourite recovery tools to add to your usb key</li>
        </ol>
        <p>
Ok good to go.
</p>
        <p>
Let’s start
</p>
        <ol>
          <li>
Install the WAIK on your local machine – it installs folders for x86, amd64 and i64…cool</li>
          <li>
From the Start Menu-&gt;All Programs-&gt;Microsoft Windows AIK-&gt;Deployment Tools
Command Prompt</li>
          <li>
Execute the command <strong>copype x86 c:\PEBuild </strong>(replace <strong>x86 </strong>for <strong>amd64</strong> if
you want 64bit. This will create the directory c:\PEBuild and copy the required files
to get started.<br /><a href="http://blogs.breezetraining.com.au/mickb/content/CreatingaWindows7WinPEBootDiskImageXERRO_C98/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/CreatingaWindows7WinPEBootDiskImageXERRO_C98/image_thumb.png" width="644" height="191" /></a></li>
          <li>
You’ll notice now that you should be in the <strong>C:\PEBuild</strong> folder – this
is our ‘working space’ and there will be a couple of sub-directories here.<br /></li>
          <li>
Let’s mount the <strong>Image</strong> so we can manipulate files, and then later
save them back into the Image for deployment, as follows:</li>
        </ol>
        <ol>
          <li>
            <code>
              <font face="Verdana">run the command</font>
              <font face="verda"> imagex /mountrw
winpe.wim 1 mount (this will mount the vanilla winpe.wim and create a ‘mount’ directory
for us to use)<br /><br />
- this didn’t work for me on 2 machines that I tried as follows (I was pretty happy)<br /></font>
              <a href="http://blogs.breezetraining.com.au/mickb/content/CreatingaWindows7WinPEBootDiskImageXERRO_C98/image_3.png">
                <font color="#000000" face="verda">
                  <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/CreatingaWindows7WinPEBootDiskImageXERRO_C98/image_thumb_3.png" width="644" height="327" />
                </font>
              </a>
              <font face="verda">
                <br />
                <br />
if this works for you – then great, it’s meant to. :-) (there maybe open files etc)<br /><br />
Fortunately I had a <strong>PLAN B</strong> that works regardless (alot of the documentation
use ImageX)<br /><br />
Issue the command from the C:\PEBuild dir: </font>
              <strong>
                <font face="verda">dism
/mount-wim /wimfile:winpe.wim /index:1 /mountdir:c:\PEBuild\Mount</font>
                <br />
                <a href="http://blogs.breezetraining.com.au/mickb/content/CreatingaWindows7WinPEBootDiskImageXERRO_C98/image_4.png">
                  <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/CreatingaWindows7WinPEBootDiskImageXERRO_C98/image_thumb_4.png" width="644" height="339" />
                </a>
                <br />
              </strong>
            </code>
          </li>
          <li>
Go to the <strong>Mount Directory </strong>to see several folders – if you used my
PlanB approach you can store the files in Program files if you like, or wherever.
If you need access to the <strong>Startup</strong> folder it’s hidden in the same
dir as Program Files.<br /><br />
Copy your Win32/64 tools and utilities here to the mount dir (once fully booted up
with WinPE, you will be in a RamDisk with the drive letter of X: – good idea to always
use environment vars to get special folders if you need to)<br /><br />
You can add other support like scripting, powershell etc – check out the packages<br /></li>
          <li>
Once done – <strong>commit the changes to the WinPE.wim</strong> with the command</li>
        </ol>
        <ol>
          <li>
ImageX Cmd:<strong> imagex /unmount /commit /c:\pebuild\mount</strong></li>
          <li>
dism Cmd: <strong>dism /unmount-wim /moundir:c:\pebuild\mount /commit<br /><br /><a href="http://blogs.breezetraining.com.au/mickb/content/CreatingaWindows7WinPEBootDiskImageXERRO_C98/image_5.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/CreatingaWindows7WinPEBootDiskImageXERRO_C98/image_thumb_5.png" width="660" height="200" /></a></strong></li>
        </ol>
        <li>
Almost done :)<br /></li>
        <li>
Copy the now *modified* WinPe.Wim image file to the correct directory (and we rename)
so it runs smoothly in the boot sequence. Run <strong>copy /y winpe.wim iso/sources/boot.wim 
<br /></strong></li>
        <li>
(optional step) To create an ISO of your work, issue the following command:<br /><strong>ocsdimg –n –b”c:\Program Files\Windows AIK\Tools\x86\boot\etfsboot.com” c:\PEBuild\ISO
c:\PEBuild\WinPE.iso<br /></strong></li>
        <li>
Next let’s add our good work to our USB key and we’re done (WE WILL ERASE YOUR KEY
– back it up if needed. you can copy your stuff back on when we’ve finished)</li>
        <ol>
          <li>
Plug your USB key in and we’re going to ntfs format it, create an active primary partition
and assign a drive letter to it.</li>
          <li>
From your command prompt use <strong>diskpart </strong>as follows:</li>
        </ol>
        <ol>
          <li>
            <strong>c:\PEBuild\diskpart</strong>
          </li>
          <li>
            <strong>list disk </strong>(you should see your USB drive come up in the list – this
is the drive # to work with e.g. 1)</li>
          <li>
            <strong>sel disk 1 </strong>(double check from the previous command on what disk number
your USB is on – mine is 1)</li>
          <li>
            <strong>clean</strong>
          </li>
          <li>
            <strong>create part primary</strong>
          </li>
          <li>
            <strong>sel part 1</strong>
          </li>
          <li>
            <strong>format fs=NTFS QUICK</strong>
          </li>
          <li>
            <strong>assign</strong>
          </li>
          <li>
            <strong>exit</strong>
          </li>
          <li>
viola! your usb is now prepared.<br /></li>
        </ol>
        <li>
We need to do 2 final steps – copy everything within the <strong>ISO </strong>directory
straight to your USB key. e.g. <strong>c:\PEBuild\ISO </strong>(from Explorer you’ll
be able to get to your USB Key easily through the SendTo right mouse menu)<br /><br /><strong>Take note of your USB Key’s DRIVE letter</strong><br /></li>
        <li>
Write the ‘bootsector’ as follows:</li>
        <ol>
          <li>
            <strong>c:\program files\Windows AIK\Tools\PETools\x86\bootsect /nt60 <em>&lt;drive
letter of your USB Key&gt;</em></strong>
          </li>
        </ol>
        <p>
Hopefully I’ve saved you some time and pain….. happy booting….
</p>
        <img width="0" height="0" src="http://blogs.breeze.net/mickb/aggbug.ashx?id=cbd5193b-ebf4-47d5-8c22-dff27caebd0f" />
      </body>
      <title>Creating a Windows 7 WinPE Boot Disk - ImageX ERROR:&amp;ldquo;Error mounting image&amp;rdquo; &amp;ldquo;the parameter is incorrect&amp;rdquo;</title>
      <guid isPermaLink="false">http://blogs.breeze.net/mickb/PermaLink,guid,cbd5193b-ebf4-47d5-8c22-dff27caebd0f.aspx</guid>
      <link>http://blogs.breeze.net/mickb/2009/05/08/CreatingAWindows7WinPEBootDiskImageXERRORldquoErrorMountingImagerdquoLdquotheParameterIsIncorrectrdquo.aspx</link>
      <pubDate>Fri, 08 May 2009 14:54:36 GMT</pubDate>
      <description>&lt;p&gt;
Well after a few hardware failures at work and many hours rebuilding servers that
are *supposed* to have RAID 5 on them, I’m back online.&lt;br&gt;
(They had RAID enabled at the BIOS level, and there’s a BIOS boot based tool that
let’s you create/delete stripes etc. BUT you need to use the ‘Windows’ version of
their tool to ‘REPAIR’ the volume. Now if you can’t boot to an O/S….here in lies my
problem… I want to plug the new drive in and ‘boom’ rebuild done… but no!)
&lt;/p&gt;
&lt;p&gt;
I wanted to share a tip which came out of all of this – &lt;strong&gt;Creating a Windows
7 Boot WinPE USB Key&lt;/strong&gt;.&lt;br&gt;
You know the 20 odd things you have lying around and are wondering what you could
do with 1GB, 512MB etc keys.&lt;br&gt;
&lt;br&gt;
You can make a boot disk out of them…cool… (provided your machine supports booting
from USB, unlike my mac_mini at home running Windows 7 :)&lt;br&gt;
You could make an x86 boot and on another create a x64 AND you can still store your
data.
&lt;/p&gt;
&lt;p&gt;
It’s not too tough really – couple of things you need upfront
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
USB Key, drive or whatever&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://download.microsoft.com/download/C/1/F/C1F49C3C-D633-4249-82ED-B3148EA09B45/KB3AIK_EN.iso" target="_blank"&gt;Windows
Application Installation Kit for Windows 7 RC&lt;/a&gt; (WAIK) – free download with the
WinPE ‘image’ in it and all the tools (a WIM file)&lt;/li&gt;
&lt;li&gt;
Some of your favourite recovery tools to add to your usb key&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
Ok good to go.
&lt;/p&gt;
&lt;p&gt;
Let’s start
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Install the WAIK on your local machine – it installs folders for x86, amd64 and i64…cool&lt;/li&gt;
&lt;li&gt;
From the Start Menu-&amp;gt;All Programs-&amp;gt;Microsoft Windows AIK-&amp;gt;Deployment Tools
Command Prompt&lt;/li&gt;
&lt;li&gt;
Execute the command &lt;strong&gt;copype x86 c:\PEBuild &lt;/strong&gt;(replace &lt;strong&gt;x86 &lt;/strong&gt;for &lt;strong&gt;amd64&lt;/strong&gt; if
you want 64bit. This will create the directory c:\PEBuild and copy the required files
to get started.&lt;br&gt;
&lt;a href="http://blogs.breezetraining.com.au/mickb/content/CreatingaWindows7WinPEBootDiskImageXERRO_C98/image.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/CreatingaWindows7WinPEBootDiskImageXERRO_C98/image_thumb.png" width="644" height="191"&gt;&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
You’ll notice now that you should be in the &lt;strong&gt;C:\PEBuild&lt;/strong&gt; folder – this
is our ‘working space’ and there will be a couple of sub-directories here.&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
Let’s mount the &lt;strong&gt;Image&lt;/strong&gt; so we can manipulate files, and then later
save them back into the Image for deployment, as follows:&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;&lt;font face="Verdana"&gt;run the command&lt;/font&gt;&lt;font face="verda"&gt; imagex /mountrw
winpe.wim 1 mount (this will mount the vanilla winpe.wim and create a ‘mount’ directory
for us to use)&lt;br&gt;
&lt;br&gt;
- this didn’t work for me on 2 machines that I tried as follows (I was pretty happy)&lt;br&gt;
&lt;/font&gt;&lt;a href="http://blogs.breezetraining.com.au/mickb/content/CreatingaWindows7WinPEBootDiskImageXERRO_C98/image_3.png"&gt;&lt;font color="#000000" face="verda"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/CreatingaWindows7WinPEBootDiskImageXERRO_C98/image_thumb_3.png" width="644" height="327"&gt;&lt;/font&gt;&lt;/a&gt;&lt;font face="verda"&gt; 
&lt;br&gt;
&lt;br&gt;
if this works for you – then great, it’s meant to. :-) (there maybe open files etc)&lt;br&gt;
&lt;br&gt;
Fortunately I had a &lt;strong&gt;PLAN B&lt;/strong&gt; that works regardless (alot of the documentation
use ImageX)&lt;br&gt;
&lt;br&gt;
Issue the command from the C:\PEBuild dir: &lt;/font&gt;&lt;strong&gt;&lt;font face="verda"&gt;dism
/mount-wim /wimfile:winpe.wim /index:1 /mountdir:c:\PEBuild\Mount&lt;/font&gt;
&lt;br&gt;
&lt;a href="http://blogs.breezetraining.com.au/mickb/content/CreatingaWindows7WinPEBootDiskImageXERRO_C98/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/CreatingaWindows7WinPEBootDiskImageXERRO_C98/image_thumb_4.png" width="644" height="339"&gt;&lt;/a&gt; 
&lt;br&gt;
&lt;/strong&gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
Go to the &lt;strong&gt;Mount Directory &lt;/strong&gt;to see several folders – if you used my
PlanB approach you can store the files in Program files if you like, or wherever.
If you need access to the &lt;strong&gt;Startup&lt;/strong&gt; folder it’s hidden in the same
dir as Program Files.&lt;br&gt;
&lt;br&gt;
Copy your Win32/64 tools and utilities here to the mount dir (once fully booted up
with WinPE, you will be in a RamDisk with the drive letter of X: – good idea to always
use environment vars to get special folders if you need to)&lt;br&gt;
&lt;br&gt;
You can add other support like scripting, powershell etc – check out the packages&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
Once done – &lt;strong&gt;commit the changes to the WinPE.wim&lt;/strong&gt; with the command&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;
ImageX Cmd:&lt;strong&gt; imagex /unmount /commit /c:\pebuild\mount&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
dism Cmd: &lt;strong&gt;dism /unmount-wim /moundir:c:\pebuild\mount /commit&lt;br&gt;
&lt;br&gt;
&lt;a href="http://blogs.breezetraining.com.au/mickb/content/CreatingaWindows7WinPEBootDiskImageXERRO_C98/image_5.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/CreatingaWindows7WinPEBootDiskImageXERRO_C98/image_thumb_5.png" width="660" height="200"&gt;&lt;/a&gt; &lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;
Almost done :)&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
Copy the now *modified* WinPe.Wim image file to the correct directory (and we rename)
so it runs smoothly in the boot sequence. Run &lt;strong&gt;copy /y winpe.wim iso/sources/boot.wim 
&lt;br&gt;
&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
(optional step) To create an ISO of your work, issue the following command:&lt;br&gt;
&lt;strong&gt;ocsdimg –n –b”c:\Program Files\Windows AIK\Tools\x86\boot\etfsboot.com” c:\PEBuild\ISO
c:\PEBuild\WinPE.iso&lt;br&gt;
&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
Next let’s add our good work to our USB key and we’re done (WE WILL ERASE YOUR KEY
– back it up if needed. you can copy your stuff back on when we’ve finished)&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;
Plug your USB key in and we’re going to ntfs format it, create an active primary partition
and assign a drive letter to it.&lt;/li&gt;
&lt;li&gt;
From your command prompt use &lt;strong&gt;diskpart &lt;/strong&gt;as follows:&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;c:\PEBuild\diskpart&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;list disk &lt;/strong&gt;(you should see your USB drive come up in the list – this
is the drive # to work with e.g. 1)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;sel disk 1 &lt;/strong&gt;(double check from the previous command on what disk number
your USB is on – mine is 1)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;clean&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;create part primary&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;sel part 1&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;format fs=NTFS QUICK&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;assign&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;exit&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
viola! your usb is now prepared.&lt;br&gt;
&lt;/li&gt;
&lt;/ol&gt;
&gt;
&lt;li&gt;
We need to do 2 final steps – copy everything within the &lt;strong&gt;ISO &lt;/strong&gt;directory
straight to your USB key. e.g. &lt;strong&gt;c:\PEBuild\ISO &lt;/strong&gt;(from Explorer you’ll
be able to get to your USB Key easily through the SendTo right mouse menu)&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;Take note of your USB Key’s DRIVE letter&lt;/strong&gt;
&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
Write the ‘bootsector’ as follows:&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;c:\program files\Windows AIK\Tools\PETools\x86\bootsect /nt60 &lt;em&gt;&amp;lt;drive
letter of your USB Key&amp;gt;&lt;/em&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;
&gt;
&gt;
&lt;p&gt;
Hopefully I’ve saved you some time and pain….. happy booting….
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.breeze.net/mickb/aggbug.ashx?id=cbd5193b-ebf4-47d5-8c22-dff27caebd0f" /&gt;</description>
      <comments>http://blogs.breeze.net/mickb/CommentView,guid,cbd5193b-ebf4-47d5-8c22-dff27caebd0f.aspx</comments>
      <category>WinPE</category>
    </item>
  </channel>
</rss>