Gutsy Alternate fails: cannot detect and mount CD-ROM

Bug #143958 reported by TJ
8
Affects Status Importance Assigned to Milestone
udev (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: linux-source-2.6.22

This is related to bug #141646 "Gutsy LiveCD won't start on Vaio SRX51 & SRX41" in that there is no way to start or install Gutsy without significant user intervention on Sony Vaio PCG-SRX51, PCG-SRX41 or Acer Travelmate C104CTi (and additionally any PC using an external IEEE1394 CD/DVD drive).

They boot from an external IEEE-1394 DVD-ROM/CD-RW drive.

Text installer fails with:

[Detect and mount CD-ROM]
Your installation CD-ROM couldn't be mounted. This probably means
that the CD-ROM was not in the drive. If so you can insert it and try again.

This despite the fact the CD has just booted!

This is a definite regression; Feisty booted and installed perfectly on these Vaios, and Gutsy LiveCD booted but failed due to other problems.

Dropping to the BusyBox I find the following devices listed:

scd0
sda, sda1-sda6
sdb
sg0 (sda - Toshiba MK3018GA hard disk)
sg1 (IEEE1394 CD-RW/DVD-ROM)
sg2 (sdb - MSC-U03 MemoryStick)

lsmod shows ieee1394, ohci139, sg, sbp2, scsi_mod loaded.

/sys/bus/scsi/devices/3:0:0:0 shows the files
block:sr0
ieeee1394_id
model ("CD-RW CRX820E")
state ("running")
scsi_generic:sg1

There is no /dev/cdrom

$ mount /dev/scd0 /cdrom

works and I can access the file system. After typing "exit" to return to the menu the CD is found and the next stage in the installer runs correctly and files are copied from the CD.

Revision history for this message
TJ (tj) wrote :

I managed to save the install logs to the local hard disk, boot into Feisty and transfer them over the network to my primary laptop.

I'm attaching syslog (81.5KB) to this comment, but the important bit would appear to be:

cdrom-detect: Searching for Ubuntu installation media...
cdrom-detect: CD-ROM mount failed: device=/dev/sdb
cdrom-detect: CDROM-detect failed; unmounting CD just to be sure
main-menu[3246]: (process:4299): mount:
main-menu[3246]: (process:4299): Mounting /dev/sdb on /cdrom failed
main-menu[3246]: (process:4299): : No medium found
main-menu[3246]: WARNING **: Configuring 'cdrom-detect' failed with error code 1
main-menu[3246]: WARNING **: Menu item 'cdrom-detect' failed.

Which appears to suggest cdrom-detect is not fully exploring the devices and assumes the MemoryStick slot is the CD-ROM device.

Revision history for this message
TJ (tj) wrote :

Further into the installer, after mounting the drive manually, another more terminal problem crops up which is reported in bug #143963 "Gutsy Alternate fails: Debootstrap Error".

I'm not sure if this one causes that one, or if they are unrelated.

Revision history for this message
TJ (tj) wrote :

I've encountered this same problem on an Acer Travelmate C104TCi, which also uses an external IEEE1394 DVD-ROM/CD-RW drive which appears as /dev/scd0.

From busybox I can do:

mount /dev/scd0 /cdrom
exit

and continue with the installation. At this point I'm not sure if the Debootstrap error occurs since I cannot yet resize the existing partitions to make space for the install.

Revision history for this message
TJ (tj) wrote :

Continuing installation on the Acer Travelmate C104TCi. After using Guided partitioning to resize the NTFS partition it has hit bug #143963 "Gutsy Alternate fails: Debootstrap Error", so it seems this bug causes that one.

Revision history for this message
TJ (tj) wrote :

I've been digging into this error. I don't recommend diving into the deep-end of debian-installer (d-i) unless you have to! I present a simple 4-line modification to 'list-devices' that solves the problem.

The root cause is the way d-i's /bin/list-devices script detects a CD using udevinfo. the script iterates all the devices in /sys/block/

In the cases that are failing the drives are on the IEEE1394 bus:

udevinfo -q all -p /sys/block/sr0
P: /block/sr0
N: scd0
S: disk/by-id/ieee1394-xxxxxx...
S: disk/by-path/pci-xxxx....
E: DEVTYPE=disk
E: ID_SERIAL=xxxxx...
E: ID_BUS =ieeee1394
E: ID_PATH=pcixxxx.....

At the point where CD-ROMs are detected the /bin/list-devices script does this:

 if ! $match && [ "$TYPE" = cd ]; then
  if udevinfo -q env -p "$devpath" 2>/dev/null | \
     grep -q '^ID_CDROM='; then
   match=:
  fi
 fi

Obviously, there isn't an ID_CDROM since DEVTYPE = disk.

When the failure occured I used Ctrl+Alt+F2 to switch to a virtual terminal then using "nano /bin/list-devices" I modified it to read:

 if ! $match && [ "$TYPE" = cd ]; then
  if udevinfo -q env -p "$devpath" 2>/dev/null | \
     grep -q '^ID_CDROM='; then
   match=:
  elif udevinfo -q name -p "$devpath" 2>/dev/null | \
     grep -q 'cd'; then
   match=:
  fi
 fi

I then returned to the installer menu using Ctrl+Alt+F1 and ran the "Detect and mount CD-ROM" step once more. It successfully detects the CD-ROM drive and ends up reporting:

CD-ROM detected
The CD-ROM autodetection was successful. A CD-ROM drive has been found and it currently contains the CD Ubuntu 7.10 "Gutsy Gibbon" - Alpha i386 (20070921.1). The installation will now continue.

I had a similar failure trying to install Feisty on a Dell PowerEdge 4x Xeon server earlier this year. On that occasion I dropped Ubuntu because I didn't have the time to debug the issue fully. That suggests to me this issue could be affecting a lot more systems than we might have thought.

Hopefully you can test and apply this patch to d-i so the installer works on a wider range of systems.

I'll now try a complete install run and hope this solves bug #143963 too.

TJ (tj)
description: updated
Revision history for this message
Colin Watson (cjwatson) wrote :

sr devices should support the CDROM_GET_CAPABILITY ioctl. I think the real bug here is that udev-udeb doesn't contain cdrom_id.

Revision history for this message
TJ (tj) wrote :

From booting the newly installed OS, udevinfo reports the ID_CD_ROM correctly:

tj@etch-a-sketch:~$ udevinfo -q all -p /block/sr0
P: /block/sr0
N: scd0
S: sr0
S: disk/by-id/ieee1394-0010100305000000:0:0
S: disk/by-path/pci-0000:00:05.0-ieee1394-0x0010100305000000:0:0
S: cdrom
S: cdrw
S: dvd
E: ID_CDROM=1
E: ID_CDROM_CD_R=1
E: ID_CDROM_CD_RW=1
E: ID_CDROM_DVD=1
E: ID_CDROM_MRW=1
E: ID_CDROM_MRW_W=1
E: ID_CDROM_RAM=1
E: DEVTYPE=disk
E: ID_SERIAL=0010100305000000:0:0
E: ID_BUS=ieee1394
E: ID_PATH=pci-0000:00:05.0-ieee1394-0x0010100305000000:0:0
E: GENERATED=1

tj@etch-a-sketch:~$ sudo /lib/udev/cdrom_id /dev/scd0
ID_CDROM=1
ID_CDROM_CD_R=1
ID_CDROM_CD_RW=1
ID_CDROM_DVD=1
ID_CDROM_MRW=1
ID_CDROM_MRW_W=1
ID_CDROM_RAM=1

Revision history for this message
Colin Watson (cjwatson) wrote :

udev (113-0ubuntu10) gutsy; urgency=low

  * Add cdrom_id and corresponding rules to the udeb. LP: #143958.

 -- Colin Watson <email address hidden> Sun, 23 Sep 2007 19:43:49 +0100

Changed in udev:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.