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:
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:
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”:
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):
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:
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:
Once the wizard comes up, you’ll have to enter the Application Name – the Publisher, Version, and Language are optional (but recommended):
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”:
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”:
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):
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:
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:
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”:
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:
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:
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”:
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”:
Select the version of Windows you want the Task Sequence to install from the list, and click “Next”:
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:
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:
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”):
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:
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:
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:
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:
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”:
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:
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:
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:
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:
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:
Great tutorial.
Unfortunately I tried your process but it did not work. Does the USB Key need to be FAT32? MDT has created the bootable ISO for me, and I’m trying to find a way to “burn” the ISO to the USB key.
After copying the “Content” folder, which does have the bootmgr file in it, to the USB key the the machine states invalid disk which usually means it’s not in the correct format or have any “bootable information” on it.
Ultimately I’m trying to do an offline image deployment using only the USB key and if possible have it run through the task sequence as well.
I always do NTFS.
I’ve found some USB keys are not as amenable to booting with an nt bootsector than others
I use the HP USB format tool to format/clean it *after* I do the diskpart commands
just to be safe.
after that, bootsect /nt60 against it, then copy the content folder’s contents over
Hey Nik,
Thanks for getting back to me. I forgot to run the diskPart commands! In case anyone else reading this has the same issue these are the commands I ran:
…….
diskpart
select disk 1
clean
create partition primary
select partition 1
active
format fs=fat32
assign
…….
It might be handy for some to run the “List” command first to make sure you’re formatting the correct disk.
At any rate, after running DiskPart and copying the “Content” folder to my USB stick (which took twice as long for some reason) I am not able to boot from it to get to an offline version of my deployment point.
If only my USB stick was big enough to hold the actual custom WIM image…:P
Thanks again Nik!
An update to my last post,
Instead of formatting it to “FAT32” is I stated above, I used NTFS instead!
Sorry, I don’t mean to SPAM this thread, but in in my previous post I wrote:
“… I am not able to boot from it to get to an offline version of my deployment point…”
It should read
“… I am NOW able to boot from it to get to an offline version of my deployment point…”
wow big difference when actually edit what I write 🙂
configurer a bootable usb key sur win7 allez vers excuter
cmd
cd
dispak–list disk —–select disk (amovible disque)
create partition—– active——— format fs=ntfs——– assign
exit
apres extraire l’image iso précédement faite par mdt
copiez l’extait de contenanu du répertoire dans disk amovible et voila terminé
[quote name=”Joel”]Great tutorial.
Unfortunately I tried your process but it did not work. Does the USB Key need to be FAT32? MDT has created the bootable ISO for me, and I’m trying to find a way to “burn” the ISO to the USB key.
After copying the “Content” folder, which does have the bootmgr file in it, to the USB key the the machine states invalid disk which usually means it’s not in the correct format or have any “bootable information” on it.
I have not tried yet but if you do following steps it should work.
1. Download and install Windows 7 USB download tools.
2. Burn any windows XP/7 image on it through USB download tool.
3. This will automatically make your USB bootable.
4. Just delete all content on USB and copy all content from MDT image folder as described in above tutorial.
5. Try to boot with it. It should work I will also try.