External DVD-RW (ASUS)
Hi all.
I plugged in my external dvd-r (asus) via usb. It showed me some message on shell, that it has detected the cdrom(although its dvd rom as well but nevermind) and its of ASUS. But how do i know which dev it was associated with in /dev/ ? Since i had to test something, i plugged it out, and save the output of ls /dev/ > ~/result.txt after plugging the dvd-rom, i compared the results and was able to find that it was associated with simple cdrom i.e. /dev/cdrom. I wanted to know that is there any command that will tell me which /dev/ file was associated with external dvdrom ? i tried to see in the following result 1) df -h ( no results, just the already mounted partitions) 2) fdisk -l ( same as above) 3) dmesg | tail (shown almost the same result as was shown on shell at the time of plugging the dvd) Kindly let me know how to solve it |
I don't have my External DVDRW Liteon plugged into my Asus EEEPC right now. On Antix (I don't know what distro you are running) I would look in /media for it.
|
Dear Sir,
I am running RHEL 5 for now. this is the following result [root@WAN-Admin ~]# dmesg | tail usb 2-1: configuration #1 chosen from 1 choice scsi12 : SCSI emulation for USB Mass Storage devices usb-storage: device found at 13 usb-storage: waiting for device to settle before scanning Vendor: ASUS Model: SDRW-08D1S-U Rev: A202 Type: CD-ROM ANSI SCSI revision: 00 sr0: scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray sr 12:0:0:0: Attached scsi CD-ROM sr0 sr 12:0:0:0: Attached scsi generic sg1 type 5 usb-storage: device scan complete [root@WAN-Admin ~]# [root@WAN-Admin ~]# ls /media/ total 0 [root@WAN-Admin ~]# I just want to get a general idea, what is the better approach (linux command :-)) to see which /dev file was associated with the plugging hardware. Kindly guide me |
noony, I am not a rpm distro proficient user. I run apt distros.
So I am not too sure how file system is set in Rhel, Fedora, Open Suse, or Mandriva. If /dev/cdrom0, or /dev/cdrom1 does not work for you. Another place I would look into is /mnt. Sorry I can't be of much help. |
Quote:
Quote:
|
Dear Sir,
it didnt mapped to sr0 :-(. Kindly confirm my findings below [root@WAN-Admin ~]# dmesg | tail usb-storage: device found at 2 usb-storage: waiting for device to settle before scanning usbcore: registered new driver usb-storage USB Mass Storage support registered. Vendor: ASUS Model: SDRW-08D1S-U Rev: A202 Type: CD-ROM ANSI SCSI revision: 00 scsi 1:0:0:0: Attached scsi generic sg1 type 5 usb-storage: device scan complete sr0: scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray sr 1:0:0:0: Attached scsi CD-ROM sr0 [root@WAN-Admin ~]# ls /dev/disk/by-id/ total 0 lrwxrwxrwx 1 root root 9 Dec 12 17:59 ata-VMware_Virtual_IDE_CDROM_Drive_00000000000000000001 -> ../../hda lrwxrwxrwx 1 root root 10 Dec 12 18:06 usb-Initio_SDRW-08D1S-U_00101016400000005 -> ../../scd0 [root@WAN-Admin ~]# mount /dev/scd0 /mnt/cdrom mount: block device /dev/scd0 is write-protected, mounting read-only [root@WAN-Admin ~]# ls /mnt/cdrom/ total 1.7M -r-xr-xr-x 1 root root 110 Aug 23 2001 AUTORUN.INF dr-xr-xr-x 1 root root 2.0K Aug 8 2004 DOCS dr-xr-xr-x 1 root root 2.0K Aug 8 2004 ETH0 dr-xr-xr-x 1 root root 2.0K Jan 1 2001 Extra dr-xr-xr-x 1 root root 314K Aug 8 2004 I386 -r-xr-xr-x 1 root root 34K Jul 18 2004 README.HTM -r-xr-xr-x 1 root root 1.3M Aug 4 2004 SETUP.EXE -r-xr-xr-x 1 root root 84K Jul 17 2004 setupxp.htm dr-xr-xr-x 1 root root 2.0K Aug 8 2004 SUPPORT dr-xr-xr-x 1 root root 2.0K Aug 8 2004 VALUEADD -r-xr-xr-x 1 root root 10 Aug 23 2001 WIN51 -r-xr-xr-x 1 root root 10 Aug 23 2001 WIN51IP -r-xr-xr-x 1 root root 2 Aug 4 2004 win51ip.SP2 [root@WAN-Admin ~]# I tried plugging my normal kingston usb, and it also showed up correctly under /dev/disk/by-id/ Dont you guys think i got it :-) I am right in my conclusion ? that if we want to know which /dev/ file is associated with which hardware, we better check in /dev/disk/by-id. |
Are you sure scd0 isn't a symlink to sr0? In addition, you really should write udev rules to give your devices meaningful names, so that you always know what they're called. See, e.g. this about writing udev rules. The info there may be somewhat out of date, but it should get you started.
|
Dear Sir,
I just checked what you said. But scd0 is a regular file and not a symlink. But thanks alot for pointing me in directed of udev rules, i really need this sort of guidance. Thanks alot to all you guys, let me tell you honestly. At first i thought linux to be a nightmare to learn, but when i see you generous guys(and girls) who are taking out time to help newbie like us, i just have one word to say Thanks and pls continue guiding us. |
No problem. Also, "alot" should be two words (see the link in my signature).
|
I don't have a hot pluggable CD/DVD drive so cannot experiment but the udevadm monitor command might be useful (it could be obscure and excessively verbose).
|
All times are GMT -5. The time now is 05:43 PM. |