Norman
Mon Mar 31 20:14:58 CDT 2008
Ummmm, OK, let's see. I'm going to write a PBR, so I'm computing the values
that need to go into the PBR, and I need to know how to compute the value
for HiddenSectors. I should call DeviceIoControl and ask
IOCTL_DISK_GET_PARTITION_INFO to tell me the correct value that I'm going to
write?
Was my question really so hard? Some vendors think the BPB_HiddSec field
counts the MBR along with other hidden sectors, some vendors think it does
not, Microsoft thinks it's operating system dependent, David Craig thinks
Windows 98 got it wrong .... Oh I see, yes my question really was so hard.
Please, does some guru know the answer?
"Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
news:uk3b2%23xkIHA.1212@TK2MSFTNGP05.phx.gbl...
> The correct value for HiddenSectors (offset 0x1c in the boot sector) is
> PARTITION_INFORMATION::HiddenSectors returned by
> IOCTL_DISK_GET_PARTITION_INFO.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
>
http://www.storagecraft.com
>
> "Norman Diamond" <ndiamond@newsgroup.nospam> wrote in message
> news:uqM7sFwkIHA.1184@TK2MSFTNGP04.phx.gbl...
>> OK. Does boot sector boot code expect that value to include the MBR in
>> its
>> count?
>>
>>
>> "Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
>> news:O5oT2jvkIHA.1208@TK2MSFTNGP05.phx.gbl...
>> > This value is only used by the boot sector boot code.
>> >
>> > --
>> > Maxim Shatskih, Windows DDK MVP
>> > StorageCraft Corporation
>> > maxim@storagecraft.com
>> >
http://www.storagecraft.com
>> >
>> > "Norman Diamond" <ndiamond@newsgroup.nospam> wrote in message
>> > news:uvP3oaukIHA.1184@TK2MSFTNGP04.phx.gbl...
>> >> In a Partition Boot Record for a FAT partition, the BPB_HiddSec field
>> >> is
>> >> supposed to be a count of hidden sectors located just prior to the
>> >> sector
>> >> containing the PBR itself. For the first partition on the drive, is
>> >> this
>> >> count supposed to include the MBR?
>> >>
>> >> Supposedly the exact answer is operating system specific. However,
>> >> the
>> >> vendor of a card or other storage device can't always guess which
>> >> operating
>> >> systems might be used by the end user. In at least one preformatted
>> >> card
>> >> the count does include the MBR. I'm guessing that some devices (e.g.
>> >> maybe
>> >> digital cameras) depend on having some hidden sectors there -- but do
>> >> they
>> >> depend on the count including the MBR, I can't guess. Somehow I'm
>> >> gaining
>> >> the impression that Windows ignores that field, but I don't see any
>> >> documentation saying that Windows ignores that field. Anyone know?
>> >>
>> >
>>
>