Preparing and Installing Windows XP Embedded Images – Part III: Using Remote Boot
After what we’ve seen on the previous posts: Setting up the environment (Part I) and building an Windows XP Embedded Image (Part II) we can complete the remote boot process with diskless devices with this last part.
There are special hardware requirements for this procedure and could get a little tricky. In the computer you are using to prepare the image (the server), you need an additional hard disk (or virtual disk) which you will use to boot the image from.
To prepare the image for remote booting:
1. Add a second drive to the machine that act as server. Format the volume and set it like an “Active” partition.
2. Copy all of the files that were created on the Windows Embedded Images subfolder you chose to a second disk (virtual disk if you are using virtual machines)
Note: Since this disk will be used to boot an operating system image, remember that the partition within must be Active. Otherwise the operating system will not boot.
3. After copying all of the files to the second hard disk, move it to a client machine and boot that client using the disk.
4. After the image boots, you’ll see that several components are configured in the image, by a process named First Boot Agent. This process takes a few minutes to complete.
If you are using the System Cloning Tool, then fbreseal is run in the first boot, as the last step of the First Boot Agent. As stated before, if the image is rebooted afterwards, the image gets a new name and SID, so the reseal process is lost. As you need to keep it for diskless computers, don’t reboot after you see the following message. Turn off the computer instead.
5. After shutting down the computer, remove the disk and place it as the secondary disk on the computer you use for creating the image. That is the image that will be uploaded to the remote boot server and downloaded by each diskless client.
Now that you have the operating system resealed in the secondary disk, it’s time to create the SDI image. You will create two SDI files, one for storing the image as it is copied from the physical (or virtual) disk, and a second one that will store the final image that the clients will use for remote booting.
1. Open SDI Loader from Start | All Programs | Microsoft Windows Embedded Studio
2. Click on Add Disk
3. As you are creating a new SDI, type the name of a new file (like xpe-partition.sdi) and select Add
4. Since the file is new, a dialog will ask if you’d like to create the file. Answer Yes
5. The next step is to set the image size. The image size must be:
a. At least the size that the files on the resealed disk + some space for temporary files
b. At most half of the total system RAM (ie, if the client has 512mb of RAM, the image limit is 256mb)
c. There is a practical image limit of 500mb. Beyond that, it is likely that the image won’t boot.
This SDI file represents the partition that hosts the operating system. Set the image size and click OK
6. After the SDI file is created, a new virtual disk will be automatically added to the server. The disk needs to be partitioned, formatted and mounted. From the Control Panel | Administrative Tools open Computer Management. Select the Disk Management item from the left pane
a. The following dialog will appear notifying of the new disk. Click on Next
b. Make sure the disk is selected and click on Next
c. Since you won’t use a dynamic disk, leave the disk unmarked in the following screen, and click on Next
d. Click on Finish to close the dialog
e. Right click on the newly created disk and choose New Partition
f. In the wizard that opens, click on Next
g. Choose Primary partition type and click on Next
h. Leave the maximum partition size and click on Next
i. Assign a letter to it (like F) and click on Next
j. Make sure that the selected File system is NTFS and click on Next
k. Click on Finish to format the disk.
7. With the partition created, move the files from the disk that was used for the first boot to the virtual partition
8. Optionally, if you need to add additional files to the disk, you can copy them in this step.
9. The next step is to create a remote bootable disk, based on the virtual disk you completed in the previous step. To do that, you will use the SDImgr.wsf script, located in the Windows Embeddedutilities folder.
Open a command prompt and type the following (each command in a line):
cd “c:Program FilesWindows Embeddedutilities”
cscript SDImgr.wsf /new c:ramdisk.sdi
cscript SDImgr.wsf c:ramdisk.sdi /readpart:F:
Replace F: by the unit letter in which you mounted the virtual partition.
Note: All the explorer windows must be closed, including the Disk Management snap-in. When this procedure is running, the script tries to lock (exclusively) the partition and if some program is using it, the procedure will fail.
10. After completing the process, you will have a working remotely-bootable disk, stored on C:ramdisk.sdi. To make it deployable by the Remote Boot Manager, copy the file to C:Program FilesWindows EmebeddedRemote Boot ManagerDownloads.
The Remote Boot Manager requires the images to be stored on that location.
The last task to make the image remotely deployable is to configure the Remote Boot Manager to send the image to the clients whenever they request.
1. Take note of the MAC Address (comprised of 12 hex digits) for the computers that will boot remotely. If you are using virtual machines you can easily find out the client NIC’s MAC address by taking a look to the Network Adapter options.
2. Open the Remote Boot Manager, from Start | All Programs | Microsoft Windows Embedded Studio
3. For each diskless computer that will boot remotely, add a new row to the grid, using the following values
a. Type down the MAC Address of the NIC you are configuring
b. Since the Boot Server is the local machine, leave the field at 0.0.0.0
c. As the Boot Program, select the startrom.n12 option. This boot program boots the client computer without asking for confirmation. Since the client computers may not have a keyboard or monitor attached, this is the preferred choice
d. As the Image File Name type the name of the second SDI file. In this case, type ramdisk.sdi
4. Click on Save
Now that you have set up the DHCP server, created the image and set up the Remote Boot Server, it is time to boot the client machines.
When configuring each client machine, verify that each machine has PXE network booting enabled.
To verify that all of the previous steps were performed correctly, try booting a machine, verifying that it is booting from PXE. After it receives the IP from the DHCP will load the image and the configuration from the Remote Boot Server.
Client receiving image from the server
Client booting the image downloaded
Well that’s pretty much for now with Windows XP Embedded. I’ll be reviewing Windows Embedded Standard 2009 on next posts.
Hope you found it useful.