[SOLVED] Howto make a symlink "/dev/dvd" permanent?
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2013
    Location
    Germany
    Posts
    5

    Howto make a symlink "/dev/dvd" permanent?

    Hi!

    Some apps needs to find the DVD at /dev/dvd but my Fedora hasn't this. I can do "sudo ln -s /dev/sr0 /dev/dvd" to solve this problem in the running session. But how can I make this permanent for every system start!?
    My system: Fedora 19 64bit in Virtualbox 4.3.0 under Windows7-host.

  2. #2
    PabloTwo's Avatar
    PabloTwo is offline "Registered User" T-Shirt Winner
    Join Date
    Mar 2007
    Location
    Seville, FL
    Posts
    7,829

    Re: Howto make a symlink "/dev/dvd" permanent?

    One approach:

    Create a shell script file /etc/rc.d/rc.local
    In that file, put:
    Code:
    #!/bin/bash
    ln -s /dev/sr0 /dev/dvd
    Make sure the file is execlutable:
    Code:
    sudo chmod +x /etc/rc.d/rc.local
    The script will automatically run as the last thing during boot-up before the log-in screen. It will be run as root, so no need to have "sudo" in the command. Also make sure the rc.local file ends with a blank line.

  3. #3
    Join Date
    Jul 2011
    Location
    Birmingham, UK
    Age
    36
    Posts
    2,761

    Re: Howto make a symlink "/dev/dvd" permanent?

    The preferred way these days would be a UDev rule. Based on /lib/udev/rules.d/60-cdrom_id.rules, which creates the /dev/cdrom symbolic link, try adding a file /etc/udev/rules.d/60-dvd.rules containing:
    Code:
    KERNEL=="sr0", SYMLINK+="dvd", OPTIONS+="link_priority=-100"
    I’ve not tested it, so you may need to play around a bit.

  4. #4
    Join Date
    Oct 2007
    Location
    Freedonia
    Age
    69
    Posts
    3,076

    Re: Howto make a symlink "/dev/dvd" permanent?

    If you're going to use the rc.local route, you also need to do this, as root:

    systemctl enable rc-local.service

    because it's not enabled by default.
    Registered Linux user #470359 and permanently recovered BOFH.

    Any advice in this post is worth exactly what you paid for it.

  5. #5
    Join Date
    Aug 2009
    Posts
    8,486

    Re: Howto make a symlink "/dev/dvd" permanent?

    Gareth is correct in how to create the device on Fedora now. But, I would copy the existing /usr/lib/udev/rules.d/60-cdrom_id.rules to /etc/udev/rules.d and just add the symlink to the one it already creates for /dev/cdrom.

    Just add it to the line, like so:

    Code:
    KERNEL=="sr0", SYMLINK+="cdrom dvd", OPTIONS+="link_priority=-100"
    Actually, the other approach that you could use would be to use MAKEDEV, which would be preferable to the rc.local approach, but still not as good as the udev rule.

  6. #6
    Join Date
    Nov 2013
    Location
    Germany
    Posts
    5

    Re: Howto make a symlink "/dev/dvd" permanent?

    Thank you, folks. All tips are working but I left the last in my system. I did not understand why the udev rules are better. But no matter, I hven't to know everything, the main thing is, it works ;-)
    My system: Fedora 19 64bit in Virtualbox 4.3.0 under Windows7-host.

  7. #7
    Join Date
    Oct 2013
    Location
    Ogdensburg, NY
    Posts
    15

    Re: Howto make a symlink "/dev/dvd" permanent?

    ...I did not understand why the udev rules are better.
    I had only a half-arsed understanding as well, so I did some searching. This covers it well I think:

    And 'pedia gets succinct:
    3.11.3-201.fc19.x86_64
    GTX650-Ti, Mobo Asus Z87-Pro, i7-4770K
    scintilla.bandcamp.com
    soundcloud.com/avantguy

  8. #8
    PabloTwo's Avatar
    PabloTwo is offline "Registered User" T-Shirt Winner
    Join Date
    Mar 2007
    Location
    Seville, FL
    Posts
    7,829

    Re: Howto make a symlink "/dev/dvd" permanent?

    Quote Originally Posted by sidebrnz
    If you're going to use the rc.local route, you also need to do this, as root:

    systemctl enable rc-local.service

    because it's not enabled by default.
    No. The rc-local.service is a "static" service, which means you can neither enable or disable it.

Similar Threads

  1. [SOLVED]
    /dev/shm wrong permissions. How do I make fix permanent?
    By TonyPH12345 in forum Using Fedora
    Replies: 7
    Last Post: 21st January 2013, 02:58 AM
  2. Replies: 3
    Last Post: 8th October 2010, 06:00 AM
  3. [SOLVED]
    persistent DNS cache - howto make it permanent?
    By tripleninez in forum Using Fedora
    Replies: 8
    Last Post: 10th March 2010, 08:56 PM
  4. window maker "make" / "make install" problem (FC4)
    By xiekke in forum Using Fedora
    Replies: 3
    Last Post: 15th February 2006, 05:44 PM
  5. Replies: 0
    Last Post: 23rd May 2005, 04:59 AM

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
  •