On 01/27/2018 09:39 AM, John Jason Jordan wrote: > Xubuntu 14.04.5, all updates applied. > > I have a program that can't find ether of my optical drives, /dev/sr0 > and /dev/sr1. Apparently there is a new module, 'sg,' that calls > them /dev/sg0 and /dev/sg1, and those are all that the program will > look for. I can't tell if I have the module installed or not: >
'sg' is a the SCSI module dating to before the IDE, ATA and SATA drive interfaces. If you don't have a SCSI HD or optical drive, sg and related driver modules won't be loaded automatically as its not needed. After kernel 2.6, all drive devices are either /dev/sd or /dev/sr /dev/sgX is a device node and not a module (why you see /dev/sgX is a mystery), usually created via udev on boot, but sg isn't used directly by drive devices anymore.. there is a kernel module sg.ko located in /lib/modules/<kernel version>/kernel/drivers/scsi/ but this will only (exist) load if (1) Kernel was compiled with scsi support (2) kernel/udev detects a scsi device, which you don't seem to have. you won't find sg.ko in synaptic, etc, as it is part of the kernel package. check the output of 'dmesg' to see what sort of drives are detected and what modules are then loaded. check output of 'modinfo sg' for something like: modinfo sg filename: /lib/modules/4.4.111/kernel/drivers/scsi/sg.ko alias: char-major-21-* version: 3.5.36 license: GPL description: SCSI generic (sg) driver author: Douglas Gilbert srcversion: 2F52D8B6A4820B5724E2DEF depends: intree: Y vermagic: 4.4.111 SMP mod_unload parm: scatter_elem_sz:scatter gather element size (default: max(SG_SCATTER_SZ, PAGE_SIZE)) (int) parm: def_reserved_size:size of buffer reserved for each fd (int) parm: allow_dio:allow direct I/O (default: 0 (disallow)) (int) That said, "cat /proc/scsi/scsi" should show scsi capable devices and "lsscisi" should list them with their primary device nodes: # cat /proc/scsi/scsi Attached devices: Host: scsi0 Channel: 00 Id: 00 Lun: 00 Vendor: HL-DT-ST Model: BD-RE WH16NS40 Rev: 1.00 Type: CD-ROM ANSI SCSI revision: 05 Host: scsi1 Channel: 00 Id: 00 Lun: 00 Vendor: HL-DT-ST Model: DVDRAM GH24NSB0 Rev: LF00 Type: CD-ROM ANSI SCSI revision: 05 Host: scsi4 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: WDC WD5000AAKX-0 Rev: 1H15 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi5 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: WDC WD10EZEX-00B Rev: 1A01 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi6 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: ST1000DM003-1ER1 Rev: CC45 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi7 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: WDC WD10EZEX-08W Rev: 1A01 Type: Direct-Access ANSI SCSI revision: 05 # lsscsi -g [0:0:0:0] cd/dvd HL-DT-ST BD-RE WH16NS40 1.00 /dev/sr0 - [1:0:0:0] cd/dvd HL-DT-ST DVDRAM GH24NSB0 LF00 /dev/sr1 - [4:0:0:0] disk ATA WDC WD5000AAKX-0 1H15 /dev/sda - [5:0:0:0] disk ATA WDC WD10EZEX-00B 1A01 /dev/sdb - [6:0:0:0] disk ATA ST1000DM003-1ER1 CC45 /dev/sdc - [7:0:0:0] disk ATA WDC WD10EZEX-08W 1A01 /dev/sdd - Note that on my system the primary devices are not mapped (passthrough) to sg as sg is not needed. The following sequence (as root) adds the sg mapping: # lsmod |grep sg # modprobe sg # lsmod |grep sg sg 27465 0 # lsscsi -g [0:0:0:0] cd/dvd HL-DT-ST BD-RE WH16NS40 1.00 /dev/sr0 /dev/sg0 [1:0:0:0] cd/dvd HL-DT-ST DVDRAM GH24NSB0 LF00 /dev/sr1 /dev/sg1 [4:0:0:0] disk ATA WDC WD5000AAKX-0 1H15 /dev/sda /dev/sg2 [5:0:0:0] disk ATA WDC WD10EZEX-00B 1A01 /dev/sdb /dev/sg3 [6:0:0:0] disk ATA ST1000DM003-1ER1 CC45 /dev/sdc /dev/sg4 [7:0:0:0] disk ATA WDC WD10EZEX-08W 1A01 /dev/sdd /dev/sg5 You didnt provide the name of the soeftware, but this should allow it to work. > I also neglected to mention that the two optical drives both work > perfectly with all other applications and for all purposes. They even > work with older versions of the program in question. There is some > discussion on the forums for the application, where the developers have > made it clear that it now requires the sg module and won't see optical > drives with just the sr module. Yes, I do think the devs are complete idiots. After kernel 2.6, all drive devises use /dev/sdX or /dev/srX as primary device nodes and all the SCSI tools and other software can use those directly without the generic scsi driver (sg). Why they suddenly decide go in the opposite direction of the kernel devs baffles me. -Ed
signature.asc
Description: OpenPGP digital signature
_______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
