LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 03:00 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
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, 03:24 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
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, 03:57 PM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
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, 07:19 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,369

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

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

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


Reply



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 / openSUSE 2 10-31-2010 01: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 07:11 PM
ln: creating symbolic link `/dev/dvd' to `/dev/hdc': Permission denied qazwsx27 Fedora 3 06-14-2005 02:09 PM
growisofs -Z /dev/dvd=/dev/zero failed penguin123 Linux - Hardware 1 02-19-2004 03:06 AM
DMA on /dev/hda but not on /dev/dvd jslade Linux - Hardware 4 04-07-2003 11:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:17 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
Open Source Consulting | Domain Registration