[USETUP]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 6 Sep 2010 01:46:06 +0000 (01:46 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 6 Sep 2010 01:46:06 +0000 (01:46 +0000)
commit3995cce1bac1b66f7e5be1dcf5807eb6d5919cc3
tree9d7582674a4cdbeb4a2f188b29e7bc103a7ad23b
parent74d5088c7dbf428b33a3282754feebf4bf9c47fb
[USETUP]
The VBR (volume boot sector) contains a structure called BPB (bios parameter block) that describes the disk and the partition. The HiddenSectors member contains the number of the first sector of the partition. This is used by the VBR code to load the secondary sector containing additional boot code that is located at secor 14 relative to the partition start. Previously we were copying the BPB (plus additionally the OemName, which makes no sense) from the old VBR. Now Linux is a bit lame and doesn't put the correct value into the HiddenSectors field. Instead it sets it to the number of sectors per track which seems to be the default value. When now the linux partition manager decides to do a non standard partitioning, aligning the partition to 0x800, then the VBR fails to load it's 2nd sector. Fix this by correcting the value in the BPB with the value from the partition info.

See issue #2733 for more details.

svn path=/trunk/; revision=48706
reactos/base/setup/usetup/bootsup.c
reactos/base/setup/usetup/interface/usetup.c