LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 07-03-2011, 04:00 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,290

Rep: Reputation: 50
rm /dev/dvd; ln -s /dev/hdd /dev/dvd has no effect after rebooting.


Kernel 2.6.21.5, Slackware 12.0

Hi:
Because mplayer looks for /dev/dvd and
Code:
lrwxrwxrwx 1 root root 8 2007-01-24 07:35 /dev/dvd -> /dev/hdc
whereas my the disc I want to play is in /dev/hdd (/dev/hdc is a CD-ROM drive), I do
Code:
$ rm /dev/dvd
$ ln -s /dev/hdd /dev/dvd
which gives
Code:
lrwxrwxrwx 1 root root 8 2007-01-24 07:35 /dev/dvd -> /dev/hdd
OK. Now I reboot the machine and, when I look at /dev/dvd, again it is linked to /dev/hdc. How can this be? Or should it be a hard link that I must do? Thanks.
 
Old 07-03-2011, 04:24 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
couldn't you just add:
Code:
rm /dev/dvd
ln -s /dev/hdd /dev/dvd
to /etc/rc.d/rc.local and
Code:
chmod +x /etc/rc.d/rc.local
 
1 members found this post helpful.
Old 07-03-2011, 04:57 PM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,290

Original Poster
Rep: Reputation: 50
Thanks for the feedback. I did what you said. As I already have other stuff in /etc/rc.d/rc.local, and it always gets executed, I have no doubt this will also execute in the next reboot.

If I ls -s a regular file, the link stays there until I explicitly remove it. But /dev/dvd is not a regular file. May be this the reason why it reappears?
 
Old 07-03-2011, 08:19 PM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
You may need to read this http://linux.die.net/man/8/udev
 
Old 07-03-2011, 08:25 PM   #5
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
This is pretty good also:

http://www.reactivated.net/writing_u...#example-cdrom
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
openSUSE Multimedia Optical Devices /dev/dvd & /dev/cdrom Configuration jdmcdaniel3 Suse/Novell 2 10-31-2010 02:06 PM
I cannot access EITHER CD drive! And there's no /dev/hdc or /dev/hdd or /dev/cdrom! Dmalic Linux - Hardware 13 11-18-2005 08:11 PM
ln: creating symbolic link `/dev/dvd' to `/dev/hdc': Permission denied qazwsx27 Fedora 3 06-14-2005 03:09 PM
growisofs -Z /dev/dvd=/dev/zero failed penguin123 Linux - Hardware 1 02-19-2004 04:06 AM
DMA on /dev/hda but not on /dev/dvd jslade Linux - Hardware 4 04-08-2003 12:26 AM


All times are GMT -5. The time now is 06:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration