Single point cdrom mount?

Hi! :nerd:

I can see, that openSUSE mounts cdroms (at /media) according to cd label (eg. /media/data_dvd_x).
My problem is, that several applications (eg. a cd cataloguer) expecting to find the cd at /media/cdrom0, or something similar. :open_mouth:
Is it possible to fix it? (Tell openSUSE to mount cds at a single point)? :confused:

THANKS!!! :wink:

Elf Wizard wrote:

Dunno why I see your message in capital letters :-?

> I CAN SEE, THAT OPENSUSE MOUNTS CDROMS (AT /MEDIA) ACCORDING TO CD
> LABEL (EG. /MEDIA/DATA_DVD_X).
> MY PROBLEM IS, THAT SEVERAL APPLICATIONS (EG. A CD CATALOGUER)
> EXPECTING TO FIND THE CD AT /MEDIA/CDROM0, OR SOMETHING SIMILAR. :open_mouth:
> IS IT POSSIBLE TO FIX IT? (TELL OPENSUSE TO MOUNT CDS AT A SINGLE
> POINT)? :confused:

I can see 2 different approaches to this:

  1. Configuring your apps (i.e. cd cataloguer) to point the right media path
  2. Setting up a static mount point for cd media devices

I’d say the first option is the best way as nowadays any kind of devices
tend to follow that same rule of “dynamic mount points”, even hard disks
are mounted by “label” o by “ID”.

Anyway, there is a wiki article to get the second path. It’s a bit outdated,
so not sure if is still valid for newer versions:

SDB:Mounting to Static Mount Points
http://en.opensuse.org/SDB:Mounting_to_Static_Mount_Points

Greetings,


Camaleón

THANKS Camaleón for your help!!! :good:

:open_mouth:
Strange!

I don’t know! It appears normally lowercased here!

Sigh!
I didn’t found any active developing catalogers with such an option.
I’ll try again!

I tried (with cdrom, cdrom0, scd and scd0) but didn’t worked! :messed:
Either it doesn’t apply to v.11.1 or I messed something.

Here is my mountpoints.fdi:

<?xml version=“1.0” encoding=“ISO-8859-1”?>
<deviceinfo version=“0.2”>
<device>
<!-- optical drives →
<match key=“block.device” string="/dev/cdrom">
<match key=“volume.is_disc” bool=“true”>
<merge key=“volume.policy.should_mount” type=“bool”>true</merge>
<merge key=“volume.policy.desired_mount_point” type=“string”>cdrom</merge>
</match>
</match>
</device>
</deviceinfo>

**
THANKS again** Camaleón for your help!!! :wink:

Perhaps because you wrote your first post in some “fancy” non-standard font instead of using
the forum’s default stuff and the NNTP-reader reformatted it to upper case.

Ooops! My fault!
SORRY!!! :slight_smile:


su -c "mkdir /media/cdrom0"

and add

/dev/cdrom     /media/cdrom0   auto    noauto,user,ro,unhide  0 0

to your /etc/fstab.

This is

a) not very elegant

b) not recommended (if it causes trouble with autmount, don’t blame me)

but it will probably work (at least it does here™ with mount and pmount, I don’t use the KDE-automounter).

Elf Wizard wrote:

> :open_mouth:
> Strange!

> I don’t know! It appears normally lowercased here!

No problem :stuck_out_tongue:

I am using nntp newsreader, your message reads ok in the web forums page.

> I didn’t found any active developing catalogers with such an option.
> I’ll try again!

Oh, well… it should be configurable, in a way or another :-?

> I tried (with cdrom, cdrom0, scd and scd0) but didn’t worked! :messed:
> Either it doesn’t apply to v.11.1 or I messed something.
>
> Here is my mountpoints.fdi:

>> <match key=“block.device” string="/dev/cdrom">

Mmm, not sure, but I guess that should read “/dev/sr0” which is the original
path to the dvd media. Look (I’m on opensuse 10.3):


stthpc:~ # cat /var/log/boot.msg | grep sr0
<4>sr0: scsi3-mmc drive: 48x/48x writer dvd-ram cd/rw xa/form2 cdda tray
<7>sr 5:0:0:0: Attached scsi CD-ROM sr0


And then you have to restart hal (“rchal restart”). Not sure if this still
is valid for 11.1, though :-?

Greetings,


Camaleón

Indeed!!! That solved the problem!!!

giorgos@linux-mrz5:~> cat /var/log/boot.msg | grep sr0
<4>sr0: scsi3-mmc drive: 48x/48x writer dvd-ram cd/rw xa/form2 cdda tray
<7>sr 3:0:0:0: Attached scsi CD-ROM sr0

It was my fault! Seems like I’m not yet, really familiar with linux syntax! :embarrassed:
The wiki page is still valid for v11.1.

MANY MANY THANKS Camaleón and Akoellh for your help!!! :good:

Hi,

I’m running openSUSE 10.2. I’ve tried to mount my CDROM to a static moint point, using the wiki page SDB:Mounting to Static Mount Points - openSUSE. I’ve had no success thus far. I followed every step very carefully.

cat /usr/share/hal/fdi/policy/20thirdparty/95-static-mount.fdi outputs:
<?xml version=“1.0” encoding=“ISO-8859-1”?>
<deviceinfo version=“0.2”>
<device>
<!-- optical drives →
<match key=“block.device” string="/dev/sr1">
<match key=“volume.is_disc” bool=“true”>
<merge key=“volume.policy.should_mount” type=“bool”>true</merge>
<merge key=“volume.policy.desired_mount_point” type=“string”>cd</merge>
</match>
</match>
</device>
</deviceinfo>

I have 2 optical drives: sr0 and sr1, and want sr1 to be mounted to a static point.

ls /media/cd ouputs non existing directory.

Can someone help me out? I’m really stuck. Thanks in advance!

Sorry, make that openSUSE 11.2! Not 10.2.

On Thu, 01 Jul 2010 19:06:02 GMT, cstadegaart
<cstadegaart@no-mx.forums.opensuse.org> wrote:

>
>Sorry, make that openSUSE 11.2! Not 10.2.

Try modifying the existing rule sets in /etc/udev/rules.d

I have a write up on how the optical drive names are assigned which might also be useful to read located in the thread:

Multimedia Optical Drive Naming (ie /dev/dvd & /dev/cdrom) Howto in opneSUSE

Thank You,

Thanks for the replies, but unfortunately this doesn’t answer my question.

Simply put I want to use a fdi file to tell HAL to also mount a cdrom as a static mount point besides the dynamic mount point /media/<volume name>.

I’m trying to use my Linux distribution as a quite simple desktop operating system, but if new destributions become as layered as Windows, I cannot see the use of using Linux as my desktop operating system. The whole idea behind the automount system controlled by HAL is to prevent the (manual) use of fstab. It seems like I have to disable the automounting feature of my cdrom and manually add the fstab entry for my cdrom. From this point of view, Mac and Windows at least implement the controversy of layer on layer on layer well. In Windows, simply type cd d:/ and voila.

This shouldn’t be so complicated. Please, does someone have a fdi file to mount a cdrom to a static mount point besides the volume automount? Why does nobody update SDB:Mounting to Static Mount Points - openSUSE

I guess cstadegaart, I don’t understand the problem you state.

Simply put I want to use a fdi file to tell HAL to also mount a cdrom as a static mount point besides the dynamic mount point /media/<volume name>.
Since, device names like /dev/cdrom and /dev/dvd are in fact static. Further, you can determine all the names for any drive by using the terminal command:

/usr/sbin/hwinfo --cdrom

Check it out. Otherwise, I don’t see the problem here.

Thank You,

These are not mount points, just pointers to the device file. The file system of a cdrom gets mounted as /media/<volume>. Applications which cannot access the device itself, only the mounted file system, will never be able to access the cdrom content unless /media/<volume> is accessed (and not mounted while HAL daemon was already running). But discs (in my experience) rarely have the same volume name, so a static point is preferable. Besides that, every time you remove a disk and insert a new disk, you’ll have to restart the HAL daemon in order to mount the new volume name. Again in tha latter case, a static mount point is preferable.

cstadegaart, you must help me understand the problem that you are seeing with the device naming in Linux. Since I can enter static device names such as /dev/dvd into say xine’s or mplayer’s setup or tell KDE that the default cdrom is called /dev/cdrom, I can access these drives without a problem and I don’t need to know the disk label. Further, some programs can read a cdrom no matter its designation such as Banshee, which is a feature within the application its self.

Since disk labels are surely mostly different, there is no standard method I know of to point there for all disks, when you could have more than one optical drive installed. If you remember, Windows uses fixed drive letters, which have the same basic problem as /dev/dvd. Many Windows programs require you to specify a default DVD drive or may assign one on its own. Those Windows programs that don’t are scanning all installed drives.

In any event, due to how device names work in Linux, what problem does this cause that you can not over come? Please give examples as to how this is a problem to standard Linux applications. Now, don’t get me wrong, I am not suggesting that device naming could not somehow be better, but it almost surely up to the application on how it will deal with the resources that are presented to it in Linux. Also, since I do not claim to know all about Linux, I must apologize up front if I have missed something obvious here, which has been known to happen.

Thank You,

On Mon, 05 Jul 2010 22:16:02 GMT, cstadegaart
<cstadegaart@no-mx.forums.opensuse.org> wrote:

>
>Thanks for the replies, but unfortunately this doesn’t answer my
>question.
>
>Simply put I want to use a fdi file to tell HAL to also mount a cdrom
>as a static mount point besides the dynamic mount point /media/<volume
>name>.
>
>I’m trying to use my Linux distribution as a quite simple desktop
>operating system, but if new destributions become as layered as Windows,
>I cannot see the use of using Linux as my -desktop- operating system.
>The whole idea behind the automount system controlled by HAL is to
>prevent the (manual) use of fstab. It seems like I have to disable the
>automounting feature of my cdrom and manually add the fstab entry for my
>cdrom. From this point of view, Mac and Windows at least implement the
>controversy of layer on layer on layer well. In Windows, simply type cd
>d:/ and voila.
>
>This shouldn’t be so complicated. Please, does someone have a fdi file
>to mount a cdrom to a static mount point besides the volume automount?
>Why does nobody update ‘SDB:Mounting to Static Mount Points - openSUSE’
>(http://en.opensuse.org/SDB:Mounting_to_Static_Mount_Points?)

I offered something i thought might be useful, you blew it off. Your
choice. I find it quite impolite to continue requesting assistance if
you blow off the suggestions you get.

JosephKK, I’m very sad to read that’s you’re taking my response so personal. Maybe you should ask yourself why it gets to you. I did not blow your solution off. To be more exact, I did look into the existing rules set. But these rules do not offer me a direct solution, probably because I do not know how to change or interpret them.

jdmcdaniel3, I think I know what you’re trying to tell me. Indeed, my problem is not what you think :(. KDE applications access the the device without problems. But when a program doesn’t use KDE to access the cdrom, it depends on a mounted file system.

Step by step to illustrate my problem. In this case I’ll use a cdrom with volume name “Backup 5-3-2010”

  1. I insert the disk and get a popup in KDE with “recent connected devices: OpticalDisc Backup 5-3-2010”
  2. I open up a terminal session in Konsole.
  3. ls -la /media outputs:
drwxr-xr-x  2 root root 4096 jul  6 18:42 .
drwxr-xr-x 23 root root 4096 jul  6 17:52 ..
-rw-r--r--  1 root root    0 jul  6 18:42 .hal-mtab
-rw-------  1 root root    0 jul  6 18:22 .hal-mtab-lock
  1. I open up Dolphin and open the cdrom file listing without problems. I close the Dolphin window! Nothing in KDE is now accessing the cdrom.
  2. After once opening the disk it looks like HAL has restarted or HAL updated something, because in the same session which is already open in Konsole, I again type ls -la /media and the output is:
drwxr-xr-x  3 root  root       4096 jul  6 18:43 .
drwxr-xr-x 23 root  root       4096 jul  6 17:52 ..
dr-xr-xr-x  2 chris 4294967295  464 mrt  5 14:00 Backup 5-3-2010
-rw-r--r--  1 root  root         65 jul  6 18:43 .hal-mtab
-rw-------  1 root  root          0 jul  6 18:22 .hal-mtab-lock

Notice that .hal-mtab is updated?
6) But the device files, which are used in some way by KDE, cannot be used in Konsole:

chris@PC-Chris:~> ls -la /dev/cdrom1
lrwxrwxrwx 1 root root 3 jul  6 17:52 /dev/cdrom1 -> sr1
chris@PC-Chris:~> ls -la /dev/sr1
brw-rw----+ 1 root cdrom 11, 1 jul  6 17:52 /dev/sr1
chris@PC-Chris:~> cd /dev/sr1
bash: cd: /dev/sr1: Is geen map

What I want is to access the cdrom with a static mount point, for example /media/cdrom. The Wiki document states that it is possible to achieve this by making a FDI file. But this doesn’t work for me. And I don’t want to screw up the whole automounting system by disabling it and manually add an fstab entry for the cdrom. This is exactly not what I want to do! I want to have a static mount point for my cdrom but still use the updated HAL system integrated with KDE (hope I’m having the theory right!).

That’s it for now. Hopefully I am still welcome to ask for any help here :).

Thanks in advance.

Up until KDE 4.4, only manual mounting of CD/DVD’s was possible, although this is now user-configurable at the desktop level. Hal/udev are only responsible for media detection and naming, not the actual mounting.

If you’re wanting automounting without desktop involvement (runlevel 3 for example), and require hal detection and automounting, then ivman is the utility to use.

SDB:Automount CD/DVD with ivman - openSUSE

This Arch Wiki explains how to configure ivman a little further:

Ivman - ArchWiki

You may have to google for more advice concerning static cdrom mount-points, but it should be possible by configuring ivman’s IvmConfigActions.xml file or similar.

That’s it for now. Hopefully I am still welcome to ask for any help here :).
You are absolutely welcome to stay and ask questions here cstadegaart. Just remain polite and remember not everyone is having a good day.

As for the issues you have with drives, are the basics of just how Linux mounts everything to a single unified file system and so I don’t have a better answer beyond the examples and information already provided here. All drives have to get mounted some how, or they can’t be accessed. I surely don’t know just what KDE or openSUSE is doing for sure in the background, but it is OK to hope for better and you are not crazy for doing so. I might say that one still must deal with the way the system works now while constantly looking for other/better solutions. There are a lot of very smart people that use and write Linux applications and code, perhaps you will find a solution in the future.

Good luck and I hope you find what you are looking for.

Thank You,