LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 12-12-2010, 04:17 PM   #1
tokarigo
LQ Newbie
 
Registered: Dec 2010
Posts: 2

Rep: Reputation: 0
Hotplug in 2.6.24.4 (WD MBWE): CD DVD writer not automatically mounted


Hi all,

I was playing around with WD MyBook WorldEdition (Whitelight, 2gb) to make it recognise a CD/DVD burner plugged into USB socket, and finally made it work (see http://mybookworld.wikidot.com/cd-dvd-rom-on-mbwe ). However, I can only now mount the burner manually as a sr0/sr1/etc device, and for whatever reason the hotplug would not mount it automatically.

The CD/DVD writer is ASUS SDRW-08D1S-U.

I am very new to Linux and not quite sure how hotplugging works in 2.6.24.4 and especially on the "slim" version supplied on MBWE. There are several scripts in /etc/hotplug, eg "scsi.agent" and "usb.agent", and also "usb.usermap" (which was originally empty). Before any manipulations with hotplug files, the system produced something like the following in /var/log/messages:

user.notice [22547]: ... no modules for USB Initio SDRW-08D1S-U


"Initio" seems to be the name of USB-to-SCSI bridge built in the CD ROM.

So I created usb.usermap in /../hotplug from "modules.usbmap" (in /lib/modules/....) and then added a line at the very top of usb.usermap for this "Initio" device as it did not seem to be supported (idVendor and other info taken from /sys/bus../)

As to the first word in this new "usb.usermap" line I used "usb-storage" (driver name) as all other devices seem to use the same (in fact, I later tried to change this to other driver names (usbtest, cdrom, sr_mod) but that did not help).

So now when I plug in my USB CD ROM, /var/log/messages confirm that usb-storage (or other tested drivers) has been setup, but no mounting happens in the end.

When I plug a USB-flash or USB-external-HDD, hotplugging seems to do a similar job (/var/log/messages shows "usb-storage" is setup for the relevant hardware), except that there is additional line from WixEvent:

Dec 12 00:12:00 WD daemon.info wixEvent[5033]: USB Status - USB device inserted.
Dec 12 00:12:02 WD user.notice usb.agent[18887]: Setup usb-storage for USB JetFlash Mass Storage Device
Dec 12 00:12:03 WD user.notice usb.agent[18904]: Setup usb-storage usb-storage for USB product 58f/6387/141
Dec 12 00:12:21 WD user.notice usb.agent[18887]: Setup usb-storage for USB JetFlash Mass Storage Device
Dec 12 00:12:23 WD user.notice usb.agent[18904]: Setup usb-storage usb-storage for USB product 58f/6387/141


A USB-flash is then automatically mounted within /shares/xxx, and also becomes available publicly.

So the question is: does anyone now how these hotplug scripts are invoked/ what am I missing to get the CD/DVD burner to be mounted/shared by hotplugging? Does it have something to do with the fact that CD/DVD burner is in fact a SCSI device, not a USB device? How does the system treat it them - as "usb-storage" or as a scsi drive?

Any help will be appreciated.
 
Old 12-13-2010, 12:35 PM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,214

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
From what you have posted, I think hot plugging is working. What is not working is automount. Automount is a separate package you need to install and configure. Here is a link to get you going in the correct direction.

http://tldp.org/HOWTO/Automount.html

On Mandriva the package is called autofs. It is not installed by default. Have a look at your package manager, and see if you can find that package and install it. Hot plugging is very complex, and I'm by no means an expert at it. It involves Hal, and Udev. Use Wikipedia to find out what each of these is about. Hot plugging is intended to detect new hardware you can plug under power; not media.

Hope this helps.
 
Old 12-13-2010, 03:27 PM   #3
tokarigo
LQ Newbie
 
Registered: Dec 2010
Posts: 2

Original Poster
Rep: Reputation: 0
automount?

Cliff, thanks. Interesting thought, I will try - although I don't think autofs is the way it is currently implemented in the WD MBWE standard kernel/hotplug scripts - and yet it manages to mount flashdrives and external hdds to a standard mount folder... Shoudl there be a "root script" somewhere which launches usb.agent, scsi.agent etc depending on whatever kernel identfies at hotplug event? I checked /sbin/hotplug that that one seems to be a very simple script which does not actually do much..

igor
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hotplug of external hard drive to USB 2.0 port affecting other mounted devices timonlq Linux - Hardware 2 08-17-2009 12:25 PM
DVD writer device is not mounted in RHEL 5.0 janakjjoshi Linux - Enterprise 4 11-01-2008 12:34 AM
Hotplug NICs don't get nameserver information automatically from dhcpcd tisource Linux - Networking 4 08-15-2005 03:20 PM
Burning ISO image (DVD+R, external DVD writer) swan2925 Linux - Software 6 06-02-2005 09:49 AM
Cannot find DVD writer or get CD-writer to spin audio disk dgwebb Linux - Hardware 5 03-28-2005 05:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 03:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration