Home > Deployment, MDT, Windows > MDT 2010 and deployment from a USB key

MDT 2010 and deployment from a USB key

Ever wanted to put every version of Vista, Server 2008, Windows 7, Server 2008 R2, and perhaps a version of XP or two on a single USB key?  No?  Then you’re probably normal.  If you’re like me, however, the thought has crossed your mind.  However, the daunting task of configuring said USB key to boot to some multiboot Linux distro or hacking a bit at bcdedit to boot a WinPE to handle it also made it something to avoid, at least for me, because, well, I tend to be lazy about these things.

However, after playing with the Microsoft Deployment Toolkit for a bit, I realized I could probably make my USB key bend to my will and be said multi-bootable Windows OS installer, without a whole lot of work.  I set about to put all of those versions of Windows one one key, along with some unattended applications (for this blog post, I’m just adding Office 2007 to keep it short).

You’re going to need a few things to start, most notably you’ll need a Windows machine that can install the latest Windows Automated Installation Kit (WAIK) for Windows 7 (that’d be Server 2003 SP1 or newer, Vista SP1 / Server 2008 or newer, or Win7 / Server 2008 R2 – sorry, no XP support, it seems).  You’ll also need the MDT 2010 bits and the version(s) of Windows and any applications you would like to install from MDT.

Adding Operating Systems

Once you’ve got a machine with the WAIK and MDT 2010 installed, the first thing to do is open the Deployment Workbench from the Microsoft Deployment Toolkit folder in your start menu.  Since you’ve already got the prerequisites needed to do a basic MDT deployment (namely, the WAIK), just right-click on the “Deployment Shares” folder and select “New Deployment Share” from the drop-down:

New Deployment Share

This will open a wizard that will help you create the Deployment folder and share – note that you will have to create this folder, as the current version (beta2) does not do this.  The wizard will look like the following:

New Deployment Share Wizard

Again, use the “Browse” button to create the folder as necessary, and make sure this is on a drive with ample space, as all of your OS files and applications will be stored here.

Once you’ve gotten yourself a deployment share, it will show up as a subfolder of the “Deployment Shares” tree, and the first thing you’ll want to do is add the version(s) of Windows you want to use MDT to install.  To do this, right-click on the “Operating Systems” subfolder in your deployment share, and select “Import Operating System”:

Import Operating System

This will bring up the “Import Operating System” wizard.  For this example, I’m going to be using the full Windows installations as my source, and since I’ve copied the contents of the Windows DVDs / CDs to the hard disk on this machine already, I select “Full set of source files” and point the wizard to the folder that contains the Windows source that I’m using (in this example, I’ve extracted the Windows 7 RTM to a folder on the D: drive):

New Operating System Wizard

Select the location with OS files to be added

The wizard will go through copying the files from the source directory into the distribution share, and add each OS choice to the Operating Systems list in the Deployment Workbench – after adding Vista, Server 2008, Win7, and Server 2008 R2 via this method, my Operating Systems list looks like this:

OS List

Adding Applications (optional)

If you want to have your installation media install applications along with Windows, you’ll need to add them to the deployment share and the task sequence – in this example, I’m adding Office 2007.  To add an application, you’ll need to right-click the “Applications” subfolder in your deployment share, and select “New Application” from the drop-down:

New Application

Once the wizard comes up, you’ll have to enter the Application Name – the Publisher, Version, and Language are optional (but recommended):

New Application Wizard

Again, I’ve copied the contents of the Office 2007 DVD to the hard disk, so I’m going to point the wizard to this source, but if you have the files you need for the application you’re adding to the deployment share in another location (say, on a DVD or a network share), point the wizard to that source directory, and click “Next”:

Select the location with files to be added

This will place the Office 2007 entry into the “Applications” list in the deployment share, and you will need to edit the properties of the application before the application will install properly.  To do so, right-click the application from the Applications list and select “Properties”:

Properties

From here, you will need to click the “Details” tab and configure the installation command (the Working directory will already be configured) to run the application’s setup, including any switches required by the application.  You can also enable or disable the application from the deployment share, cause the application to reboot the computer it’s being installed onto once it has completed installation, as well as a host of other options that may be of interest to you.  You may also note that MDT recognizes that this is an Office application, and adds an “Office Products” tab where you can configure the unattended parameters of Office (if your version supports it – for example, Office 2007 Enterprise):

Office Products tab

Once you’re comfortable with the application settings, click “OK” to complete adding the application.

Adding Drivers (optional)

If you want to inject drivers into your installation, you will need to use the “Out-of-Box Drivers” subfolder in your distribution share.  Note that there is a requirement here – you will need to have the driver package extracted that you want to use, and it must not be a driver package that requires an .exe to install.  For this portion of the deployment, you will have to direct the MDT wizard to the folder that contains the .inf, .sys, and any .cat files the driver requires, hence why .exe driver installers will not work.  You may be able to add these types of drivers as application packages, however, but that’s a bit outside my scope here.

For this example, I’m adding the drivers for a 3ware 9550SX controller that I’ve already extracted:

Extracted 3ware driver

To add the driver to the deployment share, simply right-click on the “Out-of-Box Drivers” folder and select “Import Drivers” from the drop-down:

Import Drivers

Point the wizard to the folder that contains the drivers you want to import, and click “Next” (in my example, I’m going to import both x64 and x86 drivers, so I’m running the wizard twice) – note that if you do import the x86 and x64 versions of the same driver, make certain that the “Import drivers even if they are duplicates of an existing driver” box is checked before clicking “Next”:

x64 drivers

x86 drivers

If you have imported both x64 and x86 versions of the same driver, make sure to right-click on each driver in the listing of Out-of-Box drivers and select the proper architecture – the wizard will add a number at the end of the driver’s name for each iteration of the same driver you import (in this case, (1) was added to the x86 driver I imported), and the wizard will tell you at the end what display name it gave to the driver added.  In this case, I’ll make sure that the “AMCC System 3wManage.inf” is configured to be used only for x64 platforms:

Properties

Select the correct driver architecture

Make certain to do this for each x64 and x86 driver you add, if you do add multiple architecture versions of the same driver.

Creating the Task Sequence

To get MDT to actually *do* something with the operating system(s) you’ve imported, you’ll have to create what is called a “Task Sequence”.  In MDT parlance, this is the “logic” that drives MDT – it’ll tell MDT what drives to format, what version of Windows to install, and any applications, hot fixes/updates, and drivers you configure in MDT.  To create your first task sequence, right-click on the “Task Sequences” subfolder in your deployment share, and select “New Task Sequence” from the dropdown:

New Task Sequence

Once the wizard comes up, you’ll need to give the Task Sequence a unique ID number in the “Task sequence ID” box, as well as a name (this is the name that will show up in the list of operating systems to deploy, so consider using the name of the version of Windows the task sequence will install).  Enter any comments in the comment box, and click “Next”:

New Task Sequence Wizard

Choose the “Standard Client Task Sequence” from the drop-down list (or “Standard Server Task Sequence”, if this is a server OS), and click “Next”:

Standard Client Task Sequence

Select the version of Windows you want the Task Sequence to install from the list, and click “Next”:

Select an OS

At this point in the wizard, you can enter a product key (or not), set the registered Name and Organization, set the IE homepage, and configure the Administrator Password (or not).  Once you’ve done all this and finished the wizard, the task sequence will now show up in the Task Sequence list, but it’s not complete just yet if you want to edit the unattended file and change some of the advanced options (like the default time zone, in my example).  If you want to leave everything as-is, skip to the next section.  However, if you do want to edit the file, you’ll need to right-click the Task Sequence and select “Properties” from the drop-down:

Properties

Once the properties of the Task Sequence opens up, click on the “OS Info” tab, and click the “Edit Unattend.xml” button to open the unattended file in the Windows System Image Manager (WSIM) for editing:

OS Info

Again, for this example, I want to edit the Time Zone.  To do this, once WSIM has the unattend.xml file open, expand the 4 specialize component and select “Microsoft-Windows-Shell-Setup_neutral” from the list (note that this says amd64 at the beginning because this is an x64 image – if you’re editing an x86 image, it will say x86 at the beginning).  From here, you can edit the default (Pacific Standard Time) with the full name of the Time Zone you want (I’ve entered “Eastern Standard Time”):

Unattend.xml editing

Once you’re done editing the unattend file, close the WSIM window and save the file when prompted.

Putting it all together

The last steps involve updating the deployment share with the changes made, and building the media we’re going to use to copy to the USB key.  First, you will need to update the deployment share, by right-clicking on the deployment share root folder, and selecting “Update Deployment Share” from the drop-down:

Update Deployment Share

This will cause the deployment share to update, and you will see progress indicated in a wizard window that will look like the image below, and when it’s done, click the “Finish” button:

Updating Deployment Share

Next, you’ll need to actually create the media.  To do this, expand the “Advanced Configuration” folder in the deployment share, and right-click the “Media” folder and select “New Media” from the drop-down:

New Media

Once the wizard opens, you’ll need to point the Media path to a folder that will contain the exported media – note that you will have to create this folder as well, as the current version (beta2) does not do this.  Also note that it appears (from some comments and my own testing) that the media share path cannot contain spaces (again, this is beta2, so we’ll wait to see if this problem continues in the RCs), or the creation wizard will fail.  I’m currently investigating this to see why this is, although it does seem fairly repeatable.  Use underscores or dashes if you want to name it something that would otherwise contain a space.  The New Media Wizard will look like the following:

New Media Wizard

Again, use the “Browse” button to create the folder as necessary, and make sure this is also on a drive with ample space, as all of your OS files and applications will be stored here, as well as an .ISO file that can be burned to a DVD (if it’s small enough).  Once you’ve selected a folder, click “Next” to create the share.

Once the creation of the media share is complete, you’ll see it in the list of Media available to be created.  Right-click on the new media and select “Properties”:

Properties

Click the “Rules” tab, and add one field at the end, called “_SMSTSORGNAME” and set it equal to what you want the Unattended progress bar to call your deployment (you’ll see later what I mean by this) – I’ve named mine “cluberti’s imaging stick” for this example:

Editing media rules

Next, click the “Edit Bootstrap.ini button, and add the same field with the same name.  Once you’re done, save the file, and then click OK:

Bootstrap.ini

Lastly, right-click the new media entry and select “Update Media Content” from the drop-down.  This will actually create the content folder and the .ISO in the media share, and it WILL take a long time the first time you do this, so be patient:

Be patient!

Once the wizard completes successfully and you click “Finish”, your media is now ready to be copied to your USB key – just put your USB key into the machine, and use Windows Explorer to copy the contents of the “Content” folder in the media share to your USB key:

Copy this to your USB key

Seeing it in action

I’m going to show you what this looks like from my deployment media in a Hyper-V VM, so you can see what the end-product will look like.  Note that basically ALL of this can be automated via entries into the “Rules” tab and Bootstrap.ini of the media share (or even the Deployment Share folder – the same settings can be seen in the properties of this folder) and entries into the Task Sequence (which I’m leaving for another post.

Without further ado, see the task sequence in action:

050 051 052 053 054 055 056 057 058 059 060 061 062 064 065 067  069 070 071 073  075

If you like it, share it:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Live
  • MySpace
  • StumbleUpon
Categories: Deployment, MDT, Windows Tags:
  1. cluberti
    February 5th, 2010 at 03:04 | #1

    @sqwidd
    I guess I’m not sure what the question is – I’m taking a guess that you’ve installed the x64 version? If so, the answer is no – the x64 version can create the x86 boot environment you need without issues.

  2. Gar
    February 5th, 2010 at 12:48 | #2

    Hi,

    Excellent guide, but i’m having issues with the bootable USB stick!

    I’ve managed to get MDT to generate new image files based on Windows XP2. I’ve copied the entirety of the “Content” folder onto a USB stick and attempted to boot it up on a test PC by selecting “USB Device” on the boot menu, and also prioritizing the boot order to USB device first. But nothing loads, I just get a flashing cursor all the time. Not even an error.

    I’ve tried using Bootsect.exe (x86) using both the /nt52 & /nt60 switches, and also tried formatting the USB Stick to NTFS format too, so through a combination of /NT52/60 and FAT32/NTFS I still can’t get it to boot.

    Any further pointers greatly appreciated!

  3. cluberti
    February 5th, 2010 at 17:03 | #3

    If it fails to boot, it would perhaps indicate a failure of the BIOS to handle the bootloader code from a removable device. Assuming you’ve followed the instructions (and it seems you have), the key should boot. Does it work in any other PC, and does the ISO image (created with the new media wizard) work in a VM? It’s probably worth testing the media ISO in a VM just to be sure that works, because that’s the contents of the USB key, basically. If that works, and you’ve copied the contents of the “Contents” folder to a bootable USB key, the likelihood is there’s a BIOS issue there that may be resolved with a newer BIOS or a support call to the hardware or motherboard vendor.

  4. pwagner9999
    February 6th, 2010 at 18:43 | #4

    A few questions…

    I’m a chronic sysprepped Windows XP Pro image maker/user trying to expand my horizons. Trying to make a universal XP image. Sometimes I have machines where the image just doesn’t work and I need a plan B. Plan A is Acronis TIW and a sysprepped image using DriverPacks.net drivers.

    How to use external USB HDD instead of USB FD?

    What brand USB FD are you using?

    How would DriverPacks.net be added? Can they all just be expanded and added to “Out-of-Box Drivers” subfolder in the distribution share?

    Mass Storage Controllers; do they still need to be added to a sysprep.inf or something similar?

    HAL detection should not be an issue?

    Can Windows Updates be added during the install or should they be slipstreamed into the XP source?

    Any advice appreciated.
    thanks

  5. Joel
    February 11th, 2010 at 10:15 | #5

    Morning,

    Here’s how I have mine set up (I just set it up yesterday after a few issues) which I hope answers some of your questions.

    In MDT2010:
    ***********************
    - I have all of my drivers added to “Out of Box Drivers” in my DP in MDT2010
    - I have created an MEDIA DP using the instructions above

    GENERAL TAB:
    ***********************
    - Selection Profile of the MEDIA Properties is set to “All Drivers and Packages which should solve your issues with Mass storage, HAL and almost any other driver set you require
    - I only need to create the x86 version so I’ve unchecked the x64 box

    RULES TAB:
    ***********************
    - In the CustomSettings.ini I have everything skipped excepted for ComputerName (SkipComputerName=NO) and I’ve set the “TASKSEQUENCEID” (TaskSequenceID=DEPLOY) to point to the TS IS I want to use.
    - I Don’t want any questions asked after I boot to my USB key except for the computer name.
    - In the Bootstrap.ini I set SkipBDDWelcome=YES, set my language, my locale, keyboard, SkipTimeZone, set Time zone, skipuserData, SkipProductKey, set _SMSTSORGNAME

    All the other tabs I have left default, but you can add extra directories in the “Windows PE x86 Settings” tab if you need to for custom scripts and other things.

    I update the MEDIA DP (“Update Media Content”) which takes a little while since I have so many drivers.

    While this is updating I format my USB key using diskpart.

    DISKPART:
    ***********************
    - Plug the USB key in and ensure Windows can see it from Windows Explorer. Note the Drive letter (In my case the F: drive)
    - open CPrompt window and go to the USB Key drive letter (“f:”)

    Run the following commands:
    ***********************
    Diskpart
    List Disk Note which Disk # your USB key is on. Mine was Disk 1
    Select Disk 1
    Clean
    Create Partition Primary
    Select Partition 1
    Active
    format fs=fat32 I used NTFS for my Key which seems to work
    assign
    ***********************

    My 16GB drive took much longer to format this way than using the traditional “format” from Windows Explorer.

    - Once format and the MEDIA update is complete you can continue

    FILE COPYING:
    ***********************
    - Open up the “CONTENT” folder of your MEDIA point and copy the contents to your USB key using Windows Explorer. For some reason this also took a much longer time to do than when I tried it before using the DiskPart commands.
    - Copy the folder where your Image is stored (mine was on my primary PXE/WDS deployment point …\Operating Systems\IMAGE_NAME_FOLDER) to the Operating Systems folder in your MEDIA DP (Content\Operating Systems\)

    Now the USB key should be ready for booting. Plug it into the computer you’d like to image and ensure the boot order in the BIOS is set to boot off the USB Key (in my case “Imation” 16GB)

    It should load to your DP, prompt you for a computer name and begin deployment. (Again, I have skipped all the options in the CustomSettings.ini so you can play with these settings depending on what you want to achieve).

    Let me know how this works for you if you need any clarification.
    Joel

  6. Joel
    February 11th, 2010 at 10:24 | #6

    Oh another thing which may help others as well.

    These are the errors/problems I encountered before getting to the point I am now, which may help others in identifying where they went wrong.

    PROBLEM #1
    ***********************
    WITHOUT FORMATTING THE USB KEY/HDD I copied the contents of the “CONTENT” folder to my USB key (USB drive should work the same) and tried to boot.
    “Invalid Disk Error”

    So at least the computer was trying to boot from the KEY, it just wasn’t in a format recognized.

    PROBLEM #2
    ***********************
    Next I formatted the USB key/HDD to FAT32 using Windows Explorer formatting (quick format), copied the same files over and booted from my USB key

    It game up with a different error (which I didn’t snag) but something along the lines of “BCD error” cannot find boot sector or something

    So now the computer was able see the USB boot but the boot sector files partition of the drive wasn’t active.

    ***********************

    Finally I formatted my USB key/HDD using diskpart (NTFS), copied the files over to the key and booted. Now it works like a hot damn! aka.. it works!

    Joel

  7. February 11th, 2010 at 12:01 | #7

    Kudos for posting such a useful blog. Your blog is not only informative but also very artistic too. There normally are extremely couple of individuals who can write not so easy articles that creatively. Keep up the good writing !!

  8. Gar
    February 12th, 2010 at 05:28 | #8

    I had to format the USB stick using DISKPART – but from a Windows 7 PC. Disk had to be formatted as FAT32 and Primary partition had to be created.

  9. Gar
    February 12th, 2010 at 05:47 | #9

    Another question, since my USB Booty is now working :D

    If a particular model PC (Dell GX755) fails to boot to the “Solutions Accelerators” part of MDT is this down to a mismatching driver? It simply loops on the green loading bar screen

    The same key on a older GX620 boots to the SA section where I can customise the build (which fails at the end, but that’s another question in itself)

    Bearing in mind that this key has all drivers for the 755 imported into the Out of Box drivers, and i’ve added entries to the Build Mass Storage section of sysprep (which didn’t help btw).

    Oh; must add that this guide is great, although MDT does come with extensive documentation, it could be more user friendly so it can be read easier.

  10. Joel
    February 17th, 2010 at 10:36 | #10

    Thank you for the kinds words!

    Gar,
    It sounds like a problem I encountered a little while ago when PXE booting to my WDS server where the boot disk would load but continue in an infinite loop.

    Here are a couple things that may help you:

    My Problem:
    *****************
    I had issues where an existing OS install on the disk in question was causing me grief even though I had removed (manually) the MININT and _SMSTaskSequence folders from the partition.

    My Solution:
    *****************
    Boot with a MS-DOS boot disk and wipe the disk first. In my case only FDisk worked instead of the traditional “Format”. This may have been overkill but it did the trick.
    Sometimes I find that if a previous OSD has failed, it would give mysterious results on every OSD afterwards, thus the formatting.

    *note: Fortunately for me this was on a test box with no requirements to save existing data.

    Let me know how that works for you,
    Joel

Comment pages
  1. August 11th, 2009 at 15:14 | #1
  2. August 12th, 2009 at 11:39 | #2
  3. August 21st, 2009 at 20:41 | #3
  4. September 12th, 2009 at 06:45 | #4

Bad Behavior has blocked 584 access attempts in the last 7 days.