3

I'm using a udev rule on Ubuntu Xenial to automate some disc processing. Now I have a bunch of folders containing the plain files of optical discs, so there is no .iso available. To prevent expensive extending of processing script to handle these plain folders, I thought the best idea would be to simulate a disc with file system type udf. Is there a way to mount these folders like an optical drive to let udev handle the rest (so that udevadm info returns meta data like for a real optical device)?

closed as unclear what you're asking by Gilles, Archemar, countermode, Kusalananda, roaima Jan 12 '17 at 19:01

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • not sure what you mean by 'expensive extending'. If you mean coding to handle folders - how about using an existing program to create .iso (in iso9660 or udf format) file and then mounting that. If you mean 'repackaging as an .iso file' - please ignore this comment :) – Michael Felt Jan 12 '17 at 12:20
  • Are you talking about something like cdemu (cdemu.sourceforge.net) ? Though I don't know if/how it lets you link in a plain directory tree – Ralph Rönnquist Jan 12 '17 at 13:45
  • What do you mean by “mount folders like an optical drive”? Mounting makes a disk or disk image appear as a directory. So masquerading a directory as a disk image to make it appear as a directory achieves… what? Why don't you point your scripts to this directory? Udev is only involved to handle hardware, not to do any mounting, it's irrelevant to disk images. What are you actually trying to do? – Gilles Jan 12 '17 at 13:53
  • You all pointed me in the right direction. What I want is to emulate an optical drive that behaves like a real drive. But the challenge is to not use an .iso but an existing folder instead. @RalphRönnquist I'll give this a try and give feedback (could take a while) @Gilles The script I'm using expects a real drive in /dev/srX so pointing to directory does not work (have already tried this). – rabudde Jan 12 '17 at 14:24

Browse other questions tagged or ask your own question.