• [^] # Re: Suse 9.1 est sorti

    Posté par . En réponse au journal Suse 9.1 est sorti. Évalué à 1.

    Au fait, c'est corrigé . C'est intéressant, alors je remets tout le mail que j'ai reçu ce matin :

    At last someone here reproduced the bug which is now fully explored.

    Part of the reason I could not understand the bug, is that I could not
    believe windows XP was still using the error prone int13 function 2
    (CHS based) instead of the (available everywhere for some time) int13
    function 0x42. Under linux, grub and lilo only use function 2 when
    function 0x42 fails (they don't even ask the BIOS if it manages 0x42
    since some BIOS don't report correctly having this functionality, cf
    FORCE_LBA in grub)

    The other reason is that I thought BIOS faking heads number (the
    so-called LBA mode) was a choice independant of the content of the
    drive. This is wrong, the BIOS tries to adapt its mode based on the
    partition table [1]

    So here is what happened:
    - kernel 2.6 doesn't try to give the logical geometry, and gives the
    physical geometry instead [2]
    - diskdrake uses the physical geometry to generate the CHS information
    (which is a broken duplicate of the linear sector number)
    - the BIOS sees the partition table uses a different CHS geometry, and
    adapt to it
    - ... and Windows computes the CHS to read its stage1.5 based on the
    previous geometry that it keeps in its boot sector. Alas the CHS
    doesn't get the same sector and Windows's boot dies (with very bad
    error detection) [3]


    Bug occurence: the pb only occurs when you modify the partition table,
    since otherwise diskdrake won't write it.


    Code fix description: inspired by the way new fdisk and parted detects
    the logical geometry based on the partition table [4]. parted code
    is especially quite robust.
    The fix is now included in cooker (DrakX #1.912), so:

    I still would like to access the BIOS geometry, esp. for empty
    partition tables. But kernel 2.6 doesn't give us this
    (/sys/firmware/edd/int13_dev80/default_heads is plain wrong on a box
    here)


    Known workaround: forcing LBA mode in the BIOS


    Fixing partition table:
    with diskdrake from drakxtools-10-24mdk do
    % diskdrake --change-geometry=hda=255,63
    where
    - you replace hda with your drive device
    - if Windows still fails, try adapting 255,63 to your drive LBA
    emulation. For this, see what is the geometry your BIOS gives when
    forcing LBA emulation

    [1] http://www.ussg.iu.edu/hypermail/linux/kernel/0311.3/1142.html(...)
    [2] http://www.ussg.iu.edu/hypermail/linux/kernel/0311.3/0898.html(...)
    [3] http://www.ussg.iu.edu/hypermail/linux/kernel/0311.3/1029.html(...)
    [4] http://www.ussg.iu.edu/hypermail/linux/kernel/0311.3/1164.html(...)