Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
hotplugging CDROM drive [1/2 SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Tue Aug 30, 2005 3:36 pm    Post subject: hotplugging CDROM drive [1/2 SOLVED] Reply with quote

is it possible ?

I get this from dmesg when its plugged in
Code:
usb-storage: *** thread sleeping.
  Vendor: ASUS      Model: SCB-2408          Rev: 1.2B
  Type:   CD-ROM                             ANSI SCSI revision: 00
Attached scsi generic sg0 at scsi1, channel 0, id 0, lun 0,  type 5
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Bad target number (1:0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Bad target number (2:0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Bad target number (3:0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Bad target number (4:0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Bad target number (5:0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Bad target number (6:0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Bad target number (7:0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: device scan complete

Code:

gravity dev #  gravity dev # ls -ls |grep sg0
0 crw-rw----  1 root root 21,  0 Aug 31 16:28 sg0
gravity dev #   


and it appears
but
Code:
gravity dev # mount -t auto /dev/sg0 /mnt/cdrom
mount: /dev/sg0 is not a block device
gravity dev # cat /etc/fstab

_________________
join the optout - http://nhsconfidentiality.org


Last edited by thecooptoo on Sat Oct 01, 2005 3:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Tue Aug 30, 2005 8:12 pm    Post subject: Reply with quote

Try with /dev/sr0 (or maybe /dev/scd0) instead of /dev/sg0. /dev/sg0 is a low-level interface and not the block device.
Back to top
View user's profile Send private message
kiwi_uk
n00b
n00b


Joined: 28 Aug 2005
Posts: 59
Location: Leicester, UK

PostPosted: Tue Aug 30, 2005 9:16 pm    Post subject: Reply with quote

Could those errors be caused by the "Probe all LUNs" option in the kernel's SCSI config section? If so, they'd be meaningless & harmless.

Jon
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Tue Aug 30, 2005 10:00 pm    Post subject: Reply with quote

Code:
gravity paul # mount -t auto /dev/scd0 /mnt/cdrom
mount: special device /dev/scd0 does not exist
gravity paul # mount -t auto /dev/sr0 /mnt/cdrom
mount: special device /dev/sr0 does not exist
gravity paul #                               

_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Wed Aug 31, 2005 1:19 am    Post subject: Reply with quote

What happens if you create the node yourself (with "mknod /dev/scd0 b 11 0") ? Also /dev/scd0 is sometimes called /dev/scda instead.
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Sat Sep 03, 2005 8:55 pm    Post subject: Reply with quote

created the node
then
Code:
gravity / # ls -la /dev/sc*
brw-r--r--  1 root root 11, 0 Sep  4 21:44 /dev/scd0
gravity / # mount -t iso9660 /dev/scd0 /mnt/cdrom
mount: /dev/scd0 is not a valid block device
gravity / #                 

_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Sat Sep 03, 2005 9:05 pm    Post subject: Reply with quote

created the node
then
Code:
gravity / # ls -la /dev/sc*
brw-r--r--  1 root root 11, 0 Sep  4 21:44 /dev/scd0
gravity / # mount -t iso9660 /dev/scd0 /mnt/cdrom
mount: /dev/scd0 is not a valid block device
gravity / #                 


ive come across this - dont know if its relevant .Currently the CDRom is the only USB storage device I have attached
Code:

gravity dev # cat /etc/mtab
/dev/hda3 / ext2 rw,noatime 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
udev /dev tmpfs rw,nosuid 0 0
devpts /dev/pts devpts rw 0 0
/dev/hda1 /boot ext2 rw,noatime 0 0
none /dev/shm tmpfs rw,noexec,nosuid,nodev 0 0
usbfs /proc/bus/usb usbfs rw,devmode=0664,devgid=85 0 0
gravity dev #


googling ,ive come upon lsscsi

without it plugged in
Code:

gravity dev # lsscsi
gravity dev # lsusb
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 002: ID 062a:0001 Creative Labs Notebook Optical Mouse
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
 


with it plugged in
Code:

gravity dev # lsscsi
[1:0:0:0]    cd/dvd  ASUS     SCB-2408         1.2B  -
gravity dev # lsscsi -lvH
[1]    usb-storage
  cmd_per_lun=1    host_busy=0    sg_tablesize=255  unchecked_isa_dma=0
  device dir: /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:2.0/host1
gravity dev # lsusb
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 002: ID 062a:0001 Creative Labs Notebook Optical Mouse
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 004: ID 2821:5001
Bus 001 Device 001: ID 0000:0000
gravity dev # 


so its appearing in both SCSI and USB
but how do I mount it ?
_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Sun Sep 18, 2005 9:52 pm    Post subject: Reply with quote

still not working .Having googled a lot Ive added in
SCSI CDROM support in the kernel

Code:
 │ │                 --- SCSI device support                           
  │ │                  [*]   legacy /proc/scsi/ support                       
  │ │                  ---   SCSI support type (disk, tape, CD-ROM)     
  │ │                  <*>   SCSI disk support           
  │ │                  < >   SCSI tape support     
  │ │                  < >   SCSI OnStream SC-x0 tape support     
  │ │                  <*>   SCSI CDROM support         
  │ │                  [*]     Enable vendor-specific extensions (for SCSI CDROM) 
  │ │                  <*>   SCSI generic support   
  │ │                  ---   Some SCSI devices (e.g. CD jukebox) support multiple LUNs
  │ │                  [ ]   Probe all LUNs on each SCSI device 
  │ │                  [ ]   Verbose SCSI error reporting (kernel size +=12K)
  │ │                  [ ]   SCSI logging facility   
  │ │                        SCSI Transport Attributes  --->
 

ive now got
Code:
gravity linux # grep ^[A-Za-z0-9] .config |grep USB
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB=y
CONFIG_USB_DEBUG=y
CONFIG_USB_DEVICEFS=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_UHCI_HCD=y
CONFIG_USB_PRINTER=y
CONFIG_USB_STORAGE=y
CONFIG_USB_STORAGE_DEBUG=y
CONFIG_USB_HID=y
CONFIG_USB_HIDINPUT=y
CONFIG_USB_EGALAX=m
CONFIG_USB_MON=y
CONFIG_USB_CYTHERM=m
CONFIG_USB_PHIDGETSERVO=m
gravity linux # grep ^[A-Za-z0-9] .config |grep SCSI
CONFIG_SCSI=y
CONFIG_SCSI_PROC_FS=y
CONFIG_SCSI_DPT_I2O=m
CONFIG_SCSI_SATA=y
CONFIG_SCSI_ATA_PIIX=y
CONFIG_SCSI_SATA_SX4=m
CONFIG_SCSI_SATA_SIS=m
CONFIG_SCSI_IPR=m
CONFIG_SCSI_QLA2XXX=y
gravity linux #           


but
Code:

gravity usb # mount -t iso9660 /dev/sg0 /mnt/cdrom
mount: /dev/sg0 is not a block device
gravity usb #                         

but sr0 has appeared
Code:

gravity dev # mount -t iso9660 /dev/sr0 /mnt/cdrom
mount: block device /dev/sr0 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/sr0,
       or too many mounted file systems
gravity dev # mount -t auto  /dev/sr0 /mnt/cdrom
mount: block device /dev/sr0 is write-protected, mounting read-only
mount: /dev/sr0: can't read superblock
gravity dev #                     


a bit nearer but not there yet
_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Sat Oct 01, 2005 9:35 am    Post subject: Reply with quote

still struggling to get this working
Ive emerged kaffeine.
When I plug in my drive a dekstop icon for CDRecorder appears and it tries to mount media:/sr1

and then I get
Quote:
mount block device /dev/sr1 is write-protected, mounting read-only

mount :/dev/sr1:cant read superblock

with an audio CD in the drive

and a with a dvd and mplayer
Quote:
Couldnt open DVD device :/dev/dvd




[code]gravity dev # ls -la |grep dvd
lrwxrwxrwx 1 root root 3 Oct 1 10:21 dvd1 -> sr1
gravity dev #
_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
dsd
Developer
Developer


Joined: 30 Mar 2003
Posts: 2162
Location: nr London

PostPosted: Sat Oct 01, 2005 10:27 am    Post subject: Reply with quote

you cant mount audio cd's
_________________
http://dev.gentoo.org/~dsd
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Sat Oct 01, 2005 3:14 pm    Post subject: Reply with quote

updating udev has solved the DVD/CDROM problem. DVDs are now recognised and play and CDROMS are recognised from kaffeine.

The only problem is that sound doesnt work anymore

follow a thread with this in if i cant easilyfind an answer
Quote:
gravity .ssh # /etc/init.d/alsasound restart
* Loading ALSA modules ...
* Restoring Mixer Levels ...
/usr/sbin/alsactl: set_control:894: warning: name mismatch (Master Playback Switch/Master Playback Volume) for control
/usr/sbin/alsactl: set_control:896: warning: index mismatch (0/0) for control #1
/usr/sbin/alsactl: set_control:898: failed to obtain info for control #1 (Operation not permitted)
[/post]
_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
dsd
Developer
Developer


Joined: 30 Mar 2003
Posts: 2162
Location: nr London

PostPosted: Sun Oct 02, 2005 2:17 pm    Post subject: Reply with quote

use alsamixer to set the sound levels again
_________________
http://dev.gentoo.org/~dsd
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum