Ignore:
Timestamp:
Apr 13, 2014, 1:31:04 PM (11 years ago)
Author:
Ben Rietbroek
Message:

Removed 'Force BIOS-LBA Usage' entry from AiR-BOOT SETUP [2012-05-15]

This commit eliminates the severe bug that previous commits warned
about in their commit-message. The cause of the bug is not handling
CHS values when modifying LVM-information. Thus, when LBA-access was
disabled, the CHS-access method was used with improper values. This
resulted in a CHS address of (0,0,1), which is the MBR, and then
erroneously writing the modified LVM-record to it.

While a freshly installed AiR-BOOT of v1.07 or higher defaults to having
LBA enabled, this is not the case for v1.06. Since AiR-BOOT merges the
previous configuration, any upgrade from v1.06 with LBA set to disabled
would propagate the setting to the new version. Modifying
LVM-information from the AiR-BOOT SETUP, like changing the label or
fiddling with drive-letter assignments, would then trigger the bug and
write the LVM-record to the MBR. Users fiddling with the SETUP could
also disable LBA-access and trigger the bug.

This commit removes the 'Force BIOS-LBA Usage' option from the
AiR-BOOT SETUP, preventing users to disable LBA. Also, when AiR-BOOT
starts, it now always enables LBA-addressing, so CHS-addressing is not
used anymore. Furthermore, the Installer is modified to always enable
LBA-addressing in the AiR-BOOT configuration it writes to disk.
This ensures that older versions, which do not implicitly enable LBA on
starting, will find LBA as enabled.

On today's systems there is no need to use CHS-addressing anymore.
In fact, it does more harm than good because the CHS values do not
represent true physical geometry anymore. Instead, the drive and
the BIOS do translations that can cause unpredictable results when
moving the drive between systems. This is particularly true for USB
mass storage devices.

Therefore, CHS-addressing will be removed from AiR-BOOT.
This will free-up badly needed code space and create some room in the
internal partition tables that can be put to other use.

Info

o Bug Description

Trashing the Master Boot Record.

o Cause

Not handling CHS values while modifying LVM-information.

o Effect

Writing the modified LVM-record to the MBR when modifying LVM
information from the AiR-BOOT SETUP.
(like the partition-label or drive-letter assignments)

o Measures

  • Remove 'Force BIOS-LBA Usage' from AiR-BOOT SETUP
  • Always enable LBA when AiR-BOOT starts
  • Always set LBA enabled when writing on-disk AiR-BOOT configuration

o Affected AiR-BOOT versions

*All* v1.0.8 pre-releases up and including commit [2012-05-13].

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BOOTCODE/REGULAR/DRIVEIO.ASM

    r49 r50  
    607607        call    LVM_CheckSectorSignature
    608608        jnc     DIOSLVMS_SevereError                  ; LVM Signature must be there
     609
     610IFDEF   AUX_DEBUG
     611        ;~ call    DEBUG_DumpRegisters
     612ENDIF
     613
    609614        call    DriveIO_LVMAdjustToInfoSector
     615
     616IFDEF   AUX_DEBUG
     617        ;~ call    DEBUG_DumpRegisters
     618ENDIF
     619
    610620        mov     si, offset LVMSector
    611621        call    DriveIO_SaveSector
     
    788798; #########################################################################
    789799DriveIO_SaveSector              Proc Near  Uses ax bx cx ds si es di
     800
     801IFDEF   AUX_DEBUG
     802        call    DEBUG_DumpRegisters
     803        call    AuxIO_DumpSector
     804        call    AuxIO_TeletypeNL
     805ENDIF
     806
    790807        test    byte ptr cs:[CurIO_UseExtension], 1
    791808        jz      DIOSS_UseNormal
    792809        ; Are we forced do use LBA via Setting?
    793         test    byte ptr cs:[CFG_ForceLBAUsage], 1
    794         jnz     DIOSS_UseExtension
     810        ; Always use INT13X on v1.0.8.
     811        ;~ test    byte ptr cs:[CFG_ForceLBAUsage], 1
     812        ;~ jnz     DIOSS_UseExtension
     813        jmp     DIOSS_UseExtension
    795814        ; Is the drive not a harddrive?
    796815        cmp     dl, 80h
     
    932951
    933952IFDEF AUX_DEBUG
    934       ; Dump the value
    935       ;call     AuxIO_TeletypeHexByte
    936       ;call     AuxIO_TeletypeNL
     953        ; Dump the value
     954        ;~ call     AuxIO_TeletypeHexByte
     955        ;~ call     AuxIO_TeletypeNL
    937956ENDIF
    938957
Note: See TracChangeset for help on using the changeset viewer.