I have a HDSPA USB stick from Vodafone for mobile broadband, a HUAWEI model K3520 (in some places also designated E169 I think) which works just fine in Ubuntu 10.04 "Lucid" (amd64). This device is automatically mounted as a CD-ROM device by Ubuntu -- supposedly by the HAL daemon, hald -- namely the "partition" containing the device-specific software.
The contents of the auto-mounted partition (upon inserting the stick in a USB port):
ubuntu@lucid:~$ ls -lh /media/VMC\ LITE*/
total 37M
-r-------- 1 ubuntu ubuntu 70 2008-03-13 19:39 Autorun.inf
-r-------- 1 ubuntu ubuntu 36M 2008-04-14 19:28 helper.exe
-r-------- 1 ubuntu ubuntu 316K 2008-03-13 17:33 setup.exe
ubuntu@lucid:~$
The symlink /dev/cdrom
gets assigned from the CD-ROM device at /dev/sr0
to the device /dev/sr1
upon detection of the USB stick,
ubuntu@lucid:~$ ls -lh /dev/cdrom
lrwxrwxrwx 1 root root 3 2011-04-27 22:48 /dev/cdrom -> sr1
ubuntu@lucid:~$ ls -lh /dev/sr*
brw-rw----+ 1 root cdrom 11, 0 2011-04-27 22:34 /dev/sr0
brw-rw----+ 1 root cdrom 11, 1 2011-04-27 22:48 /dev/sr1
ubuntu@lucid:~$
which although not a serious impediment it is nevertheless an annoyance. For example, in the console this forces specifying eject -d /dev/sr0
to open the CD-ROM tray, instead of a simple eject
; supposedly, other programs wanting to use the genuine CD-ROM drive will require specifying explicitly the device instead of "assuming" the symlink /dev/cdrom
to point to the "correct" device.
I have tried to follow instructions from a Arch Linux thread about hald, by creating my own configuration as /etc/hal/fdi/policy/cdrom.fdi
with the following contents:
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
<match key="block.storage_device" string="/org/freedesktop/Hal/devices/storage_model_CDDVDW_SH_S223C">
<merge key="volume.policy.should_mount" type="bool">true</merge>
<merge key="volume.policy.desired_mount_point" type="string">cdrom</merge>
</match>
</device>
<device>
<match key="storage.vendor" string="HUAWEI">
<match key="storage.model" string="Mass Storage">
<match key="storage.bus" string="usb">
<match key="storage.drive_type" string="cdrom">
<merge key="volume.policy.should_mount" type="bool">false</merge>
</match>
</match>
</match>
</match>
</device>
</deviceinfo>
in an unsuccesful attempt to "coherce" hald into always assigning /dev/sr0
to /dev/cdrom
instead of auto-mounting the USB stick on insertion.
I realize that I could use gconf-editor
to toggle the key /apps/nautilus/preferences/media_automount
, but that would affect all media -- which is not quite what I'm looking for, although given the low impact of this "annoyance" it might be an acceptable compromise.
However, I am looking at some insight into what hald configuration might yield the desired results -- ignoring assigning /dev/sr1
(the USB stick) to /dev/cdrom
and thereby maintaining the symlink of /dev/cdrom
to /dev/sr0
(the CD-ROM drive).