modutils - Linux kernel module utilities (insmod, lsmod, depmod, modprobe, etc.) ChangeLog

HOWTO


# modutils 2.4.27
# ===============
# Kernel 2.4.x and down used modutils, kernel 2.6.x and up use
# module-init-tools.

# Slackware 8.1's 'modutils' package includes version 2.4.16, 9.0's includes
# 2.4.22  9.1 and 10.0's packages are in 'pasture' and include version 2.4.25
#
# Slackware 9.1 and 10.0's 'module-init-tools' packages include (in addition
# to module-init-tools) modutils 2.4.25, 10.1 and 10.2's include 2.4.27

# Prerequisites:
# zlib
# flex (see notes below, you may need to downgrade temporarily)

cd
test -f installed/modutils-2.4.27.tar.bz2 &&
mv installed/modutils-2.4.27.tar.bz2 .
test ! -f modutils-2.4.27.tar.bz2 &&
wget ftp://ftp.kernel.org/pub/linux/utils/kernel/modutils/v2.4/\
modutils-2.4.27.tar.bz2

# Verify tarball w/ md5sum:
# (this came from my gpg-verified tarball)
echo "bac989c74ed10f3bf86177fc5b4b89b6  modutils-2.4.27.tar.bz2" | md5sum -c

# Verify tarball w/ sha1sum:
# (this also came from my gpg-verified tarball)
echo "fa268b48d98e0efab349d45fa7fb2372d58320c1  modutils-2.4.27.tar.bz2" | \
sha1sum -c

# Verify tarball w/ gpg:
( gpg --list-keys 517D0F0E > /dev/null 2>&1 || gpg --recv-keys 517D0F0E ) &&
wget -nc ftp://ftp.kernel.org/pub/linux/utils/kernel/modutils/v2.4/\
modutils-2.4.27.tar.bz2.sign &&
  gpg --verify modutils-2.4.27.tar.bz2.sign && rm modutils-2.4.27.tar.bz2.sign

mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "modutils-*" -exec rm -r {} \;
tar xjvf ~/modutils-2.4.27.tar.bz2
cd modutils-2.4.27
test $UID = 0 && chown -R root:root .

# If make fails with an error like this:
# lex.l:429: `yytext_ptr' undeclared (first use in this function)
# and you have flex 2.5.31 installed, downgrade to 2.5.27, come back here,
# run 'make distclean' then run configure and make again, then upgrade flex
# back to 2.5.31 when you're done here.  I got this error with modutils
# 2.4.26 and 2.4.27 (with flex 2.5.31).  It seems to build OK with flex
# 2.5.33.

## If you use gcc 4.x and make fails with an error like this:
# obj_kallsyms.c: In function 'obj32_kallsyms':
# obj_kallsyms.c:204: error: invalid lvalue in assignment
# obj_kallsyms.c:279: error: invalid lvalue in assignment
## apply this patch:
wget -nc http://englanders.cc/pub/linux/patches/notmine/\
modutils-gcc40.patch &&
patch -p1 < modutils-gcc40.patch

./configure --enable-zlib
make

# Become root to install it
su

test -x /sbin/removepkg && /sbin/removepkg modutils module-init-tools
make install

# If you use kmod and use the /etc/cron.(daily|hourly|monthly|weekly) dirs,
# create a /etc/cron.hourly/kmod script to run every hour unloading unused
# modules.  You can of course just add a cron job directly to root's crontab
# to do this too.
echo '#!/bin/sh' > /etc/cron.hourly/kmod
echo '/sbin/rmmod -as' >> /etc/cron.hourly/kmod
chmod 700 /etc/cron.hourly/kmod

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/modutils-*.tar.*
mv modutils-2.4.27.tar.bz2 installed/

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EST -0500)
HOWTO last updated: 2006-04-07 3:51pm
Copyright © 2001-2024 Jason Englander. All Rights reserved.
[HTML5]