mounting cue-bin paired images
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 7 of 7
  1. #1
    Join Date
    May 2008
    Location
    Giza, Egypt
    Age
    38
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Arrow mounting cue-bin paired images

    Introduction
    It all started when I wanted to mount a cut-bin image under fedora. Fine I did some googling(too little actually). I passed through some workarounds to convert the cue-bin image to an iso then natively mount it with the mount command, however I wasn't totally satisfied with that workaround. Besides the convertion has some subtle tips for the different offsets and sector sizes between different image formats, so I didn't get comfortable with these workarounds. I was particularly interested in something like daemon tools under windows, if you know what I mean.
    Soon I got to the clear and neat solution, CDEmu. Fine, in short, CDEmu just does the same thing daemon tools(and some other programs like alcohol, virtual CD, ...etc,) do under windows; it provides virtual CD-ROM(or DVD-ROM) drives so that the user may mount images onto these drives and treat them normally like any real CD-ROM drive. CDEmu has an interesting site at http://cdemu.sourceforge.net/, which talks about itself pretty enough.
    Now for the serious staff, we want to install that cute package under fedora. Fine, just as a start, none of the CDEmu packages is available in fedora repositories for the moment, so there's no simple "yum install ..." method, although some other distributions have ported these packages to their packaging systems.
    OK. Before you continue, make sure that you've the RPM build environment properly configured on your system. There're several places where you may get instructions for such a job; I explained it as part of a previous HOW-TO at http://www.fedoraforum.org/forum/sho...d.php?t=193564.
    I also use sudo for commands that need to be executed as root. If you don't have sudo configured on your system for administrative tasks, try running the commands needing root privileges from a root shell. You may use su to start a root shell and run these commands.
    You'll find several designations of x86_64 through this tutorial, as that was my system I tried CDEmu on. Please replace any occurrence of x86_64 with your architecture.
    1. Now that you're acquainted with the fact that there're no ready-made packages for CDEmu, it won't be a surprise to ask you to download the CDEmu packages at http://sourceforge.net/project/showf...ease_id=610390.
    You'll notice that these packages are listed under "Packages - Fedora", but you should note also that they're all source packages. As you'll find shortly, getting binary packages from these source packages isn't just a breeze.
    Note that unless you're running GNome and wish to have the system tray icon for CDEmu, you don't need to download the gcdemu package.
    2. Install the source packages you've downloaded.
    Code:
    rpm -ivh <list of downloaded source packages>
    Note: No root privileges here, install as a normal user.
    3. Install necessary development packages.
    On my system, I needed to install dbus-python-devel, libsndfile-devel, libao-devel, and libsysfs-devel using
    Code:
    sudo yum install dbus-python-devel libsndfile-devel libao-devel libsysfs-devel
    You may need more or less packages on your system, depending on what the currently installed development packages on your system are. If you don't know what you need exactly, don't panic; you'll be introduced with the necessary packages as you try to build the binary packages later.
    The good news here is that after you complete this HOW-TO, you may safely uninstall these development packages since they would be no longer needed. They're just needed for building the binary CDEmu packages.
    Note that if you're going to use the system tray icon for gnome, you'll also need to install gnome-python2-devel.
    4. Build the binary packages.
    This's a multi-stage step; here're the details:
    1. Go the directory ~/rpmbuild/SPECS/
      Code:
      cd ~/rpmbuild/SPECS/
    2. Build the binary packages cdemu-client, dkms-vhba, and libmirage.
      Code:
      rpmbuild --clean --rmsource --rmspec -bb cdemu-client.spec dkms-vhba.spec libmirage.spec
      If you get any dependency complaints here, simply install the requested packages via yum. All requested packages should be resolvable by yum from fedora repositories.
      Don't try to build the remaining packages now; if you do, you'll get dependency complaints that you'll never be able to solve at this stage(; I've tried it myself ).
    3. Go the directory ~/rpmbuild/RPMS/x86_64/
      Code:
      cd ../RPMS/x86_64/
    4. Install the resulting libmirage packages, namely libmirage and libmirage-devel.
      Code:
      sudo yum --nogpgcheck localinstall <libmirage package file> <libmirage-devel package file>
    5. Get back to the directory ~/rpmbuild/SPECS/
      Code:
      cd ../../SPECS/
    6. Build the binary package cdemu-daemon.
      Code:
      rpmbuild --clean --rmsource --rmspec -bb cdemu-daemon.spec
      Once again if you get any complaints about missing dependencies, simply install them with yum from fedora repositories.
      Optional: If you've planned to, you may also build the binary package for gcdemu, by appending its spec file gcdemu.spec to the previous command.
    5. Install the binary packages.
    Now, the moment you've been waiting for, install the CDEmu binary packages. The binary packages come into two categories, those which are dependent on your architecture, and those that are architecture-dependent.
    1. Go the directory ~/rpmbuild/RPMS/x86_64/
      Code:
      cd ../RPMS/x86_64/
    2. Install the binary packages cdemu-daemon, cdemu-daemon-sysv, cdemu-client, and dkms-vhba.
      Code:
      sudo yum --nogpgcheck localinstall <cdemu-daemon package file> <cdemu-daemon-sysv package file> ../noarch/*.rpm
      assuming there're no packages in ~/rpmbuild/RPMS/noarch/ but the ones we've built for CDEmu. cdemu-daemon-sysv is a package, developed by our dear CDEmu developers, to provide a service for sysV systems, like fedora and many other linux distros.
    5. Remove the development packages.
    You can now uninstall the development packages you've installed earlier with
    Code:
    sudo yum erase <development packages>
    They're no longer needed.
    That's all. You should now be able to mount cue-bin images(and actually some other formats, all stated at CDEmu site).
    FAQ

    Q: How may I get the status of my virtual drives?
    A: cdemu status
    Q: I've noticed that there's only one virtual drive created by CDEmu, what if I need more than one virtual drive?
    A: Open the file /etc/sysconfig/cdemu-daemon in your favourite daemon and edit the line reading
    Code:
    DEVICES=1
    to be
    Code:
    DEVICES=n
    where n is the number of virtual drives you want.
    Q: How may I mount and unmount an image?
    A: For mounting, use cdemu load <drive number> <image file>
    For unmounting, use cdemu unload <drive number>

    Note: If you're mounting a cue-bin image, always make sure to mount the cue file, not the bin one.
    Q: Can I use gcdemu to display the system tray icon for CDEmu if I am using something else other than GNome?
    A: From my own experience, no. I was using KDE and tried to get the system tray icon running in my KDE system tray, but it didn't load.
    Last edited by MSK61; 17th March 2014 at 07:51 AM. Reason: clarifying FAQ

  2. #2
    desowin Guest
    Quote Originally Posted by MSK61
    Q: Can I use gcdemu to display the system tray icon for CDEmu if I am using something else other than GNome?
    A: From my own experience, no. I was using KDE and tried to get the system tray icon running in my KDE system tray, but it didn't load.
    You can use cdemu-tray if you're not using GNOME

  3. #3
    Join Date
    May 2008
    Location
    Giza, Egypt
    Age
    38
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, desowin. Your proposal really works under KDE, but this solution wasn't available at the time I wrote this HOW-TO.
    Anyway, a good addition from you to this HOW-TO.

  4. #4
    Join Date
    May 2008
    Location
    Giza, Egypt
    Age
    38
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Today I also ran into that
    http://linux.softpedia.com/get/Utili...er-45516.shtml
    which is a KDE front-end for CDEmu. I've good expectations regarding this(although I haven't tested it yet).

  5. #5
    Join Date
    Oct 2004
    Location
    London, UK
    Posts
    4,995
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can also mount cue/bin images and many others using AcetoneISO2 which is in the repositories

    Code:
    yum install AcetoneISO2

  6. #6
    Join Date
    Aug 2010
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: mounting cue-bin paired images

    Hi. I've been trying to get my head around the way Fedora builds packages - as opposed to say Ubuntu, where it's the usual './configure, make, make install' - and found this excellent tutorial a great place to start. That and of course, CDEMU does not appear to exist for Fedora 13!

    Anyway, after much struggling to satisfy dependency issues throughout the build process, I finally managed it. Or so I thought. On rebooting, 'Boot messages' informs me first that the "Running DKMS auto installation service for kernel 2.6.33.6-147.2.4.fc13.i686" process fails, followed by another failure from "Starting CDEmu daemon: Inserting kernel module (vhba):". When building both these packages, I encountered a dependency issue where a fc13 packages was required, even though the newest repository package is fc12. I therefore googled the fc12 version, installed it successfully, after which the CDEMU build completed successfully. So it appears to me that the problem arises due to the latest CDEMU source packages require a fc13 dependency package but the latest repository package is fc12...

    So, has anyone actually built CDEMU successfully, or can anyone offer a suggestion?

    Attached is an archive of my successful (though not working for me) build...
    Attached Files Attached Files

  7. #7
    Join Date
    Sep 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How I compiled CDemu in fedora 13

    ______________________________

    EDIT: I've added info on how to run on session bus, something that I couldn't get to work until now.
    ______________________________

    I've tried this in fedora 13 64 bit, but it should also work for 32 bit. Everything installs to /usr/local, except gCDemu, which is installed to /usr.


    Compiling

    RUN EVERYTHING AS ROOT

    • libmirage

      Code:
      Dependencies: yum install glib2-devel libsndfile-devel zlib-devel
      Install: ./configure && make && make install
    • vhba

      Code:
      Install: ./configure && make && make install
    • cdemu-daemon

      Code:
      Dependencies: yum install dbus-devel dbus-glib-devel libao-devel libdaemon-devel
      
      Install: PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --sysconfdir=/etc && make && make install
      PKG_CONFIG_PATH=/usr/local/lib/pkgconfig tells it to look for libmirage libraries in /usr/local/lib, not /usr/lib. The --sysconfdir=/etc is necessary, because according to the README file:

      ...due to the way autotools are used, /etc gets
      prefixed and therefore config file ends up installed into ${prefix}/etc/. To
      avoid this, you should pass --sysconfdir=/etc to configure, regardless of the
      prefix you are passing to configure.


      If you didn't do this, you would get this error:


      Code:
      'cdemud: cdemud_daemon_initialize: failed to get name on system bus!
      Daemon initialization failed: Name request on D-BUS failed.'
      Now, issue these commands (extracted from http://debianforum.de/forum/viewtopic.php?f=34&t=102071)

      Code:
      cd /etc/ld.so.conf.d
      create file named usr-local-lib.conf (or whatever name you like) containing:
      Code:
      /usr/local/lib
      and finally, run
      Code:
      ldconfig
      These commands avoid this error:
      Code:
      "./cdemud: error while loading shared libraries: libmirage.so.3: cannot open shared object file: No such file or directory"
      NOTE: (my library is libmirage.so.3 instead of libmirage.so.2 because I'm using a newer version on CDemu). Some people suggested to add a symbolic link in /usr/bin pointing to /usr/local/lib/ligmirage.so.3. While that works, it's better to do what we've done here.

    • cdemu-client
      Code:
      Dependencies: yum install intltool pygtk2-devel
      
      Install: ./configure && make && make install
      Add the following to your ~/.bash_profile:

      Code:
      export PYTHONPATH=/usr/local/lib/python2.6/site-packages
      If you didn't do this, you would get another error:
      Code:
      [root@power-sylvia cdemu-client-1.1.0]# cdemu
      Traceback (most recent call last):
      File "/usr/local/bin/cdemu", line 23, in <module>
      import cdemu, cdemu.cdemu
      ImportError: No module named cdemu
    • gcdemu
      Code:
      Install: ./configure --prefix=/usr && make && make install
      The --prefix=/usr thing is because Gnome looks for its panel applets in /usr.
      Now, log out and log in
      Right click on menu, Add to panel... -> gCDEmu Applet (an applet for controlling cdemu devices). Right click on the gcdemu applet. If you check "Use system bus" gCDemu listens for cdemu-daemon on the system bus, otherwise, it listens on the session bus. In the next section "How to start CDemu at boot" there's more information about it.




    How to start CDemu at boot:


    • Load vhba module at boot
      Create a file named /etc/sysconfig/modules/vhba.modules containing:

      Code:
      modprobe vhba
      Now, you have to decide whether you want to run cdemu-daemon in system bus (daemonized) or session bus (executed as a regular command in a startup script). CDemu 1.3.0 recommends session bus because it's more secure.

      Procedure for system bus:


      • Add init script
        Create file /etc/rc.d/init.d/cdemud containing the file I've attached (remove the .txt extension)

      • Make the script start at every boot. There are several options:
        • Using Fedora/Red Hat's chkconfig (recommended for Fedora):
          Code:
          chkconfig --add cdemud
        • If you're not using Fedora, it would be a different command (e.g update-rc.d in Debian) and modify script startup # accordingly

        • Manually adding symbolic links to rcX.d. Add SXXcdemud and KXXcdemud symbolic links, where XX is any free number available, in my case I've used 41:

          Code:
          cd /etc/rc.d/init.d
          ln -s cdemud ../rc0.d/K41cdemud
          ln -s cdemud ../rc1.d/K41cdemud
          ln -s cdemud ../rc2.d/S41cdemud
          ln -s cdemud ../rc3.d/S41cdemud
          ln -s cdemud ../rc4.d/S41cdemud
          ln -s cdemud ../rc5.d/S41cdemud
          ln -s cdemud ../rc6.d/K41cdemud



      Procedure for (the recommended) session bus:


      • First, create a file named /etc/udev/rules.d/99-vhba.rules containig:
        Code:
        KERNEL=="vhba_ctl", MODE="0660", OWNER="root", GROUP="cdemud"
      • Add "cdemud" group. You can do it from Gnome's GUI or using command line:

        Code:
        # groupadd cdemud
        # usermod -a -G cdemud your_username
      • Finally, Add the following to your ~/.bash_profile:

        Code:
        /usr/local/bin/cdemud --bus=session &



    If gCDemu appears greyed out, check whether you're using system or session bus, then right click the gcdemu applet and check/unckeck "Use system bus" accordingly. If it's checked it'll use system bus, otherwise, it'll employ session bus.

    _________________________________________

    If you arrived here finding info for this error:

    Code:
    [root@fedora standard]# cdemud --bus=session
    Starting daemon in local mode with following parameters:
     - num devices: 1
     - ctl device: /dev/vhba_ctl
     - audio driver: null
     - bus type: session
    
    cdemud: Daemon: failed to get session bus!
    Daemon initialization failed: Failed to connect to D-BUS bus.
    It happens because you are running cdemud session bus as root. You can only run as root when using system bus. Check mrok quote from http://sourceforge.net/tracker/?func...75&atid=603423

    mrok said:
    If you use session bus, you should run the daemon as the user
    instead of root. Each user has their own session bus, which is inaccessible
    by other users; therefore CDEmu instance ran on session bus as root won't
    be accessible by other users...
    Attached Files Attached Files
    Last edited by Yiguro; 3rd September 2010 at 09:28 AM. Reason: Added info on how to run session bus

Similar Threads

  1. Bluetooth Headset:Paired no sound using FC8
    By Keith S in forum Using Fedora
    Replies: 9
    Last Post: 18th January 2009, 02:38 AM
  2. Mounting Images
    By thetransltr in forum Using Fedora
    Replies: 13
    Last Post: 1st January 2009, 10:34 AM
  3. Replies: 4
    Last Post: 19th November 2007, 05:54 AM
  4. ATI 8.22.5 paired with VS VX910 (corruption)
    By epborden in forum Hardware
    Replies: 0
    Last Post: 15th February 2006, 02:18 AM
  5. paired ddr memory
    By decker in forum Hardware
    Replies: 4
    Last Post: 18th May 2004, 09:58 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •