Buffalo DVD hardware supported under CentOS 7

Issues related to hardware problems
hunter86_bg
Posts: 1422
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Buffalo DVD hardware supported under CentOS 7

Post by hunter86_bg » 2018/09/08 09:49:51

Have you tried the DVD on a distro with a newer kernel, like Fedora,openSuSE , Ubuntu, etc ?

bjcollin
Posts: 13
Joined: 2018/08/31 14:57:18

Re: Buffalo DVD hardware supported under CentOS 7

Post by bjcollin » 2018/09/14 15:14:59

Sorry, we are locked into CentOS for this, we have just upgraded from CentOS 5.11 to CentOS 7.5, we can't try another distribution at this time.

bjcollin
Posts: 13
Joined: 2018/08/31 14:57:18

Re: Buffalo DVD hardware supported under CentOS 7

Post by bjcollin » 2018/09/14 15:22:58

under CentOS 5.11... udevinfo -q all -n /dev/sr1

P: /block/sr1
N: sr1
S: cdrom
S: cdrom-sr1
S: dvd
S: dvd-sr1
S: cdrw
S: cdrw-sr1
S: dvdwriter
S: dvdwriter-sr1
S: dvdrw
S: dvdrw-sr1
S:scd1
S: disk/by-id/usb-BUFFALO_BUFFALO_Optical_Drive_000001026B7D
S: disk/by-path/pci-0000:00:1a.0-usb-0:1.3:1.0-scsi-0:0:0:0
E: ID_VENDOR=BUFFALO
E: ID_MODEL=BUFFALO_Optical_Drive
E: ID_REVISION=0001
E: ID_SERIAL=BUFFALO_BUFFALO_Optical_Drive_000001026B7D
E: ID_TYPE=floppy
E: ID_BUS=usb
E: ID_PATH=pci-0000:00:1a.0-usb-0:1.3:1.0-scsi-0:0:0:0

Then there is a file under /etc/udev/rules.d/50-udev.rules that exists under CentOS 5.11 and does not exist under CentOS 7.5, which contains many lines which have rules for the devices in the S: fields listed above. While there is nothing specific about Buffalos, I think I might be headed down the right path possibly.

bjcollin
Posts: 13
Joined: 2018/08/31 14:57:18

Re: Buffalo DVD hardware supported under CentOS 7

Post by bjcollin » 2018/09/14 16:10:10

Under CentOS 5.11 the /etc/udev/rules.d/50-udev.rules file references a script /lib/udev/check-cdrom.sh which under CentOS 7.5 this script does not exist and it seems to have been replaced with /lib/udev/cdrom_id which is an executable program. Does anybody know how these changes have changed and progressed over the years between the releases?

User avatar
TrevorH
Forum Moderator
Posts: 23870
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Buffalo DVD hardware supported under CentOS 7

Post by TrevorH » 2018/09/14 16:32:49

What does /lib/udev/check-cdrom.sh do?
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

bjcollin
Posts: 13
Joined: 2018/08/31 14:57:18

Re: Buffalo DVD hardware supported under CentOS 7

Post by bjcollin » 2018/09/14 20:24:41

/lib/udev/check-cdrom.sh

Code: Select all

#!/bin/bash
pos=0
n=0
sp="$1"
what="$2"
found=0

[ -e /proc/sys/dev/cdrom/info ] || exit 1

/bin/cat /proc/sys/dev/cdrom/info | {
   while read line; do
      if [ "$found" = "0" -a "${line/drive name:}" != "$line" ]; then
         set ${line/drive name:}
         while [ $# -gt 0 ]; do
            pos=$[$pos+1]
            if [ "$1" == "$sp" ]; then
               found=1
               break
            fi
            shift
         done
         [ "$found" = "0" ] && exit 1
      elif [ "${line/$what:}" != "$line" ]; then
         set ${line##*$what:}
         while [ $# -gt 0 ]; do
            n=$[$n+1]
            if [ "$n" == "$pos" ]; then
               if [ "$1" == "1" ]; then
                  exit 0
               fi
               break
            fi
            shift
         done
      fi
   done
   exit 1
}
It looks like the script simply looks at the /proc/sys/dev/cdrom/info file for drive name: entries.

Under CentOS 5.5 this file has 2 entries, one for sr0 and sr1. "drive name: sr1 sr0" However, under CentOS 7.5 this file only has 1 entry "drive name: sr0". Both files have a bunch of other parameters following that first line. So under CentOS 7.5 there is a sr0 for the internal cdrom drive, but there is no sr1 information for the external dvdrom drive in that file.

User avatar
TrevorH
Forum Moderator
Posts: 23870
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Buffalo DVD hardware supported under CentOS 7

Post by TrevorH » 2018/09/14 21:47:26

I'm still not convinced this is a udev problem but one way to check would be to, as root, fire up udevadm monitor and then plug in the device and see what the monitor output says.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

bjcollin
Posts: 13
Joined: 2018/08/31 14:57:18

Re: Buffalo DVD hardware supported under CentOS 7

Post by bjcollin » 2018/09/18 19:59:55

Already did that, posted udevadm output in the 3rd message of this thread. udev can see the device being plugged in, it just doesn't take the next step and map or create the /dev/sr1 device to point to it.

bjcollin
Posts: 13
Joined: 2018/08/31 14:57:18

Re: Buffalo DVD hardware supported under CentOS 7

Post by bjcollin » 2018/09/20 15:59:43

Trevor,

I finally got it to work! You were right, the problem was not udev. The problem ended up being in modprobe. There is a file /etc/modprobe.d/usb-storage.conf which has a single line in it:

Code: Select all

install usb-storage /bin/true
hahaha silly me, /bin/true does not mean yes install usb-storage it means fake install doh. So to fix the issue I simply put a # in front of the line and after a quick reboot, the USB DVD came right up, installed the /dev/sr1 device and mounted itself just like normal. Thank you for all the assistance!

I did end up adding a /etc/udev/rules.d/70-persistent-cdrom.rules file to my system to get a couple of symbolic links which has the following lines:

Code: Select all

KERNEL=="sr0", SYMLINK+="cdrom cdrom-%k"
KERNEL=="sr1", SYMLINK+="dvdrom dvdrom-%k"
Brian Collins

User avatar
TrevorH
Forum Moderator
Posts: 23870
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Buffalo DVD hardware supported under CentOS 7

Post by TrevorH » 2018/09/20 17:58:52

Yes, that file is not one we ship. That was added by some security conscious person trying to disable the use of USB sticks etc.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply