Posted on Mar 19, 2020 by kingbeowulf
One of my Slackware systems has two optical drives: Blu-Ray and DVD: /dev/sr0 and /dev/sr1. In 14.2 as well as current, if neither are used for awhile, some of the udev symlinks to /dev/sr0 disappear. This becomes maddening (as in WTF?) when I'm trying to run my qemu VMs and I get the error:
1qemu-system-x86_64: -cdrom /dev/dvd: Could not open '/dev/dvd': No such file or directory
Taking a peek shows:
1$ ls -l /dev/dv* 2lrwxrwxrwx 1 root root 3 Mar 14 14:32 /dev/dvd1 -> sr1 3lrwxrwxrwx 1 root root 3 Mar 14 14:32 /dev/dvdr1 -> sr1 4lrwxrwxrwx 1 root root 3 Mar 14 14:32 /dev/dvdrw1 -> sr1 5lrwxrwxrwx 1 root root 3 Mar 14 14:32 /dev/dvdwriter1 -> sr1
instead of the expected list:
1$ ls -l /dev/dv* 2lrwxrwxrwx 1 root root 3 Mar 19 19:00 /dev/dvd -> sr0 3lrwxrwxrwx 1 root root 3 Mar 19 19:00 /dev/dvd0 -> sr0 4lrwxrwxrwx 1 root root 3 Mar 19 19:00 /dev/dvd1 -> sr1 5lrwxrwxrwx 1 root root 3 Mar 19 19:00 /dev/dvdr -> sr0 6lrwxrwxrwx 1 root root 3 Mar 19 19:00 /dev/dvdr0 -> sr0 7lrwxrwxrwx 1 root root 3 Mar 19 19:00 /dev/dvdr1 -> sr1 8lrwxrwxrwx 1 root root 3 Mar 19 19:00 /dev/dvdrw -> sr0 9lrwxrwxrwx 1 root root 3 Mar 19 19:00 /dev/dvdrw0 -> sr0 10lrwxrwxrwx 1 root root 3 Mar 19 19:00 /dev/dvdrw1 -> sr1 11lrwxrwxrwx 1 root root 3 Mar 19 19:00 /dev/dvdwriter -> sr0 12lrwxrwxrwx 1 root root 3 Mar 19 19:00 /dev/dvdwriter0 -> sr0 13lrwxrwxrwx 1 root root 3 Mar 19 19:00 /dev/dvdwriter1 -> sr1
Rebooting or reloading the udev rules (as root) restores the expected symlinks:
1# udevadm control --reload-rules && udevadm trigger
I suppose I could just tell qemu to look at /dev/sr0, but where's the fun in that?
Contact:
Try a nice upgrade from EVGA and get a discount!
Tired of Steam, Epic and other rip-off game "stores"? Check out Humble Bundle for your digital download needs! A portion of your hard-earned gaming cash goes to charity.
King Beowulf's Humble Bundle Referral Code