Reading the Boot Sector of a Drive This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
This article was previously published under Q102870 SUMMARY
BOOTSEC demonstrates how to use Interrupt 25h (absolute disk read) to
read the boot sector (the first sector on head 0, cylinder 0) off of a
drive (either a floppy disk drive or hard disk).
BOOTSEC checks to see whether the drive is one of the following:
Drive Detection Method
---------------------------------
CD-ROM Interrupt 2F calls to MSCDEX.
Net drive Windows API WNetGetConnection().
RAM drive Checks the boot sector to see if there is one FAT.
Hard disk Checks the media BYTE of the boot sector. If it is
equal to 0xF8h then it is a hard disk.
Floppy disk Checks the media BYTE of the boot sector. If it is
not equal to 0xF8h and it is not a RAM drive, net
drive, or CD-ROM drive, then it is a floppy disk drive.
BOOTSEC also shows how to implement a dialog box as a main window
using a private dialog class.
MORE INFORMATIONThe following files are available for download from the Microsoft
Download Center: Bootsec.exe (http://download.microsoft.com/download/platformsdk/update/1/w31/en-us/bootsec.exe) For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base: 119591 (http://support.microsoft.com/kb/119591/EN-US/) How to Obtain Microsoft Support Files from Online Services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.
The following information is contained in the boot sector:
| Article Translations
|


Back to the top
