Skip to contentSkip to conversation

Make modules_install doesn't create /lib/modules/$version

DISCUSSION Rob Landley 7 participants 10 messages Sep 18, 2003 – Sep 19, 2003

lore
Share & tools
lore
#0 lore raw

I've installed -test3, -test4, and now -test5, and each time make modules_install died with the following error:

Kernel: arch/i386/boot/bzImage is ready
sh arch/i386/boot/install.sh 2.6.0-test5 arch/i386/boot/bzImage System.map "" /lib/modules/2.6.0-test5 is not a directory.
mkinitrd failed
make[1]: *** [install] Error 1
make: *** [install] Error 2

I had to create the directory in question by hand, and then run it again, at which point it worked.

Am I the only person this is happening for? (Bog standard Red Hat 9 system otherwise. With Rusty's modutils...)

Rob

#1 lore raw

On Thu, 18 Sep 2003 03:21:40 -0400 Rob Landley <[email protected]> wrote:

| I've installed -test3, -test4, and now -test5, and each time make 
| modules_install died with the following error:
| 
| Kernel: arch/i386/boot/bzImage is ready
| sh arch/i386/boot/install.sh 2.6.0-test5 arch/i386/boot/bzImage System.map ""
| /lib/modules/2.6.0-test5 is not a directory.
| mkinitrd failed
| make[1]: *** [install] Error 1
| make: *** [install] Error 2
| 
| I had to create the directory in question by hand, and then run it again, at 
| which point it worked.
| 
| Am I the only person this is happening for?  (Bog standard Red Hat 9 system 
| otherwise.  With Rusty's modutils...)

Yes, I see that also.
Just running 'depmod -e -F System.map-260t5 -v 2.6.0-test5' prints:
FATAL: Could not open /lib/modules/2.6.0-test5/modules.dep.temp for writing:
No such file or directory

--
~Randy

#8 lore raw
In reply to Rob Landley
Quoted 10 lines · Rob Landley

I've installed -test3, -test4, and now -test5, and each time make modules_install died with the following error:

Kernel: arch/i386/boot/bzImage is ready
sh arch/i386/boot/install.sh 2.6.0-test5 arch/i386/boot/bzImage System.map "" /lib/modules/2.6.0-test5 is not a directory.
mkinitrd failed
make[1]: *** [install] Error 1
make: *** [install] Error 2

Quoted 2 lines

I had to create the directory in question by hand, and then run it again, at which point it worked.

I usually do:
make install
make modules_install

The first step creates the directory for me. (RH 8.0).

Sam

#2 lore raw
In reply to Randy.Dunlap

In message <[email protected]> you write:

Quoted 8 lines · On Thu, 18 Sep 2003 03:21:40 -0400 Rob Landley <[email protected]> wrote:
| I've installed -test3, -test4, and now -test5, and each time make 
| modules_install died with the following error:
| 
| Kernel: arch/i386/boot/bzImage is ready
| sh arch/i386/boot/install.sh 2.6.0-test5 arch/i386/boot/bzImage System.map ""
| /lib/modules/2.6.0-test5 is not a directory.

Looks like arch/i386/boot/install.sh is calling ~/bin/installkernel or /sbin/installkernel, which is not creating the directory.

Should depmod create the directory? It can, of course, but AFAICT the old one didn't.

Maybe a RedHat issue?

Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

#3 lore raw
Quoted 10 lines · Rusty Russell

In message <[email protected]> you write:

Quoted 8 lines · On Thu, 18 Sep 2003 03:21:40 -0400 Rob Landley <[email protected]> wrote:
| I've installed -test3, -test4, and now -test5, and each time make 
| modules_install died with the following error:
| 
| Kernel: arch/i386/boot/bzImage is ready
| sh arch/i386/boot/install.sh 2.6.0-test5 arch/i386/boot/bzImage System.map ""
| /lib/modules/2.6.0-test5 is not a directory.
Quoted 8 lines

Looks like arch/i386/boot/install.sh is calling ~/bin/installkernel or /sbin/installkernel, which is not creating the directory.

Should depmod create the directory? It can, of course, but AFAICT the old one didn't.

Maybe a RedHat issue?

Likely, it works fine here with the one we are using from debianutils.

Regards,

Signature · 1 line
Martin Schlemmer
#9 lore raw
In reply to Rob Landley
Quoted 9 lines · Rob Landley

I've installed -test3, -test4, and now -test5, and each time make modules_install died with the following error:

Kernel: arch/i386/boot/bzImage is ready
sh arch/i386/boot/install.sh 2.6.0-test5 arch/i386/boot/bzImage System.map "" /lib/modules/2.6.0-test5 is not a directory.
mkinitrd failed
make[1]: *** [install] Error 1
make: *** [install] Error 2

Quoted 4 lines

I had to create the directory in question by hand, and then run it again, at which point it worked.

Am I the only person this is happening for? (Bog standard Red Hat 9 system otherwise. With Rusty's modutils...)

I didn't see that here with Red Hat 9 system and 2.6.0-test3.

Maybe you can greb the used scripts to see which one does make (or test the existence of) the directory.

I now use the modutils package from rawhide. It also handles the creation of the new /etc/modprobe.conf file.

Bas.

#4 lore raw
In reply to Martin Schlemmer
Quoted 14 lines · Martin Schlemmer
Quoted 13 lines · Rusty Russell

In message <[email protected]> you write:

Quoted 8 lines · On Thu, 18 Sep 2003 03:21:40 -0400 Rob Landley <[email protected]> wrote:
| I've installed -test3, -test4, and now -test5, and each time make 
| modules_install died with the following error:
| 
| Kernel: arch/i386/boot/bzImage is ready
| sh arch/i386/boot/install.sh 2.6.0-test5 arch/i386/boot/bzImage System.map ""
| /lib/modules/2.6.0-test5 is not a directory.

Looks like arch/i386/boot/install.sh is calling ~/bin/installkernel or /sbin/installkernel, which is not creating the directory.

Quoted 8 lines
Quoted 5 lines

Should depmod create the directory? It can, of course, but AFAICT the old one didn't.

Maybe a RedHat issue?

Likely, it works fine here with the one we are using from debianutils.

So how come it's never been a problem on my RH boxes? (Currently RH9 + module-init-tools but none of Arjan's .rpms)

I basically do
make bzImage modules |& tee /tmp/log
grep Warning /tmp/log
su
make modules_install
make install

Creating the /lib/modules/<version> directory is the kernel's job, not installkernel (it's never done that before).

#5 lore raw
Quoted 34 lines · Mikael Pettersson
Quoted 14 lines · Martin Schlemmer
Quoted 13 lines · Rusty Russell

In message <[email protected]> you write:

Quoted 8 lines · On Thu, 18 Sep 2003 03:21:40 -0400 Rob Landley <[email protected]> wrote:
| I've installed -test3, -test4, and now -test5, and each time make 
| modules_install died with the following error:
| 
| Kernel: arch/i386/boot/bzImage is ready
| sh arch/i386/boot/install.sh 2.6.0-test5 arch/i386/boot/bzImage System.map ""
| /lib/modules/2.6.0-test5 is not a directory.

Looks like arch/i386/boot/install.sh is calling ~/bin/installkernel or /sbin/installkernel, which is not creating the directory.

Quoted 8 lines
Quoted 5 lines

Should depmod create the directory? It can, of course, but AFAICT the old one didn't.

Maybe a RedHat issue?

Likely, it works fine here with the one we are using from debianutils.

So how come it's never been a problem on my RH boxes? (Currently RH9 + module-init-tools but none of Arjan's .rpms)

I basically do
make bzImage modules |& tee /tmp/log
grep Warning /tmp/log
su
make modules_install
make install

Quoted 2 lines

Creating the /lib/modules/<version> directory is the kernel's job, not installkernel (it's never done that before).

Yes, OK, so I have not checked =) I just reacted on if installkernel form non RH misbehave or not.

So what have you tried up to now ? Does there even exist a /lib/modules/2.6.0-test5 ? If so, is it an file/something else ? What happens if you create it manually beforehand ?

Else have a look at scripts/Makefile.modinst and maybe add a few @echo's. I have not looked that closely at the build system yet.

Signature · 1 line
Martin Schlemmer
#7 lore raw
In reply to Rusty Russell
Quoted 12 lines · Rusty Russell

In message <[email protected]> you write:

Quoted 7 lines · On Thu, 18 Sep 2003 03:21:40 -0400 Rob Landley <[email protected]> wrote:
| I've installed -test3, -test4, and now -test5, and each time make
| modules_install died with the following error:
|
| Kernel: arch/i386/boot/bzImage is ready
| sh arch/i386/boot/install.sh 2.6.0-test5 arch/i386/boot/bzImage
| System.map "" /lib/modules/2.6.0-test5 is not a directory.

Looks like arch/i386/boot/install.sh is calling ~/bin/installkernel or /sbin/installkernel, which is not creating the directory.

Quoted 6 lines

Should depmod create the directory? It can, of course, but AFAICT the old one didn't.

Maybe a RedHat issue?

Rusty.

Okay, I traced through all this. The directory is never explicitly created; Red Hat's /sbin/installkernel calls /sbin/new-kernel-pkg, and deep in the bowels of that there's a call to depmod:

doDepmod() {
[ -n "$verbose" ] && echo "running depmod for $version" depmod -ae -F /boot/System.map-$version $version
}

And I had the old depmod because rusty's modutils installed themselves in /usr/local/bin, and I fixed things up by hand (missing depmod). I just did a reinstall of rusty's modutils with --prefix=/ and we'll see if that fixes things on the next kernel upgrade.

It's still kind of a nasty side effect if you ask me. I thought depmod was run AFTER the modules were installed, not to create the directory for them to install into. (My chances of figuring this one out on my own in a finite amount of time were pretty low.)

Rob

#6 lore raw
In reply to Martin Schlemmer
Quoted 5 lines · Martin Schlemmer
Quoted 4 lines · Mikael Pettersson
Quoted 3 lines · Martin Schlemmer
Quoted 2 lines · Rusty Russell

In message <[email protected]> you write:

Quoted 1 line

On Thu, 18 Sep 2003 03:21:40 -0400 Rob Landley <[email protected]>

Quoted 28 lines · wrote:
Quoted 28 lines
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
| I've installed -test3, -test4, and now -test5, and each time
| make modules_install died with the following error:
|
| Kernel: arch/i386/boot/bzImage is ready
| sh arch/i386/boot/install.sh 2.6.0-test5 arch/i386/boot/bzImage
| System.map "" /lib/modules/2.6.0-test5 is not a directory.

Looks like arch/i386/boot/install.sh is calling ~/bin/installkernel or /sbin/installkernel, which is not creating the directory.

Quoted 7 lines
Quoted 4 lines

Should depmod create the directory? It can, of course, but AFAICT the old one didn't.

Maybe a RedHat issue?

Likely, it works fine here with the one we are using from debianutils.

So how come it's never been a problem on my RH boxes? (Currently RH9 + module-init-tools but none of Arjan's .rpms)

I basically do
make bzImage modules |& tee /tmp/log
grep Warning /tmp/log
su
make modules_install
make install

Quoted 5 lines
Quoted 2 lines

Creating the /lib/modules/<version> directory is the kernel's job, not installkernel (it's never done that before).

Yes, OK, so I have not checked =) I just reacted on if installkernel form non RH misbehave or not.

The kernel isn't doing it. A script called from installkernel (in Red Hat 9) calls depmod, which has to be Rusty's new depmod or it doesn't create the directory. This means depmod is running against the OLD modules.

I've been bitten by this before, by the way. I switched from an accidental SMP kernel to a UP kernel on my laptop, and the install complained about unresolved SMP symbols in the modules. (This is how I got in the habit of doing make modules_install before make install, which I thought might also be responsible for the directory creation problem, but wasn't. Neither creates the directory: depmod does).

Rob