• Bug#265636: Idea for Dell CDROM detect issue

    From Osamu Aoki@1:229/2 to All on Tue Aug 17 01:30:12 2004
    XPost: linux.debian.maint.boot
    From: [email protected]

    Hi,

    Executive summary:
    1. Patch by Vincent McIntyre (Bug#265636) has good intent but buggy
    as is. (I wish this type of syntax exists for "fail" function.)
    2. My previous patch was not general enough.
    3. My new patch here should work but intrusive at this moment.
    (This can be better. "fail" and "exit 1" need to be cleaned.)
    4. I lack time to test throrouly for the release.
    5. Realistically, ERRATA is the good aproach now considering release
    schedule.

    Proposed ERRATA:
    ----------
    In some CDROM drives such as the ones on the older Dell laptop PCs,
    second detection may be successful. If you fail in mounting CD, you
    simply run detect CDROM drive again from the menu. If reading CD fails
    with installation log in vt4 indicating:

    .... anna[4147]: /cdrom/dists//Release
    .... anna[4147]: : No such file or directory

    then, you need to go to console and run "umount /cdrom" before running
    to detect CDROM drive from the menu.
    ------------

    My thoughts...

    After some thought, I think situation of funny CDROM firmware/Linux
    kernel interaction as followings.

    In old tc1, buggy DELL CDROM drive DMA related initialization during
    mount caused mount error but mounted CD halfway (no symlink).

    In new rc1, buggy DELL CDROM drive the same DMA related initialization
    during mount causes no mount error while still mounting CD halfway (no symlink). agh.

    My initial attempt to work around in RC1 relied on failed action of
    mount.

    My new thought is if HW is buggy, we should tell user about it and offer
    way to proceed. Currently, you need to umount cd from the console
    unless you are expert. This is not desirable. Centrarized automatic
    umount should be implemented and easier to manage.

    Also dummy mount/umount code in my previous mail was commented out now
    so no one will use it unless you change source but as reminder. I also
    removed section which is based on tc1 fix scenario.

    Also I fixed funny confused use of fail/log functions in Vincent's
    oroginal patch.

    * Any opinion?
    * Should dummy mount/umount be commented out?
    * Is it worth patching now?
    * I think reorganizing whole code makes it much more readable.
    * Further code fix should be etch thing.

    Osamu


    --- cdrom-detect.postinst.old 2004-07-02 02:23:52.000000000 +0200
    +++ cdrom-detect.postinst 2004-08-17 00:21:06.000000000 +0200
    @@ -9,7 +9,9 @@
    }

    fail () {
    - log "CDROM-detect failed."
    + log "CDROM-detect failed. Unmounting cdrom just to be sure."
    + umount /cdrom 2>/dev/null || true
    + log "For buggy CDROM drive, you may try CDROM-detect again."
    db_input critical cdrom-detect/failure || [ $? -eq 30 ]
    db_go
    exit 1
    @@ -40,6 +42,10 @@
    fi
    for device in $devices
    do
    +# For some buggy CDROM drive, blindly mount and umount
    +# CDROM will avoid DMA issues with kernel.
    + #mount -t iso9660 -o ro,exec $device /cdrom || true
    + #umount /cdrom 2>/dev/null || true
    if mount -t iso9660 -o ro,exec $device /cdrom; then
    log "CDROM-mount succeeded: device=$device"
    mounted=1
    @@ -49,18 +55,6 @@
    log "CDROM-mount failed (error=$?): device=$device"
    log "Unmounting CD just to be sure."
  • From [email protected]@1:229/2 to All on Tue Aug 17 02:10:09 2004
    XPost: linux.debian.maint.boot

    1. Patch by Vincent McIntyre (Bug#265636) has good intent but buggy
    as is. (I wish this type of syntax exists for "fail" function.)

    That was only a sketch, as I don't have a good understanding of how such
    an error should be presented to the user by d-i.
    I think the problem with cdrom-detect.postinst is real and could be
    cleaned up quite quickly.
    I will study the code some more and try write a real patch.
    If the author would like to help, or take over, I'm happy for that too.

    Cheers
    Vince




    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Joey Hess@1:229/2 to Osamu Aoki on Tue Aug 17 09:50:07 2004
    XPost: linux.debian.maint.boot
    From: [email protected]

    Osamu Aoki wrote:
    Proposed ERRATA:
    ----------
    In some CDROM drives such as the ones on the older Dell laptop PCs,
    second detection may be successful. If you fail in mounting CD, you
    simply run detect CDROM drive again from the menu. If reading CD fails
    with installation log in vt4 indicating:

    .... anna[4147]: /cdrom/dists//Release
    .... anna[4147]: : No such file or directory

    then, you need to go to console and run "umount /cdrom" before running
    to detect CDROM drive from the menu.

    We have plenty of time to fix cdrom-detect before rc2 without resorting
    to ugly errata like that. I'd rather turn off DMA for all CDs than have
    that errata, personally.

    +elif [ ! -e "/cdrom/dists/$suite/Release" ]; then
    + log "No such file '/cdrom/dists/$suite/Release'. Is the cdrom OK?"
    + fail
    +fi

    Couldn't it retry the mount if the Release file was not found, rather
    than immediatly failing?

    --
    see shy jo

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.5 (GNU/Linux)

    iD8DBQFBIbOpd8HHehbQuO8RApPzAJ0argSL9IKUt+MRjxC4vwSsSqWHDQCeIgxp DiYpeLsxfk5GzWNFnCs59bw=
    =kTQC
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)