VectorLinux
July 28, 2014, 02:00:48 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: cdrom device gid wrong on vanilla 2.6.24.3 kernel  (Read 1155 times)
emi
Member
*
Posts: 21


« on: March 16, 2008, 05:57:42 pm »

I compiled myself a new 2.6.24.3 kernel. My cdrom device /dev/hda has these permissions:

$ ls -l /dev/hda
brw-rw---- 1 root disk 3, 0 2008-03-16 17:23 /dev/hda

This breaks the rc.cdrom script because it's expecting the gid to be cdrom. Changing the ownership on the device fixes the script but obviously changes don't remain across reboots.

The cdrom seems to be detected normally.

$ dmesg
[snip]
ICH7: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0x1810-0x1817, BIOS settings: hda:DMA, hdb:pio
ICH7: IDE port disabled
Probing IDE interface ide0...
hda: HL-DT-ST DVDRAM GMA-4082N, ATAPI CD/DVD-ROM drive
hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4
hda: MWDMA2 mode selected
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hda: ATAPI 24X DVD-ROM DVD-R-RAM CD-R/RW drive, 2048kB Cache
Uniform CD-ROM driver Revision: 3.20
[snip]

What do I need to change to make the ownership right on the cdrom device?

Thanks.
Logged
JohnB316
Administrator
Vectorian
*****
Posts: 1346


Registered Linux User #386728


« Reply #1 on: March 16, 2008, 09:37:22 pm »

The permissions for CD devices should be set up by a udev rule. I'm not in my VL partition at the moment, so I'm not sure which of the items in /etc/udev/rules.d would be the one to check. I'm sure somebody else can come along to help on this.

HTH just a bit,
John
Logged

VL 6.0 SOHO latest alpha on one box, VL 5.9 Lite on the other.
emi
Member
*
Posts: 21


« Reply #2 on: March 16, 2008, 11:44:32 pm »

Thanks very much for pointing me in the right direction, John. I looked up the udev rules syntax. Simply adding:

BUS=="ide", KERNEL=="*[!0-9]", DRIVER=="ide-cdrom", NAME="%k", GROUP="cdrom", MODE="0660"

fixed the issue.

Hoever, I don't understand why this line in the default rules file failed:

BUS=="ide", KERNEL=="*[!0-9]", ENV{PHYSDEVDRIVER}=="ide-cdrom", NAME="%k", GROUP="cdrom", MODE="0660"

Where is the PHYSDEVDRIVER variable set, or is it "built in"? I notice that other lines in udev.rules that use ENV{PHYSDEVDRIVER} also fail. For instance:

BUS=="ide", KERNEL=="*[!0-9]", ENV{PHYSDEVDRIVER}=="ide-floppy*", NAME="%k", GROUP="floppy", MODE="0660"

produces:

$ ls -l /dev/fd*
lrwxrwxrwx 1 root root    13 2008-03-16 22:55 /dev/fd -> /proc/self/fd/
brw-rw---- 1 root smmsp 2, 0 2005-11-21 00:29 /dev/fd0
brw-rw---- 1 root smmsp 2, 1 2005-11-21 00:29 /dev/fd1
brw-rw---- 1 root smmsp 2, 2 2005-11-21 00:29 /dev/fd2
brw-rw---- 1 root smmsp 2, 3 2005-11-21 00:29 /dev/fd3

which is just silly.

I guess all the ENV{PHYSDEVDRIVER} references need to be changed to DRIVER... why would a new kernel necessitate changing this? And what about other ENV keys, e.g. ENV{ID_SERIAL}?

Thanks,
Elliot
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!