Step 1: Format USB Media (Windows Embedded Standard 2009)

4/23/2012

First format the USB media. The ufdprep.exe tool can be found in the utilities folder under \Program Files\Windows Embedded.

To format USB media for booting from Windows XP

  1. On the development machine, insert the USB media.

  2. In the Command Prompt window, enter the following command:

    ufdprep.exe [/y] [/verify] [ [/size] | [/size=n] ] [/ntfs] <letter>:
    

    The following table explains ufdprep.exe arguments.

    ufdprep Argument Comment

    /y

    Suppress confirmation prompt

    /verify

    Check whether the media is formatted correctly; no changes made

    /size

    Display the size of the drive in MB

    /size=n

    Create a partition of size n in MB

    /ntfs

    Format the partition by using the NTFS file system

    <letter>:

    Specify the media's drive letter with no '\'

    Note

    Ufdprep.exe does not work on Windows Vista.

    Note

    To use USB Boot in combination with Enhanced Write Filter (EWF), leave room on the USB media for EWF to create an overlay partition. This requirement only applies to EWF disk mode and RAM mode configurations, and is not needed for the RAM Reg mode EWF configuration.

To prepare a UFD by using DISKPART on Windows Vista

  1. Start DISKPART.exe.

  2. List the physical disks attached to your development workstation.

    Diskpart>list disk
    

    The removable or fixed Flash device is displayed as the last zero-based number.

  3. Select the disk.

    Diskpart>select disk 1
    
  4. Verify that the selected disk is the one that you will clean, format, and activate.

    Diskpart>detail disk
    
  5. Clean the disk.

    Diskpart>clean
    
  6. Create the partition.

    Diskpart>create partition primary
    
  7. Mark the current partition as active.

    Diskpart>active
    
  8. Format the volume.

    Diskpart>format fs=fat32
    
  9. Exit DISKPART.

    Diskpart>exit
    

    Your Flash is now suitable for booting Windows Embedded Standard.

  10. Update target volume with NTLDR compatible bootcode by using Bootsect.exe.

    Note

    Bootsect.exe is available on the Windows Vista installation disk or as part of the OPK tools.

    Bootsect /nt52 e:
    

    The following output will display after Bootsect.exe runs successfully:

    E: (\\?\Volume{83aae253-9706-11dc-a552-001aa0ebecbe})
    

To boot test your flash device

  1. Copy an NTDLR and NTDETECT.COM to the root directory of your flash device, and then eject it from your Windows Vista development workstation with Windows Embedded Standard tools.

  2. Plug the flash device into your reference device, configure the BIOS (boot from USB, or CF), and then verify that you receive the following error message.

    Windows could not start because the following file is missing or corrupt:
    <Windows root>\system32\ntoskrnl.exe. Please re-install a copy of the above file.
    

    This error means that the BIOS found the MBR, the MBR started the boot code, and then the boot code found and started NTLDR.

See Also

Other Resources

Enhanced Write Filter