Deploying a WIM Image


Uploaded by itfreetraining on 23.08.2011

Transcript:
Welcome back to IT Free training free training course on Windows 7 our free gift to you.
In the last few videos I looked at how to capture and customize a WIM image. Now that
I have the WIM image, we can look at deploying the WIM image that I captured earlier to a
computer. To deploy a WIM image, first you need to boot
the computer up into windows PE. Microsoft and 3rd party vendors have released products
that allow for more automated methods of deploying windows. In the next video I will look at
how to use some tools of these tools to stream line the process of deploying and performing
maintenance of WIM images. So far I have only looked at the command line versions.
Once you have booted the computer up into windows PE, the next thing you need to do
is create volumes to store the operating system and support files. Remember, WIM works on
the file level, so some of work that was done for you automatically with sector based software
needs to be done manually. Don't work if there seems to be a lot of steps, at the end of
this video I will give you a script will automates the whole process for you.
The first partition you should create is a 100 mega byte system partition. This partition
holds system files not required by the operating system itself. If you later on decide to install
bit locker, software that encrypts the hard disk, this partition must be present otherwise
you will not be able to use bit locker. Microsoft has released a partition tool to create this
partition later on if it was not created during the install of windows. Having said that,
changing partitions after the OS has been installed is dangerous process. I would recommend
that you always created the system partition even if at the present you are not planning
to install bit locker. The next partition that you need to create
is the partition to hold the operating system. Once you have created these partitions you
can apply the WIM image to the hard disk. After this is done, the last step is to make
the OS bootable. You do this by adding the OS to the boot menu. Now that we understand
the process, let's have a look at how to deploy an image to a new computer using windows PE
and the ImageX deployment tool. Currently on this computer the hard disk is
completely blank. Before I can apply the WIM file to this computer I need to partition
the hard disk. Windows PE comes with a command line tool called disk part that is used to
partition disks. Once I start the tool I need to select the hard disk I want to work on.
Hard disks are number starting from 0. Since there is only one hard disk in this computer
I will use the command select disk 0. Automating deployment windows 7 deployment
With the first disk selected, or disk 0, I can then run the command clean. If there are
any partitions or master boot records on the hard disk, clean will remove them. Next I
will create a partition of only 100 megabytes using the create command. This partition is
used by windows to store information about the operating system, it becomes particularly
important if you later decide to install bit locker. Bit locker can't function without
this partition. To install windows you do not need to create this partition. The setup
program will generally create it for you, however I like to create it manually so nothing
is left to chance. The type of partition I will use in this case
is primary partition. You need one primary partition per hard disk and you can create
up to 4 primary partitions per hard disk. Now the partition is created I need to select
it using the command select partition 1. Partitions start from 1 rather than 0 unlike hard disk
which start from 0. Once selected I will run the format command with f s equals ntfs. The
partition will be formatted with ntfs. Next I will add the quick parameter to perform
a quick format and finally set the volume label of the partition to system with the
label equal system parameter. Once the partition is formatted I need to
run the command active. The active command copies boot strap data to the hard disk so
the bios can boot the operating system. If you do not run this command, you hard disk
will not be bootable. The active command only needs to be run on one partition and hard
disk on you system. Next I will create a partition to hold the
operating system. I will use the command create partition primary to create the second partition.
Notice this time I left out the size option. This time the create command will use all
the available hard disk space to create the partition.
Once the partition is created, I need to select it using the select command. Since this partition
is the second partition and partition start there numbering from 1, I will enter in the
command select partition 2. This partition I will format with the format
command making sure I enter in the type as NTFS, the format as quick and set the label
of the partition to windows. In a moment I am going to apply an image to this partition,
to make the process easier I will assign a drive letter to the partition using the command
assign letter equals g. When the operating system boots up the operating system will
assign a drive letter to this partition most likely c drive. Assign a drive letter only
applies until I reboot. That's it, the hard disk is now configure
with a 100 mega byte system partition and the rest of the hard disk partition for the
windows operating system. Once I exit disk part using the exit command, I will then map
a drive to my server using the command net use z Colin double back slash my server name
slash share name. This share drive also contains ImageX and other image software copied from
the windows AIK. If I change to my network drive, I can now
run the command ImageX forward slash apply with the WIM file that I want to apply followed
by the image index and the drive letter. Remember that WIM file can contain multiple images
in the same file so you should check to make sure that you have the correct image number
before you apply the image. The process does take a while depending on
the speed of your computer so I will pause the video and return shortly. You can see
the process took just under 11 minutes on this computer to complete. There is one more
step I need to perform in order for this operating system to be bootable. The command is BCDBoot
and is found in the system 32 directory under the windows directory. To use it I need to
enter in the path to the windows directory. BCDBoot will change the boot menu so this
newly deployed operating system will be available when you boot. If you dual boot your system,
that is have more than one operating system installed on the same computer, you can use
BCDBoot to add additional operating systems. The system is now complete and ready to go.
As you have seen, there are a lot of commands needed to deploy an image to computer.
Thankfully these commands can be automated by placing them in a batch file. The batch
file here automates the process. At the top is the command @ echo off. This switches the
local echo off so that further commands are not shown on the screen however the output
of the commands is shown. Adding the @ sign means that not even the echo off command will
be shown. The next command runs disk part. The slash
s script tells disk part to accept a text file full of commands. The next parameter
tells disk part the filename. If I open the file, you can see all the commands I used
before to partition and format my hard disk.
First I selected the hard disk, next I clean the hard disk removing any previous operating
systems and partitions. Next I create a system partition of 100 mega bytes and made this
partition active. Once this is complete I will create the second partition with the
remaining hard disk space and give it the drive letter of g.
This completes the disk part commands. If I now go back to the image dot bat file, the
next command is change the drive letter to Z. My batch file is on the z drive, so this
script assumes that you map a drive to the share containing the script as drive Z prior
to running the script. Next I run the ImageX. In this case I have made the file name percentage
1. When I run this batch file, I need to make the first parameter of the batch file the
name of the image file that I want to deploy. Once the image is deployed, I will run the
command BCDBoot to at the new install to the boot menu. Finally I add the command shutdown
with the reboot switch. This will reboot the computer after ImageX has finished running
so it is ready for use. That's it, once you deploy your WIM file to
a system using ImageX, reboot your computer and get ready to starting using your new operating
system that has already being customized to your needs. Even with the script, there are
more automated ways to deploy a WIM file. In the next video, I will look at how to automated
the system even more using some tools provided by Microsoft. I will also look at some graphical
tools provided by Microsoft that replace the command line based tools I have been using.