/dev/ links disappearing
news at pointerstop.ca
Thu Nov 23 01:57:20 UTC 2006
Daryl Sayers wrote:
> I am running ubuntu 6.06 after upgrading from and OLD Debian system. I
> have noticed that my computer thinks it now know better than me. I put
> a few symlinks into /dev/ to point to generic names like /dev/backup which
> points to a tape device. Also things like a serial port I have called
> /dev/modem that points to /dev/ttyS0. Problem is that these symlinks keep
> disappearing. I am not sure what is cleaning them up. I am sure this has
> something to do with udevd but I am unable to find any info on what I need
> to do.
OK, /dev is entirely virtual, so you can't create links on the "filesystem"
and expect them to survive a reboot.
Basically you have to modify rules in /etc/udev/rules.d/. Look
at /etc/udev/rules.d/60-symlinks.rules (at least in edgy - otherwise look
at any .rules files anywhere under /etc/udev to get an idea).
You can create your own 50-local.rules and add rules like:
(where 'xxxx' is the device name of your tape device). Note, I already have
a default entry for ttyLTM[0-9]* in 60-symlinks.rules that sets /dev/modem,
so you would definitely need your local rules to execute before that - the
first such allocation of symlink name wins iirc.
More information about the ubuntu-users