次の方法で共有


How to Create a Bootable Partition with DiskPart (Windows Embedded CE 6.0)

1/5/2010

The following steps show you how to create a bootable FAT16, FAT32, or exFAT partition on a hard disk.

Important

This topic applies to an older product version. See documentation for the most current version of Windows Embedded Compact. Or visit Windows Embedded Products & Solutions for the latest information about intelligent systems powered by Microsoft.

Creating a bootable partition

  1. Open a Windows Embedded CE project in Platform Builder.

  2. On the Build menu, select Open Release Directory in Build Window.

  3. At the command prompt, type cd %_WINCEROOT%\Platform\CECP\Src\Bootloader\BIOSLoader\Utilities\Diskpart

  4. At the command prompt, type build -c. This will build the DiskPart utility from the sources included in the x86-board support package (BSP).

  5. Boot a Windows CE PC-based hardware platform (CEPC) from the default FAT or ATAPI disk. For more information, see How to Boot a Run-Time Image on a CEPC from a Hard Disk Drive.

  6. To create a primary partition, run diskpart.exe, and then type the following commands at the DiskPart command prompt:

    • List disk
    • Select disk <N> (where N is the disk you want to partition from the list generated in the previous step).
    • Create Primary Size=X (where X is in megabytes).
    • Exit
  7. To format the partition to the desired file system, run diskpart.exe, and then type the following commands at the DiskPart command prompt:

    • Select disk <N> (where N is the disk you want to format)
    • List partition
    • Select partition Y (where Y is the partition you want to format on the disk)
    • Active
    • FixPartOffset
    • DumpMBR
    • BootSec File=\release\bsect.img Sector=Z (where Z is the first sector of the partition as given in the DumpMBR command output).
      Bsect.img is specific to the file system being used. One Bsect.img file is provided for each file system supported. Copy the desired file system Bsect.image file to the release directory before you run DiskPart.
    • MBRCode File=\release\Mbr.dat
      Before you run DiskPart, copy Mbr.dat from the DiskPart folder in the source directory.
    • Exit
  8. Copy the file %_WINCEROOT%\Platform\<platform>\Bootloader\BIOSLoader\Diskimages/\Bootdisk\Bldr to the partition that you created in the previous steps.

  9. Copy Boot.ini and Splash.bmx from %_WINCEROOT%\Platform\<platform>\Bootloader\BIOSLoader\Diskimages/\Bootdisk to the partition that you created in the previous steps.

  10. Copy the Windows Embedded CE image that you want to run to the partition that you created in the previous steps.

  11. Modify Boot.ini to use the correct Windows Embedded CE image name, for example, Nk.bin.

  12. Before you boot the new disk, make sure that you set the BIOS on the CEPC to boot from a hard disk. Usually, this is the default value.

See Also

Concepts

DiskPart Utility