make installkernel fails due to missing modules

Trying to build a custom kernel I get the following problem:
Code:
[CMD=#]make buildkernel KERNCONF=SOMETHING[/CMD]
[i][...] (works fine)[/i]
[CMD=#]make installkernel KERNCONF=SOMETHING[/CMD]
[i][...] (goes ok initially)[/i]
===> bwn (install)
install -o root -g wheel -m 555 if_bwn.ko /boot/kernel
install: if_bwn.ko: No such file or directory
*** [_kmodinstall] Error code 71

Stop in /jails/pointyhat/rw/usr/src/sys/modules/bwn
*** [realinstall] Error code 1
[i][...] (bailing out)[/i]

Does anyone know what's going wrong here? This is on a system running 9.1-RELEASE/amd64, currently still with a GENERIC kernel. And I've tried adding the following to /etc/make.conf:
Code:
WITHOUT_MODULES=bwn
but the problem just keeps reoccurring with other modules.
 
kpa said:
Can you post or pastebin your custom kernel config.
I intend to gradually finetune the configuration. But as a starting point, it's just this:
Code:
include GENERIC

ident SOMETHING
options SUIDDIR
 
Nuke your /usr/obj completely and start over with make buildworld followed by make buildkernel. See if you get the same error then.
 
kpa said:
Nuke your /usr/obj completely
Having a peek in there before removing anything turned me onto something: I suspect it's the build jail setup that was causing problems. I've rearranged things and am rebuilding the world. To be continued...
 
Update: the problem has been fixed. It was indeed caused by how the build jail was set up.

When I peeked into /usr/obj I found a directory called rw there. Since /rw is my jail's mount point of the read-write section, I strongly suspected no such directory belonged in /usr/obj. This made me remember that there used to be issues with /usr/obj being a symlink. Perhaps I subconsciously assumed that had been fixed by now, but /usr/obj was indeed a symlink, pointing to /rw/usr/obj.

In short, I moved the jail's /usr/src to the host and nuked the jail's /usr/obj, replacing both with ordinary directories on which I null-mounted the host's /usr/{src,obj}. Now everything is peachy again.

Lesson learned: do not make /usr/obj a symlink; that still breaks stuff. And from the looks of it, the same applies to /usr/src.
 
Back
Top