Don't override the hidden sectors value set during format when seting up bootsector.
This allows installing ReactOS on a FAT partition that doesn't start on sector 63. Successfully tested with a partition starting on sector 2048, for instance.
Patch by Wim Hueskes

CORE-8825 #resolve #comment Committed in r71418. Thanks for the debugging and the patch!

svn path=/trunk/; revision=71418
This commit is contained in:
Pierre Schweitzer 2016-05-26 20:50:44 +00:00
parent a1a1d0917e
commit b6e9ec7df1

View file

@ -1582,8 +1582,6 @@ InstallFat16BootCodeToDisk(
FIELD_OFFSET(FAT_BOOTSECTOR, BootCodeAndData) - FIELD_OFFSET(FAT_BOOTSECTOR, BootCodeAndData) -
FIELD_OFFSET(FAT_BOOTSECTOR, OemName)); FIELD_OFFSET(FAT_BOOTSECTOR, OemName));
NewBootSector->HiddenSectors = PartitionList->CurrentDisk->SectorsPerTrack;
/* Free the original boot sector */ /* Free the original boot sector */
RtlFreeHeap(ProcessHeap, 0, OrigBootSector); RtlFreeHeap(ProcessHeap, 0, OrigBootSector);
@ -1740,8 +1738,6 @@ InstallFat32BootCodeToDisk(
FIELD_OFFSET(FAT32_BOOTSECTOR, BootCodeAndData) - FIELD_OFFSET(FAT32_BOOTSECTOR, BootCodeAndData) -
FIELD_OFFSET(FAT32_BOOTSECTOR, OemName)); FIELD_OFFSET(FAT32_BOOTSECTOR, OemName));
NewBootSector->HiddenSectors = PartitionList->CurrentDisk->SectorsPerTrack;
/* Get the location of the backup boot sector */ /* Get the location of the backup boot sector */
BackupBootSector = OrigBootSector->BackupBootSector; BackupBootSector = OrigBootSector->BackupBootSector;