willie Posted October 31, 2005 Report Share Posted October 31, 2005 I have a IBM R31 notebook and wan't to use the thinkpad buttons for sound. Nvram is installed in /dev but i have only read only permissions, so i do in the console #chmod 666 /dev/nvram and the permissions are read/write and it works well. I end my session en again login and the permissions of Nvram are back to read only. Is there a way to make it permanent. Willie Quote Link to comment Share on other sites More sharing options...
pmpatrick Posted October 31, 2005 Report Share Posted October 31, 2005 Add your chmod command to the end of /etc/rc.d/rc.local, i.e. put this at the end of rc.local: chmod 666 /dev/nvram The rclocal script runs with root permissions at every boot and is the last init script to run. The perms you set there should not be reset by anything else. Quote Link to comment Share on other sites More sharing options...
willie Posted October 31, 2005 Author Report Share Posted October 31, 2005 I didas root: #kwrite /etc/rc.d/rc.local and put de line "chmod 666 /dev/nvram" as last line in rc.local, restart my comp and nothing happend. Nvram is still read-only Willie Quote Link to comment Share on other sites More sharing options...
pmpatrick Posted October 31, 2005 Report Share Posted October 31, 2005 Post your rc.local. Quote Link to comment Share on other sites More sharing options...
willie Posted October 31, 2005 Author Report Share Posted October 31, 2005 This is my rc.local #!/bin/sh # #This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if yoy don't # want to do the full Sys V style init stuff. touch /var/lock/subsys/local chmod 666 /dev/nvram Willie Quote Link to comment Share on other sites More sharing options...
pmpatrick Posted October 31, 2005 Report Share Posted October 31, 2005 I'm stumped. The only thing I can think of that would account for that is that /dev/nvram does not exist at the time rc.local is executed. Can you post the output of: # ls -l /dev/nvram right after you boot up. I assume you are using a recent 2.6 kernel with udev, in which case there may be some triggering event which makes udev create /dev/nvram like for usb devices. I'm not that familiar with your hardware; I assume nvram stands for non-volatile ram. Exactly what is it used for and what is written to it? Does /dev/nvram have an entry in fstab? Quote Link to comment Share on other sites More sharing options...
willie Posted October 31, 2005 Author Report Share Posted October 31, 2005 [willie@localhost ~]$ su Password: [root@localhost willie]# ls -l /dev/nvram cr-------- 1 willie root 10, 144 okt 31 17:16 /dev/nvram Kernel: 2.6.12.12 fstab: # This file is edited by fstab-sync - see 'man fstab-sync' for details /dev/hda1 / ext3 noatime 1 1 /dev/hda6 /home ext3 noatime 1 2 /dev/hdc /mnt/cdrom auto umask=0,user,iocharset=iso8859-15,codepage=850,noauto,ro,exec,users 0 0 none /proc proc defaults 0 0 /dev/hda5 swap swap defaults 0 0 /dev/sr0 /mnt/cdrom2 auto umask=0,user,iocharset=iso8859-15,sync,codepage=850,noauto,ro,exec,users 0 0 Willie Quote Link to comment Share on other sites More sharing options...
pmpatrick Posted November 2, 2005 Report Share Posted November 2, 2005 (edited) One thing you can try is creating the nvram device file manually in rc.local and set the perms to 666. You do that with the mknod command and your ls -l output gives you all the info you need. Remove your chmod line from rc.local and replace it with this: mknod -m 666 /dev/nvram c 10 144 Hopefully that will stick. Edited November 2, 2005 by pmpatrick Quote Link to comment Share on other sites More sharing options...
willie Posted November 3, 2005 Author Report Share Posted November 3, 2005 No it did'nt work. Owner = willie, permisions: read only Group = root, permisions: none I don't understand this, if i do chmod 660 /dev/nvram it's oke. Restart the comp everything is like above Willie Quote Link to comment Share on other sites More sharing options...
pmpatrick Posted November 3, 2005 Report Share Posted November 3, 2005 (edited) Something may be resetting the perms back after the init scripts run. I'm not sure what that is; it may be the udev configuration. Take a look at the files in /etc/udev/rules.d and see if there is any reference to nvram. Other possibility - it could be a driver issue. Please post the output of: # lsmod I believe you should show a module named "nvram". Check the files /etc/modprobe.conf and /etc/modprobe.preload and post both files. Here's my thinking - For nvram to be properly created, and used, you need it's driver module, nvram, loaded first. If nvram is in modprobe.conf, it may not be loaded in time for udev to pick it up when the init scripts run; I believe if you put nvram in modprobe.preload instead, udev will pick up nvram before the init scripts run and create the device file. Then your chmod in rc.local will work. It might just be a timing issue. Edited November 3, 2005 by pmpatrick Quote Link to comment Share on other sites More sharing options...
willie Posted November 3, 2005 Author Report Share Posted November 3, 2005 lsmod: gpgart 29032 3 drm,intel_agp sr_mod 15428 0 nvram 7400 0 slamr 401032 2 usblp 10976 0 usb_storage 82020 0 scsi_mod 121064 3 sd_mod,sr_mod,usb_storage tsdev 5984 0 uhci_hcd 29136 0 usbcore 108348 5 ndiswrapper,usblp,usb_storage,uhci_hcd evdev 7648 0 ext3 124744 2 jbd 48568 1 ext3 This is not the whole output modprob.conf: alias eth0 e100 alias sound-slot-0 snd-intel8x0 install usb-interface /sbin/modprobe uhci-hcd; /bin/true alias wlan0 ndiswrapper remove snd-intel8x0 /sbin/modprobe -r snd-pcm-oss; /sbin/modprobe --first-time -r --ignore-remove snd-intel8x0 install snd-intel8x0 /sbin/modprobe --first-time --ignore-install snd-intel8x0 && { /sbin/modprobe snd-pcm-oss; /bin/true; } remove i810_audio /sbin/modprobe --first-time -r --ignore-remove i810_audio install i810_audio /sbin/modprobe --first-time --ignore-install i810_audio modprobe.preload: slamr nvram hw_random sr_mod intel-agp nvram stands also in /etc/modules could that cause the problem slamr nvram hw_random sr_mod is this correct No in none of the rules in rules.d is a reference to nvram Willie Quote Link to comment Share on other sites More sharing options...
wahur Posted November 4, 2005 Report Share Posted November 4, 2005 Last time I had trouble with perms automatically changing it was msec doing the damage. Just 2c from newb Quote Link to comment Share on other sites More sharing options...
willie Posted November 5, 2005 Author Report Share Posted November 5, 2005 How did you solved it Willie Quote Link to comment Share on other sites More sharing options...
willie Posted November 10, 2005 Author Report Share Posted November 10, 2005 Solved In /etc/security/console.perms was a line "<misc>=/dev/nvram and another line: # permission definitions <console> 0400 <misc> 0600 root changed that into: <console> 0660 <misc> 0660 root,nvram and it works Willie Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.