[DRBD-user] [DRBD-announce] (drbd-8.3.6.tar.gz)

Florian Haas florian.haas at linbit.com
Fri Nov 13 09:14:52 CET 2009

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Now wait a minute, please don't confuse things here. :)

On 11/13/2009 08:35 AM, Holger Kiehl wrote:
> How does one compile kernel module for kernel.org kernel? Usually
> one just needed to do the following:
> 
>      make clean all install
> 
> Now the way I got it to work (on CentOS 5.4) was:
> 
>      ./configure --prefix=/usr --mandir=/usr/share/man
> --infodir=/usr/share/info --with-km
>      make clean all install
>      depmod -a
> 
> If I just do:
> 
>    ./configure --with-km
> 
> Then the make install copies the files to /usr/local, 

"The files" is not correct if "the files" includes the kernel module,
which is installed into $(DESTDIR)/lib/modules/$(KERNELRELEASE),
$(DESTDIR) being / by default and $(KERNELRELEASE) being the kernel
release you are building against (which in turn is the currently running
kernel by default).

Please confirm that. If that's not true for the kernel module for you,
then that's an error in the build process, which would need to be fixed.

The userland admin tools (drbdadm, drbdsetup, drbdmeta) install into
$(DESTDIR)/sbin, again $(DESTDIR) being / by default. We do this because
for some applications we need to run very early in the boot process,
with /usr possibly not yet being available on the system.

Everything else does install below /usr/local by default, to be in line
with the FHS. It is common to override this by specifying --prefix=/usr
(at which point, btw, you don't need to specify --mandir and --infodir,
but you probably want --sysconfdir=/etc).

> although configure
> says:
> 
>    checking for /etc/gentoo-release... no
>    checking for /etc/redhat-release... yes
>    checking for /etc/slackware-version... no
>    checking for /etc/debian_version... no
>    checking for /etc/SuSErelease... no
>    configure: configured for Red Hat (includes Fedora, RHEL, CentOS).

Yes, it's detecting what platform you are building on and sets a few
paths accordingly. It would be pointless to look for this below /usr/local.

> What am I doing wrong or what is the adviced way to compile kernel module?

To compile and install both the userland and kernel components, in your
case the recommended steps would be (assuming you are building as non-root):
./configure --prefix=/usr --sysconfdir=/etc --with-km
make
sudo make install

"make install" does invoke depmod, so no need to do that specifically.

Hope this helps. Like Phil already wrote, this will be in the User's
Guide shortly.

Cheers,
Florian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20091113/3506a4f8/attachment.pgp>


More information about the drbd-user mailing list