Boot Sector

The boot sector code is responsible for finding the BIOS boot loader image on the storage device, loading it into RAM, and then jumping to its startup routine. The sector image is 512 bytes, which is enough to fit into a disk sector.

Note   The image must be exactly 512 bytes because the MBR, or BIOS in the case of a floppy boot, looks for a particular signature to be at the end of the sector.

Part of the 512-byte boot sector is the BIOS parameter block (BPB). The BPB is a data area typically written when the storage device is formatted. It specifies information about the storage device and file system.

The boot sector code is located in %_WINCEROOT%\Public\Common\Oak\Csp\i486\Biosloader\Bootsector directory and can be built with the Microsoft Assembler (MASM). Am image is already built and provided in the setup disk contents found in %_WINCEROOT%\Public\Common\Oak\Csp\i486\Biosloader\Diskimages/\Setupdisk\Bsect.img. In addition to the 512-byte restriction, COM and EXE headers are not needed because the boot sector code runs outside the scope of an operating system (OS). As part of the sector build process, the header of the resultant COM file is removed with scripted help from Debug.exe and boot sector image results, Bsect.img. The resulting image leaves room for the BIOS parameter block, which is left intact when the sector code is written to the storage device.

After the storage device is partitioned and formatted, the boot sector image is written to the device in the appropriate location. The Cesys utility and its sources, which are provided in Platform Builder, will do this.

See Also

x86 BIOS Boot Loader

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.