Skip to contentSkip to conversation

make install problems

DISCUSSION Kevin Breit 3 participants 7 messages Sep 30, 2003 – Oct 1, 2003 Kbuild

lore
Share & tools
lore
#0 lore raw

Hey,
I setup a test6 kernel without module support. I did a make install
and got:

Kernel: arch/i386/boot/bzImage is ready
sh /usr/src/linux-2.6.0-test6/arch/i386/boot/install.sh 2.6.0-test6 arch/i386/boot/bzImage System.map "" /lib/modules/2.6.0-test6 is not a directory.
mkinitrd failed

How can I fix this?

Thanks

Kevin Breit

#1 lore raw

On Tue, 30 Sep 2003 09:16:19 -0400 Kevin Breit <[email protected]> wrote:

| Hey,
| 	I setup a test6 kernel without module support.  I did a make install
| and got:
| 
| Kernel: arch/i386/boot/bzImage is ready
| sh /usr/src/linux-2.6.0-test6/arch/i386/boot/install.sh 2.6.0-test6
| arch/i386/boot/bzImage System.map ""
| /lib/modules/2.6.0-test6 is not a directory.
| mkinitrd failed
| 
| How can I fix this?

We've seen this before, and I thought that we had determined that it was a tools problem. Is "depmod" in $PATH the depmod from modutils or the one from module-init-tools?
I.e., what does 'depmod -V' say?

and what execs mkinitrd? I don't find it with a quick grep.

--
~Randy

#2 lore raw
Quoted 14 lines · Randy.Dunlap

On Tue, 30 Sep 2003 09:16:19 -0400 Kevin Breit <[email protected]> wrote:

| Hey,
| 	I setup a test6 kernel without module support.  I did a make install
| and got:
| 
| Kernel: arch/i386/boot/bzImage is ready
| sh /usr/src/linux-2.6.0-test6/arch/i386/boot/install.sh 2.6.0-test6
| arch/i386/boot/bzImage System.map ""
| /lib/modules/2.6.0-test6 is not a directory.
| mkinitrd failed
| 
| How can I fix this?
Quoted 4 lines

We've seen this before, and I thought that we had determined that it was a tools problem. Is "depmod" in $PATH the depmod from modutils or the one from module-init-tools?
I.e., what does 'depmod -V' say?

modutils-2.4.22-8

[root@kbreit linux-2.6.0-test6]# depmod -V
depmod version 2.4.22

Quoted 1 line

and what execs mkinitrd? I don't find it with a quick grep.

No clue

Thanks

Kevin

#3 lore raw

On Tue, 30 Sep 2003 11:29:42 -0400 Kevin Breit <[email protected]> wrote:

| On Tue, 2003-09-30 at 11:14, Randy.Dunlap wrote:
| > On Tue, 30 Sep 2003 09:16:19 -0400 Kevin Breit <[email protected]> wrote:
| > 
| > | Hey,
| > | 	I setup a test6 kernel without module support.  I did a make install
| > | and got:
| > | 
| > | Kernel: arch/i386/boot/bzImage is ready
| > | sh /usr/src/linux-2.6.0-test6/arch/i386/boot/install.sh 2.6.0-test6
| > | arch/i386/boot/bzImage System.map ""
| > | /lib/modules/2.6.0-test6 is not a directory.
| > | mkinitrd failed
| > | 
| > | How can I fix this?
| > 
| > We've seen this before, and I thought that we had determined that
| > it was a tools problem.  Is "depmod" in $PATH the depmod from
| > modutils or the one from module-init-tools?
| > I.e., what does 'depmod -V' say?
| 
| modutils-2.4.22-8
| 
| [root@kbreit linux-2.6.0-test6]# depmod -V
| depmod version 2.4.22
| 
| 
| > and what execs mkinitrd?  I don't find it with a quick grep.
| 
| No clue

You need to use module-init-tools with 2.6.x, not modutils. You can find them at
http://www.kernel.org/pub/linux/kernel/people/rusty/modules/
Just get the latest version.

--
~Randy

#4 lore raw
Quoted 32 lines · Randy.Dunlap

On Tue, 30 Sep 2003 11:29:42 -0400 Kevin Breit <[email protected]> wrote:

| On Tue, 2003-09-30 at 11:14, Randy.Dunlap wrote:
| > On Tue, 30 Sep 2003 09:16:19 -0400 Kevin Breit <[email protected]> wrote:
| > 
| > | Hey,
| > | 	I setup a test6 kernel without module support.  I did a make install
| > | and got:
| > | 
| > | Kernel: arch/i386/boot/bzImage is ready
| > | sh /usr/src/linux-2.6.0-test6/arch/i386/boot/install.sh 2.6.0-test6
| > | arch/i386/boot/bzImage System.map ""
| > | /lib/modules/2.6.0-test6 is not a directory.
| > | mkinitrd failed
| > | 
| > | How can I fix this?
| > 
| > We've seen this before, and I thought that we had determined that
| > it was a tools problem.  Is "depmod" in $PATH the depmod from
| > modutils or the one from module-init-tools?
| > I.e., what does 'depmod -V' say?
| 
| modutils-2.4.22-8
| 
| [root@kbreit linux-2.6.0-test6]# depmod -V
| depmod version 2.4.22
| 
| 
| > and what execs mkinitrd?  I don't find it with a quick grep.
| 
| No clue
Quoted 4 lines

You need to use module-init-tools with 2.6.x, not modutils. You can find them at
http://www.kernel.org/pub/linux/kernel/people/rusty/modules/
Just get the latest version.

Why do I need this for a moduleless kernel?

Kevin

#5 lore raw

On Tue, 30 Sep 2003 12:18:10 -0400 Kevin Breit <[email protected]> wrote:

| On Tue, 2003-09-30 at 11:34, Randy.Dunlap wrote:
| > On Tue, 30 Sep 2003 11:29:42 -0400 Kevin Breit <[email protected]> wrote:
| > 
| > | On Tue, 2003-09-30 at 11:14, Randy.Dunlap wrote:
| > | > On Tue, 30 Sep 2003 09:16:19 -0400 Kevin Breit <[email protected]> wrote:
| > | > 
| > | > | Hey,
| > | > | 	I setup a test6 kernel without module support.  I did a make install
| > | > | and got:
| > | > | 
| > | > | Kernel: arch/i386/boot/bzImage is ready
| > | > | sh /usr/src/linux-2.6.0-test6/arch/i386/boot/install.sh 2.6.0-test6
| > | > | arch/i386/boot/bzImage System.map ""
| > | > | /lib/modules/2.6.0-test6 is not a directory.
| > | > | mkinitrd failed
| > | > | 
| > | > | How can I fix this?
| > | > 
| > | > We've seen this before, and I thought that we had determined that
| > | > it was a tools problem.  Is "depmod" in $PATH the depmod from
| > | > modutils or the one from module-init-tools?
| > | > I.e., what does 'depmod -V' say?
| > | 
| > | modutils-2.4.22-8
| > | 
| > | [root@kbreit linux-2.6.0-test6]# depmod -V
| > | depmod version 2.4.22
| > | 
| > | 
| > | > and what execs mkinitrd?  I don't find it with a quick grep.
| > | 
| > | No clue
| > 
| > You need to use module-init-tools with 2.6.x, not modutils.
| > You can find them at
| >   http://www.kernel.org/pub/linux/kernel/people/rusty/modules/
| > Just get the latest version.
| 
| Why do I need this for a moduleless kernel?

arch/i386/boot/Makefile for 'make install' runs arch/i386/boot/install.sh. This latter script runs /sbin/installkernel or ~/bin/installkernel. You (user) control the latter one (if present).
Your distro controls the former one, so I can't say what's in your system's /sbin/installkernel file.
In my /sbin/installkernel, I can see that using it with a "-i" option tells it not to generated initrd files.
YMMV.

--
~Randy

#6 lore raw
In reply to Kevin Breit
Quoted 11 lines · Kevin Breit

Hey,
I setup a test6 kernel without module support. I did a make install
and got:

Kernel: arch/i386/boot/bzImage is ready
sh /usr/src/linux-2.6.0-test6/arch/i386/boot/install.sh 2.6.0-test6 arch/i386/boot/bzImage System.map "" /lib/modules/2.6.0-test6 is not a directory.
mkinitrd failed

How can I fix this?

Make modules_install before make install.

Here's a patch to do that automatically for i386 (untested).

The problem is that Red Hat 9's kernel install script tries to make an initrd, which includes the modules directory, and barfs if it isn't there...

Makefile +1 -4
@@ -708,10 +708,7 @@
 modules modules_install: FORCE
 	@echo
 	@echo "The present kernel configuration has modules disabled."
-	@echo "Type 'make config' and enable loadable module support."
-	@echo "Then build a kernel with module support enabled."
-	@echo
-	@exit 1
+	mkdir -p $(MODLIB)  # Needed by some install scripts.
 
 endif # CONFIG_MODULES
 
arch/i386/boot/Makefile +1 -1
@@ -98,5 +98,5 @@
 	cp System.map $(INSTALL_PATH)/
 	if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
 
-install: $(BOOTIMAGE)
+install: $(BOOTIMAGE) modules_install
 	sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)"