Preparing and Booting a Microsoft Windows NT Embedded 4.0 System
Microsoft® Windows NT® Embedded 4.0
Summary: This article discusses how Target Designer is used to create Microsoft Windows NT Embedded 4.0 operating system images. (6 printed pages)
Target Designer is used to create Microsoft Windows NT Embedded 4.0 operating system (OS) images. Using Target Designer, you configure your operating system image by selecting various components for the OS image. This image is then loaded onto a hardware configuration, creating an embedded system.
Windows NT Embedded 4.0 can be installed and run from the following types of media.
- Hard drive. Windows NT Embedded 4.0 can be installed on and run from both IDE and SCSI hared drives.
- CD-ROM. Windows NT Embedded 4.0 can be run from a read-only CD-ROM.
- Flash disk. An embedded image can be installed on and booted from a flash disk, and data written to a flash disk is saved when the embedded system is turned off. DiskOnChip is a type of flash disk device.
To prep and boot an embedded image for all types of media
- Create and build the image in Target Designer, taking care to select the proper component combinations for the type of hardware you plan to run your image on.
- Create a bootable Windows NT partition on your target media.
- Download the OS image on your target media. You can install directly to the target system, to a temporary location on your hard disk, or on media to transfer to your embedded system later.
The following components can be included in OS images for several types of media:
- Write Filter Using the Write Filter component on your target system gives read-only media read/write properties. If you use the Write Filter component on read/write media, changes made at run time are not saved. During a write operation to a disk, this component filters data that has been changed and puts it in memory instead of writing it to the disk. During a read operation from a disk, the write filter reads the data from where it is stored in memory, not from the disk. When you shut down the target system, the data written to memory is lost. The target system always boots from the original data. If you plan to install your system on a bootable CD-ROM, use the Write Filter and El Torito CD as Disk components together. If you plan to install your system on media other than CD-ROM, you can use the Write Filter component without the El Torito CD as Disk component.
Using the Write Filter with flash disk media will prevent data from being written to the media, thus ensuring a longer flash disk life. Multiple write operations can degrade the integrity of the media.
- System Cloning The System Cloning component is a utility you can use to create multiple copies from the compact disc for your embedded system. Each copy has a unique system identification (SID). The system cloning utility assigns the system identification when the user boots the target system, and then it restarts the system to use the assigned identification.
The system cloning utility is included on your Windows NT Embedded CD. If the user will install your system from read-only media, you must indicate that you want to clone the target system when you install it to the target media.
- Creating A Headless System To create a headless system, with no support for a monitor, keyboard or mouse, you will need to include the following components in your configuration:
- Null Keyboard Driver
- Null Mouse
To verify that a headless target system is alive, you can include the Serial Console Administration component in your target system, and try connecting to it via serial connection.
The following sections detail how to prepare and boot an embedded OS on several types of media.
Windows NT Embedded 4.0 can be installed and run on embedded systems from both IDE and SCSI hard drives. This section details how to install an embedded OS image on a system with hard drive support.
Creating and Preparing your Image
In order to use a hard disk on your embedded system, the Hard Drive component must be included in your OS image. This component is located in the All Nodes pane under System\Devices\Storage\Fixed Disk. If a SCSI hard disk is to be used instead of the default IDE hard disk, select the SCSI component instead.
Creating a Bootable Partition
To make either a FAT or an NTFS partition bootable, you must copy a Windows NT boot sector to the partition boot sector. You can use the contents of the MungeBoot folder on the Windows NT Embedded 4.0 CD-ROM 1 to create an NT Boot Partition Utility Disk. To create this disk on your development machine, place a blank floppy disk into the A: drive and, with CD 1 in the D: drive, execute the following commands:
C:\> D: D:\> CD MungeBoot D:\MungeBoot\> webimgnt munge622.144
The last command will start the Web Image NT application. Click the A: Drive button to create the utility disk. When the operation is complete, remove the floppy disk from the A: drive and label it, "NT Boot Partition Utility Disk."
After the utility disk has been created, do the following.
To create a bootable Windows NT Embedded 4.0 partition on an embedded system with an attached floppy disk drive
- Format the first disk partition on your target device with FAT or NTFS
- Using Disk Administrator or another formatting tool, format the first partition on the primary disk with FAT or NTFS.
- Insert the NT Boot Partition Utility Disk detailed above into the target machine’s floppy drive, and execute the following command:
This command replaces the boot sector of the hard drive or DiskOnChip partition on the target device with the correct Windows NT boot sector.
Now the partition is configured to boot a Windows NT Embedded 4.0 target image. The next section details how to copy an OS image to a target device.
Transfer the Image to the Target Device
After the bootable partition has been created, the OS image must be copied to the target device before the embedded system can run. A common method for copying the OS image to the target device is to install the target device’s hard drive into the development machine and copy the OS image to that hard drive. When the copy is complete, the target device’s hard drive is reinstalled into the target device. When the target device is started, the target device will boot from the OS image on the hard drive.
The following procedure details how to download an OS image to a target device using the network transfer method. In order to use the network transfer method, you must have a network card installed on your target device.
To download an OS image to a target device using the network transfer method
- Boot the target machine from the floppy drive, using a Net Boot disk.
- Execute the following command at the DOS prompt, substituting the name of your development computer as appropriate.
NET USE * //<computername>/embed
This command will map the shared embed folder to a drive on your target device.
- Execute the following commands at the DOS prompt to format the C: drive on the target machine and copy the target image.
FORMAT C: /Q XCOPY D:\*.* . /s/e
The target machine should now boot from the image installed on it when powered on.
For an embedded system to boot from read-only media, it must run from an El Torito format CD-ROM. Using the El Torito CD as Disk component, you can boot and run your system by using a CD-ROM in the El Torito format. If you plan to install your system on a bootable CD-ROM, use the Write Filter and El Torito CD as Disk components together. When the El Torito CD as Disk component is selected, select the FAT file system to reduce interaction with the Write Filter and increase memory for write operations.
Creating and preparing your Image
Your configuration must include the following components:
- El Torito CD As Disk (located in the All Nodes pane under System\Devices\Storage\Fixed Disk)
- FAT (File Allocation Table)
- Write Filter (System\Devices\Storage\Storage Filter Drivers)
- No Page File
When creating an embedded system that runs from a CD-ROM, make sure to consider the following issues. The BIOS for your embedded system must support the El Torito format CD-ROM. A system that boots from a read-only storage device cannot use a page file. The target system must recognize the El Torito CD-ROM as a standard block-mode disk device.
You can use any basic input/output system (BIOS) that boots Windows NT 4.0 to boot your embedded system. However, if your configuration includes an El Torito CD-ROM, BIOS recognizes the CD-ROM as the first drive on the system and Windows NT Embedded supports only the first partition on the CD. Therefore, the Advanced RISC Computing (ARC) name of the bootable El Torito partition is multi(0)disk(0)rdisk(0)partition(1).
To allow the user to choose whether to boot from an El Torito CD-ROM or a regular hard disk partition, you must add the appropriate code to the Boot.ini file. An example of the code follows:
[Boot Loader] timeout=10 Default=multi(0)disk(0)rdisk(0)partition(1)\WINNT [Operating Systems] multi(0)disk(0)rdisk(0)partition(1)\WINNT=''El Torito'' multi(0)disk(0)rdisk(1)partition(1)\WINNT=''1st HDD, 1st partition'' multi(0)disk(0)rdisk(1)partition(2)\WINNT=''1st HDD, 2nd partition'' multi(0)disk(0)rdisk(2)partition(1)\WINNT=''2nd HDD, 1st partition''
Recording Your Target System on an El Torito CD
The following procedure details how to record an embedded OS image onto an El Torito format CD-ROM.
- In the All Nodes pane, verify that the No Page File component and the El Torito CD as Disk component are selected:
- Build and verify the target system using Target Designer.
- On the computer that has the CD-ROM read/write device, create an empty FAT partition.
- Copy the following three files to the partition in the order given: ntdetect.com, ntldr, boot.ini.
- Copy your entire target system (the WINNT directory) to the root directory of the partition using the xcopy /e command.
- Create a new project of the type Bootable CD.
- To create the El Torito format, use a utility such as WinOnCD 3.5 from CeQuadrat.
- Drag the partition that contains the target system to Boot Source.
- In the disk pane, click Close disk.
- Insert the CD in the CD read/write device, and then click Record.
The target machine should now boot from the image installed on it when powered on with the CD-ROM you created in the CD-ROM drive. When the target system boots from the CD-ROM, the CD tray is locked until you shut down the system.
Creating and preparing your image
Using a flash disk, you can boot your embedded system and perform read/write operations. Data written to a flash disk is saved when the power is turned off.
You can include the Write Filter component in your OS image for use with flash disk media. If you use the Write Filter component on read/write media, changes made at run time are not saved. During a write operation to a disk, this component filters data that has been changed and puts it in memory instead of writing it to the disk. During a read operation from a disk, the write filter reads the data from where it is stored in memory, not from the disk. When you shut down the target system, the data written to memory is lost. The target system always boots from the original data. Using the Write Filter with flash disk media will prevent data from being written to the media, thus ensuring a longer flash disk life. Multiple write operations can degrade the integrity of the media.
PCMCIA drivers are required when flash disk media is used with an embedded OS. A general PCMCIA component definition file (.kdf) is required. Including this .kdf file in the build of your OS image will enable your OS to recognize PCMCIA cards and related drivers.
Transfer the image to the Target Device
If you have a network adapter attached to your target device, you can download your image to a flash disk using the procedure detailed above. If a network adapter is not installed, detach the storage device form your target machine, attach it to the development machine, and copy the target system to the storage device. When the copy operation is complete, reattach the storage machine to the target device and boot the embedded system. The target machine should now boot from the image installed on it when powered on.
The DiskOnChip is a flash disk device. In an embedded system the DiskOnChip simulates an IDE hard drive. To use the DiskOnChip media, you must include support for IDE and include the driver component for the DiskOnChip in your OS image. The procedure to boot an embedded OS from the DiskOnChip is identical to booting an image from an IDE hard drive.
The Microsoft Knowledge Base article, Q249306: HOWTO: Create a Windows NT-Bootable IDE Partition contains information relevant to this article.