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." umount /cdrom 2>/dev/null || true - log "Trying it again." - if mount -t iso9660 -o ro,exec $device /cdrom - then - log "CDROM-mount succeeded: device=$device" - mounted=1 - db_set cdrom-detect/cdrom_device $device - break - else - log "CDROM-mount failed again (error=$?): device=$device" - log "Unmounting CD just to be sure and giving it up." - umount /cdrom 2>/dev/null || true - fi fi done @@ -161,6 +155,13 @@ break fi done +if [ "X" = "X${suite}" ]; then + log "Could not determine the package 'suite'. Is the cdrom OK?" + fail +elif [ ! -e "/cdrom/dists/$suite/Release" ]; then + log "No such file '/cdrom/dists/$suite/Release'. Is the cdrom OK?" + fail +fi # Ask for eject to be installed into /target/, to be able to use it in # the prebaseconfig script.