Jump to content

Nvram on a IBM R31 [solved]


willie
 Share

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

[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

Link to comment
Share on other sites

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 by pmpatrick
Link to comment
Share on other sites

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 by pmpatrick
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...