Ok maybe i shouldn't of installed udev(cant remember why i did) but since i installed it on my Debian unstable box ive lost my /dev/cdrom and /dev/dvd links. I also don't seem to have any swap space anymore (explains why quake3 has been locking up my box on map loading). I've done a few quick searches and can't seem to find any udev howto's, can anyone point me in the right direction?
Is adding two lines to /etc/udev/links.conf the best way of setting up /dev/cdrom and /dev/dvd device nodes?
Dennis
On Thu, 2004-05-06 at 18:46, Dennis Dryden wrote:
Ok maybe i shouldn't of installed udev(cant remember why i did) but since i installed it on my Debian unstable box ive lost my /dev/cdrom and /dev/dvd links. I also don't seem to have any swap space anymore (explains why quake3 has been locking up my box on map loading). I've done a few quick searches and can't seem to find any udev howto's, can anyone point me in the right direction?
udev really isn't meant for people who don't know what they're doing yet...
Is adding two lines to /etc/udev/links.conf the best way of setting up /dev/cdrom and /dev/dvd device nodes?
It's certainly one way.
Another is to add rules to /etc/udev/rules.d/mycdrom.rules
D.
On 2004-05-06 18:46:06 +0100 Dennis Dryden ddryden@ntlworld.com wrote:
Ok maybe i shouldn't of installed udev(cant remember why i did)
Installing udev is a good thing IMO. I'm really impressed with it now.
since i installed it on my Debian unstable box ive lost my /dev/cdrom and /dev/dvd links.
These are created for me by udev.rules lines:
BUS="ide", KERNEL="*[!0-9]", PROGRAM="/bin/cdcap 'read DVD' %k", RESULT="1", NAME="%k", SYMLINK="dvd" BUS="ide", KERNEL="*[!0-9]", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="cdrom", NAME="%k", SYMLINK="cdrom"
where cdcap is a small script:
#!/bin/bash
if [ -z "$2" ] ; then echo "Usage: $0 <capability> <drive>" ; exit 127 ; fi fieldno=$(sed -n -e '/^drive name:/{;s/ */\n/g;p;q;}' /proc/sys/dev/cdrom/info|grep -n "$2"|cut -f1 -d:) if [ -z "$fieldno" ] ; then echo 0 # not a cdrom? else sed -n -e "/$1/{;s/ */ /g;p;q;}" /proc/sys/dev/cdrom/info | cut -f$fieldno fi
Those are tabs in the slashes, in case they don't show up right.
I also don't seem to have any swap space anymore
Check /etc/fstab - if you were using devfs before, it might say /dev/ide/really/long/path/part3 or something that now wants to be /dev/hda3 or similar again. You could even have /dev/swap if you set udev up for that, but I'm not sure there's much point.
Is adding two lines to /etc/udev/links.conf the best way of setting up /dev/cdrom and /dev/dvd device nodes?
That would work if you're using your udev config on only one system. "Best" depends on what your aim is.