Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] How do I make and install modules?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
utente
n00b
n00b


Joined: 12 Aug 2005
Posts: 17

PostPosted: Sun Aug 14, 2005 6:53 pm    Post subject: [Solved] How do I make and install modules? Reply with quote

OK, being a clueless noob as I am, let me ask the plain question...

Things I did:
I configured a 2.6.12-r8 kernel on an AMD64 platform with module support;
Configured some minor options (parallel port, gameport, TV cards and something else) to build as modules;
Done "make bzImage", "make modules", "make modules_install";
"cp arch/x86_64/boot/bzImage /boot/kernel-2.6.12-gentoo-r8";
"cp .config /boot/config-2.6.12-gentoo-r8";
"rm /etc/modules.d/kernel-2.6";
created above file as new with the list of modules just built (find /lib/modules/2.6.12-gentoo-r8/ -name ecc.ecc.); (UHM didn't took full pathnames, only module filenames as stated in the gentoo installation guide...)
"modules-update";
rebooted system.
Result: NOT A SINGLE MODULE LOADS at boot time ("FATAL: Module xxx not found" for each one). After the boot, the system is working but /proc/modules is empty, /proc/ksyms does not exist, there is no way to load any module with insmod or modprobe.

What did I do wrong?


Last edited by utente on Mon Aug 15, 2005 1:48 am; edited 2 times in total
Back to top
View user's profile Send private message
Dlareh
Advocate
Advocate


Joined: 06 Aug 2005
Posts: 2102

PostPosted: Sun Aug 14, 2005 7:03 pm    Post subject: Reply with quote

Code:
uname -r
mount /boot
$EDITOR /boot/grub/grub.conf

_________________
"Mr Thomas Edison has been up on the two previous nights discovering 'a bug' in his phonograph." --Pall Mall Gazette (1889)
Are we THERE yet?
Back to top
View user's profile Send private message
utente
n00b
n00b


Joined: 12 Aug 2005
Posts: 17

PostPosted: Sun Aug 14, 2005 7:09 pm    Post subject: Reply with quote

uname -r returns "2.6.12-gentoo-r8".
The running kernel is the right one (the last I compiled), since uname -a returns the right timestamp...
other clues?
Back to top
View user's profile Send private message
Dlareh
Advocate
Advocate


Joined: 06 Aug 2005
Posts: 2102

PostPosted: Sun Aug 14, 2005 7:17 pm    Post subject: Reply with quote

Code:
lsmod
modprobe -ls
modprobe foo
lsmod

_________________
"Mr Thomas Edison has been up on the two previous nights discovering 'a bug' in his phonograph." --Pall Mall Gazette (1889)
Are we THERE yet?
Back to top
View user's profile Send private message
utente
n00b
n00b


Joined: 12 Aug 2005
Posts: 17

PostPosted: Sun Aug 14, 2005 7:26 pm    Post subject: Reply with quote

lsmod:
Module Size Used by
(nothing)

modprobe -ls:
the full content of /etc/modules.d/kernel-2.6 file, verbatim, but in reverse order (first rows last and vice versa)

modprobe foo:
FATAL: Module foo not found.

lsmod:
Module Size Used by
(nothing)

I put in /etc/modules.d/kernel-2.6 the full pathnames for each module, rebooting system now... BRB few minutes
Back to top
View user's profile Send private message
freelight
Apprentice
Apprentice


Joined: 12 Jun 2004
Posts: 295
Location: NYC, NY, USA

PostPosted: Sun Aug 14, 2005 7:33 pm    Post subject: Reply with quote

Are you sure you did make modules_install? See if the modules are actually present:
ls -R /lib/modules/2.6.12-gentoo-r8/
Back to top
View user's profile Send private message
utente
n00b
n00b


Joined: 12 Aug 2005
Posts: 17

PostPosted: Sun Aug 14, 2005 7:46 pm    Post subject: Reply with quote

Yes I am sure... modules are where they are supposed to be.


ls -R /lib/modules/2.6.12-gentoo-r8:

/lib/modules/2.6.12-gentoo-r8/:
build modules.ccwmap modules.inputmap modules.symbols video
kernel modules.dep modules.isapnpmap modules.usbmap
modules.alias modules.ieee1394map modules.pcimap source

/lib/modules/2.6.12-gentoo-r8/kernel:
crypto drivers fs lib net sound

/lib/modules/2.6.12-gentoo-r8/kernel/crypto:
aes.ko blowfish.ko crc32c.ko md4.ko sha256.ko tgr192.ko
anubis.ko cast5.ko crypto_null.ko michael_mic.ko sha512.ko twofish.ko
arc4.ko cast6.ko khazad.ko serpent.ko tea.ko wp512.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers:
bluetooth ieee1394 input md media message mmc net scsi usb video

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/bluetooth:
bcm203x.ko bfusb.ko bpa10x.ko hci_uart.ko hci_usb.ko hci_vhci.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/ieee1394:
eth1394.ko ieee1394.ko ohci1394.ko video1394.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/input:
joystick mouse

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/input/joystick:
adi.ko grip.ko interact.ko stinger.ko warrior.ko
db9.ko grip_mp.ko magellan.ko tmdc.ko
gamecon.ko guillemot.ko sidewinder.ko turbografx.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/input/mouse:
sermouse.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/md:
raid5.ko raid6.ko xor.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/media:
common dvb video

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/media/common:
saa7146.ko saa7146_vv.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/media/dvb:
b2c2 bt8xx cinergyT2 dibusb frontends ttpci ttusb-budget ttusb-dec

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/media/dvb/b2c2:
b2c2-flexcop.ko b2c2-flexcop-pci.ko b2c2-flexcop-usb.ko skystar2.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/media/dvb/bt8xx:
bt878.ko dst_ca.ko dst.ko dvb-bt8xx.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/media/dvb/cinergyT2:
cinergyT2.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/media/dvb/dibusb:
dvb-dibusb.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/media/dvb/frontends:
cx22700.ko dib3000mc.ko nxt2002.ko sp887x.ko tda1004x.ko
cx24110.ko l64781.ko nxt6000.ko stv0297.ko tda8083.ko
dib3000-common.ko mt312.ko or51211.ko stv0299.ko ves1820.ko
dib3000mb.ko mt352.ko sp8870.ko tda10021.ko ves1x93.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/media/dvb/ttpci:
budget-av.ko budget-core.ko budget-patch.ko ttpci-eeprom.ko
budget-ci.ko budget.ko dvb-ttpci.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/media/dvb/ttusb-budget:
dvb-ttusb-budget.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/media/dvb/ttusb-dec:
ttusbdecfe.ko ttusb_dec.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/media/video:
bw-qcam.ko c-qcam.ko saa5246a.ko saa5249.ko saa7134 tuner-3036.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/media/video/saa7134:
saa6752hs.ko saa7134-empress.ko saa7134.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/message:
i2o

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/message/i2o:
i2o_block.ko i2o_config.ko i2o_scsi.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/mmc:
mmc_block.ko mmc_core.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/net:
8139cp.ko bsd_comp.ko ppp_deflate.ko pppox.ko slhc.ko
8139too.ko ne2k-pci.ko ppp_generic.ko ppp_synctty.ko wireless
8390.ko ppp_async.ko pppoe.ko s2io.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/net/wireless:
atmel.ko hermes.ko orinoco_pci.ko orinoco_tmd.ko strip.ko
atmel_pci.ko orinoco.ko orinoco_plx.ko prism54

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/net/wireless/prism54:
prism54.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/scsi:
aic7xxx sr_mod.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/scsi/aic7xxx:
aic79xx.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/usb:
class image input media misc

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/usb/class:
cdc-acm.ko usb-midi.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/usb/image:
mdc800.ko microtek.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/usb/input:
aiptek.ko wacom.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/usb/media:
dabusb.ko ov511.ko pwc se401.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/usb/media/pwc:
pwc.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/usb/misc:
rio500.ko usblcd.ko usbled.ko

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/video:
backlight

/lib/modules/2.6.12-gentoo-r8/kernel/drivers/video/backlight:
backlight.ko lcd.ko

/lib/modules/2.6.12-gentoo-r8/kernel/fs:
coda hfs hfsplus hpfs ntfs romfs udf ufs

/lib/modules/2.6.12-gentoo-r8/kernel/fs/coda:
coda.ko

/lib/modules/2.6.12-gentoo-r8/kernel/fs/hfs:
hfs.ko

/lib/modules/2.6.12-gentoo-r8/kernel/fs/hfsplus:
hfsplus.ko

/lib/modules/2.6.12-gentoo-r8/kernel/fs/hpfs:
hpfs.ko

/lib/modules/2.6.12-gentoo-r8/kernel/fs/ntfs:
ntfs.ko

/lib/modules/2.6.12-gentoo-r8/kernel/fs/romfs:
romfs.ko

/lib/modules/2.6.12-gentoo-r8/kernel/fs/udf:
udf.ko

/lib/modules/2.6.12-gentoo-r8/kernel/fs/ufs:
ufs.ko

/lib/modules/2.6.12-gentoo-r8/kernel/lib:
crc-ccitt.ko libcrc32c.ko

/lib/modules/2.6.12-gentoo-r8/kernel/net:
8021q bluetooth decnet llc sched

/lib/modules/2.6.12-gentoo-r8/kernel/net/8021q:
8021q.ko

/lib/modules/2.6.12-gentoo-r8/kernel/net/bluetooth:
bnep hidp l2cap.ko rfcomm sco.ko

/lib/modules/2.6.12-gentoo-r8/kernel/net/bluetooth/bnep:
bnep.ko

/lib/modules/2.6.12-gentoo-r8/kernel/net/bluetooth/hidp:
hidp.ko

/lib/modules/2.6.12-gentoo-r8/kernel/net/bluetooth/rfcomm:
rfcomm.ko

/lib/modules/2.6.12-gentoo-r8/kernel/net/decnet:
decnet.ko

/lib/modules/2.6.12-gentoo-r8/kernel/net/llc:
llc2.ko

/lib/modules/2.6.12-gentoo-r8/kernel/net/sched:
sch_cbq.ko sch_hfsc.ko sch_htb.ko

/lib/modules/2.6.12-gentoo-r8/kernel/sound:
core drivers

/lib/modules/2.6.12-gentoo-r8/kernel/sound/core:
oss seq

/lib/modules/2.6.12-gentoo-r8/kernel/sound/core/oss:
snd-mixer-oss.ko snd-pcm-oss.ko

/lib/modules/2.6.12-gentoo-r8/kernel/sound/core/seq:
oss snd-seq.ko snd-seq-midi.ko
snd-seq-device.ko snd-seq-midi-event.ko snd-seq-virmidi.ko

/lib/modules/2.6.12-gentoo-r8/kernel/sound/core/seq/oss:
snd-seq-oss.ko

/lib/modules/2.6.12-gentoo-r8/kernel/sound/drivers:
mpu401 snd-dummy.ko snd-serial-u16550.ko snd-virmidi.ko

/lib/modules/2.6.12-gentoo-r8/kernel/sound/drivers/mpu401:
snd-mpu401.ko

/lib/modules/2.6.12-gentoo-r8/video:
fglrx.ko

Putting full pathname in the /etc/modules.d/kernel-2.6 file didn't solved anything, I got the same errors.
Tried the same "lsmod + modprobe -ls + modprobe foo + lsmod" command sequence as above: same result. No change.
Back to top
View user's profile Send private message
utente
n00b
n00b


Joined: 12 Aug 2005
Posts: 17

PostPosted: Sun Aug 14, 2005 8:11 pm    Post subject: Reply with quote

UPDATE: after rebooting, now there is ONE module installed!!! 8O

lsmod:
Module Size Used by
ntfs 89664 1

Funny though... I configured NTFS support NOT to be modulixed, but builtin the kernel... :?:

Tried MODPROBE FOO: same old error: FATAL: Module foo not found...
Back to top
View user's profile Send private message
utente
n00b
n00b


Joined: 12 Aug 2005
Posts: 17

PostPosted: Sun Aug 14, 2005 11:22 pm    Post subject: Reply with quote

UPDATE: at last I discovered that the file /lib/modules/2.6.12-gentoo-r8/modules.dep was empty.
So I ran depmod but it didn't had effect on modules.dep: so I did

depmod -n > /root/modulesdep.raw

to get a file to edit, to craft a working copy of modules.dep... and after doing this and edited the raw copy I take a look to the original modules.dep and... there were all of the dependency data! 8O I think there is something wrong with my depmod exe... however, now modprobe <module> works, modules are loaded and unloaded correctly and lsmod shows loaded modules. But, but... autoload script at boot still fails miserably to load any module :? Oh well... maybe I should erase all that gentoo modules crap and write a good old "modprobe x modprobe y modprobe z..." script :wink:
Back to top
View user's profile Send private message
Dlareh
Advocate
Advocate


Joined: 06 Aug 2005
Posts: 2102

PostPosted: Sun Aug 14, 2005 11:39 pm    Post subject: Reply with quote

put your good ol' modprobe x modprobe y modprobe z stuff in /etc/conf.d/local.start
_________________
"Mr Thomas Edison has been up on the two previous nights discovering 'a bug' in his phonograph." --Pall Mall Gazette (1889)
Are we THERE yet?
Back to top
View user's profile Send private message
utente
n00b
n00b


Joined: 12 Aug 2005
Posts: 17

PostPosted: Mon Aug 15, 2005 1:48 am    Post subject: Reply with quote

FINAL UPDATE: now it's (almost) all OK.

Putting only the module names (no path & no extension) in the /etc/modules.autoload.d/kernel-2.6 fixed the autoload problem too. Now it's just the module fglrx (ATI RADEON graphic drivers) that refuses to load, but this should be another story...
I hope this thread be useful to someone else :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum