[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#267168: cdrom-detect: How about changing to wishlist bugs

Package: cdrom-detect
Version: 1.17
Followup-For: Bug #267168

This bug and its friends which are still there as nomal bugs are now
almost finished for me in etch beta 3 release.  

I am taliking:
 #247960, #258316, #259264, #262140, #265636, #267168, #314163

Also, the following bug may be merged to above list.


I think these can be changed to a single wishlist bug for documentation
request to mention faulty CDROM hardware issue now.  If you document
this, this closes half the normal bugs for this package :-)

Wishlist content: 

In "Chapter 5.3 Troubleshooting the Installation Process" right after
"5.3.1. Floppy Disk Reliability", I sugest to include following

| 5.3.2. CD-ROM Reliability
| In some older faulty CD-ROM drives, detecting and reading CD-ROM during
| the boot process may fail in various funny ways. This can be worked
| around simply by detecting CD-ROM again after the fasilure incident.

I also attach a patch which clean code around this failed CD-ROM detect
situation.  This removes my old workaround and always use "fail"
function with "unmount" in it under "exit 1" situation for cleaner
consistency.  I also think failing soon when manual detection failed is
the better way than looping to execute autodetection again. (untested

Here is the background and explanation:

Essentially, the issue was how to work around faulty hardware which
kernel has diffuculty handling by itself.  After you have implimented
 if [ -z "$suite" ] 
test in this program, there is no bug by this program from my

All we need to do is restart instaler from cdrom-detect phase.
Bad hardware should suffer a bit.  So what :-)

Let me review previous history by my vague memory and explain what I am

When trying to install to a machine with old CD-ROM drive on my old DELL
machine and others, CDROM mounts fails in many funny ways.  

The first trial of working around this isuue was retry mounting.

Then with newer kernel, it seems the mounting itself happens after
several kernel error messages but no error from mount command.  The
mounted contents of CD-ROM are not right.  I mean that symlinks shows up
as zero length normal files.  This cause read failure in the 
 for distlink in stable testing unstable
loop as expected.  This leaves $suite unset.

Since there is unmount before fail there now, we can rerun cdrom-detect
without problem.  That was headiache in RC1 days.

If this patch is too intrusive to your taste, please do not apply this
now.  Since SVN repo and 1.17 seems to be the same or just white space
difference, I made patch from unstable source.  

I have not tested this patch with actual installer.  I attach here only
to indicate my point and wishing this be considered at least for the
post-etch release.  This patch is at least more current to SVN version
than the old ones on BTS.

I hope this helps.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-1-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

~\^o^/~~~ ~\^.^/~~~ ~\^*^/~~~ ~\^_^/~~~ ~\^+^/~~~ ~\^:^/~~~ ~\^v^/~~~ +++++
        Osamu Aoki <osamu@debian.org>  Yokohama Japan, GPG-key: A8061F32
 .''`.  Debian Reference: post-installation user's guide for non-developers
 : :' : http://qref.sf.net and http://people.debian.org/~osamu
 `. `'  "Our Priorities are Our Users and Free Software" --- Social Contract

--- cdrom-detect.postinst.orig	2006-10-09 19:31:46.000000000 +0900
+++ cdrom-detect.postinst	2006-10-09 21:46:37.000000000 +0900
@@ -10,6 +10,8 @@
 fail () {
 	log "CDROM-detect failed."
+	log "Unmounting CD just to be sure."
+	umount /cdrom 2>/dev/null || true
 	exit 1
@@ -38,21 +40,6 @@
 			db_set cdrom-detect/cdrom_device $device
-		else
-			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
@@ -66,6 +53,8 @@
 		db_get cdrom-detect/retry
 		if [ "$RET" = "true" ]; then
+			log "Unmounting CD just to be sure."
+			umount /cdrom 2>/dev/null || true
@@ -116,9 +105,7 @@
-			log "CDROM-mount failed (error=$?): device=$device"
-			log "Unmounting CD just to be sure and giving it up."
-			umount /cdrom 2>/dev/null || true
+			fail
@@ -130,10 +117,9 @@
 	log "Detected CD '$CDNAME'"
 	log "The available CD is not a Debian CD!"
-	umount /cdrom
 	db_input critical cdrom-detect/wrong-cd || [ $? -eq 30 ]
-	exit 1 
+	fail 
 # Get all the pool directories into the dentry cache, to cut down on seek
@@ -173,7 +159,6 @@
 	log "Error reading Release file; unable to determine distribution"
 	db_input critical cdrom-detect/no-release || [ $? -eq 30 ]
-	umount /cdrom

Reply to: