[Bug 1043182] Re: scsi_debug emulated CD does not implement READ_TOC

Martin Pitt martin.pitt at ubuntu.com
Wed Aug 29 10:06:37 UTC 2012


OK, really not cdrom_id's fault, scsi_Debug does not implement these CD-
ROM SCSI-2 commands.

** Package changed: udev (Ubuntu) => linux (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to udev in Ubuntu.
https://bugs.launchpad.net/bugs/1043182

Title:
  scsi_debug emulated CD does not implement READ_TOC

Status in “linux” package in Ubuntu:
  Confirmed

Bug description:
  cdrom_id does not like the emulated SCSI CD-ROM from scsi_debug. This
  is a stopper for writing automatic tests around CDs.

  Reproducer:
  sudo modprobe scsi_debug
  sudo dd if=/tmp/test.iso of=/dev/sdc   # check the device!
  echo 5 | sudo tee /sys/bus/pseudo/drivers/scsi_debug/ptype
  echo 1 | sudo tee /sys/bus/pseudo/drivers/scsi_debug/add_host

  You will notice that blkid detects it just fine:

  $ sudo blkid -p /dev/sr1 
  /dev/sr1: VERSION="Joliet Extension" LABEL="CDROM" TYPE="iso9660" USAGE="filesystem" 

  but there are no file system properties in udev for the device,
  because the udev rules only run blkid for CDs with a recognized medium
  (to avoid unintended side effects and hangs):

  /lib/udev/rules.d/60-persistent-storage.rules:KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode"
  /lib/udev/rules.d/60-persistent-storage.rules:KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode"

  However, cdrom_id fails:

  $ /lib/udev/cdrom_id --debug /dev/sr1
  main: probing: '/dev/sr1'
  cd_inquiry: INQUIRY: [Linux   ][scsi_debug      ][0004]
  info_scsi_cmd_err: GET CONFIGURATION failed with SK=5h/ASC=20h/ACQ=00h
  cd_profiles: drive is pre-MMC2 and does not support 46h get configuration command
  cd_profiles: trying to work around the problem
  info_scsi_cmd_err: READ DISC INFORMATION failed with SK=5h/ASC=20h/ACQ=00h
  cd_profiles_old_mmc: no current profile, but disc is present; assuming CD-ROM
  info_scsi_cmd_err: READ TOC failed with SK=5h/ASC=20h/ACQ=00h
  info_scsi_cmd_err: READ DISC INFORMATION failed with SK=5h/ASC=20h/ACQ=00h
  ID_CDROM=1
  ID_CDROM_MEDIA=1
  ID_CDROM_MEDIA_CD=1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1043182/+subscriptions




More information about the foundations-bugs mailing list