Comment 7 for bug 7490

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Tue, 17 Aug 2004 19:37:32 +0200
From: Aurelien Jarno <email address hidden>
To: Mantas =?utf-8?B?S3JpYXXEjWnFq25hcw==?= <email address hidden>,
 <email address hidden>
Cc: Miquel van Smoorenburg <email address hidden>
Subject: Re: Bug#266227: lm-sensors doesn't start and doesn't provide any information how to solve
 this problem

clone 266227
reassign -1 initscripts
retitle -1 /sys not mounted at boot on a 2.6 kernel
retitle 266227 Should explain how to configure
severity 26627 minor
thanks

[ For the initscripts maintainer, in short the problem is that
  /sys is not mounted at boot time in a system using a 2.6 kernel. ]

On Tue, Aug 17, 2004 at 07:01:16AM +0300, Mantas Kriaučiūnas wrote:
> Package: lm-sensors
> Version: 2.8.7-2
> Severity: grave
> Justification: renders package unusable
>
> I'm trying to get working lm-sensors on debian:
>
> dubrava:/home/mantas# apt-get install lm-sensors
>
> [...]
>
> Setting up lm-sensors (2.8.7-2) ...
>
> Gtk-WARNING **: cannot open display:
> debconf: unable to initialize frontend: Gnome
> debconf: (DISPLAY problem?)
> debconf: falling back to frontend: Dialog
>
> Creating config file /etc/sensors.conf with new version
> cp -f /usr/share/lm-sensors/sensors.conf.eg /etc/sensors.conf
> cp -f /usr/share/lm-sensors/sensors.conf.eg /var/lib/ucf/cache/:etc:sensors.conf
> Setting sensors limits:Can't access procfs/sysfs file
> Unable to find i2c bus information;
> For 2.6 kernels, make sure you have mounted sysfs and done
> 'modprobe i2c_sensor'!
> For older kernels, make sure you have done 'modprobe i2c-proc'!
> Can't access procfs/sysfs file
> Unable to find i2c bus information;
> For 2.6 kernels, make sure you have mounted sysfs and done
> 'modprobe i2c_sensor'!
> For older kernels, make sure you have done 'modprobe i2c-proc'!
> done.
>
>
> As I don't know what is sysfs (procfs is mountend automatically on my
> system by discover) and didn't got any debconf prompts about mounting
> sysfs, so I did 'modprobe i2c_sensor' and then did:
sysfs should be mounted on a 2.6 kernel. It is the jobs of initscripts,
and it is surprising that it is not mounted at boot time.

> dubrava:/home/mantas# /etc/init.d/lm-sensors restart
> Setting sensors limits:Can't access procfs/sysfs file
> Unable to find i2c bus information;
> For 2.6 kernels, make sure you have mounted sysfs and done
> 'modprobe i2c_sensor'!
> For older kernels, make sure you have done 'modprobe i2c-proc'!
> Can't access procfs/sysfs file
> Unable to find i2c bus information;
> For 2.6 kernels, make sure you have mounted sysfs and done
> 'modprobe i2c_sensor'!
> For older kernels, make sure you have done 'modprobe i2c-proc'!
> done.
>
> It seems same shit again :(
>
> Then I've read in /usr/share/doc/lm-sensors/README.Debian this:
>
> 2.6 kernels
>
> Once you have your kernel properly configured, you need to probe for the
> sensors available on your system. You can use the sensors-detect program to
> do this.
>
> Hehe, if it's so simple, why don't offer debconf prompt for user about this?
Simply because the Debian Policy forbids to do that. Moreover, the "Once
you have your kernel properly configured" is important there, it means
that need to have the drivers built as modules or built into the kernel.
And it could a lot more complicated with 2.4 kernels than with 2.6
kernels.

> OK, then I started sensors-detect program pressed Enter several times and
> got this info in terminal:
>
> To make the sensors modules behave correctly, add these lines to
> /etc/modules:
>
> #----cut here----
> # I2C adapter drivers
> i2c-isa
> # I2C chip drivers
> w83627hf
> #----cut here----
>
> Then, run /etc/init.d/module-init-tools
>
>
> To make the sensors modules behave correctly, add these lines to
> /etc/modprobe.d/local and run update-modules:
>
> #----cut here----
> # I2C module options
> alias char-major-89 i2c-dev
> #----cut here----
>
>
> I copied info into /etc/modules, then copied another part into
> /etc/modprobe.d/local and then acidently searched /etc/modprobe.d/aliases
> and found, that the same alias is in /etc/modprobe.d/aliases already !!!
You're right, that alias is already present for 2.6 kernels.
And for 2.4 kernels, the alias is automatically added by the package.

> One more bug :( Also I think it's not hard to make script, which adds needed
> lines automatically, why user should manually to do this ?
Because some users prefer to build the driver in hard in their kernel,
some others prefers to load them manually, and moreover, they maybe more
than one module possible for the same device.

[...]

> So,
> - why sensors-detect isn't started automatically (after debconf prompt)
> about this ?
Explained before. However, I'll add a debconf note to explain how to
configure the kernel modules, though it is already explained in
/usr/share/doc/lm-sensors/README.Debian.

> - why output of sensors-detect isn't copied to /etc/modules automatically ?
Explained before. It's better to let the users decide, and copy/paste is
not a very difficult thing.

> - why sysfs isn't mounted in /etc/init.d/lm-sensors or in some other place
> automatically ?
As said, it is not the job of lm-sensors. I have reassigned a copy of
this bug to initscripts.

> It seems lm-sensors will be usable for simple users only, when these problems
> will be solved (not even advanced users can't get lmsensors working :( )
I don't want to feed the troll, but I know a lot people that can be
defined as "simple users" using lm-sensors. Without the problem of sysfs
(which I repeat doesn't come from lm-sensors), you would have configured
it easilly.

Bye,
Aurélien

--
  .''`. Aurelien Jarno GPG: 1024D/F1BCDB73
 : :' : Debian GNU/Linux developer | Electrical Engineer
 `. `' <email address hidden> | <email address hidden>
   `- people.debian.org/~aurel32 | www.aurel32.net