Tech Support > Operating Systems > Linux / Variants > Kernel 2.4.24 to 2.6.3, doesn't modules_install
Kernel 2.4.24 to 2.6.3, doesn't modules_install
Posted by JoeAley2003 on February 22nd, 2004


Hi all.

I am trying to upgrade my kernel but the 2.6.3 does't install.

This is what i did step by step after download.

make mrproper - OK

make menuconfig - OK

Now, enalble the module loading, mark raid1 as module and exit saving.
OK

make - OK

make modules - OK

make modules_install - Error

During my first try, i got "Warning: you may install
init-module-tools", and that was what i did.
Now...

make modules_install - OK

make install - Error

mkinitrd error: " no module raid1 found for kernel 2.6.3"

What is it? I can see it compiling. I am sure that this module is
here. When i switch to "*" and "M" on make menuconfig, i can see it
compiling.

"--omit-raid-modules" can't help.
The worst problem is that it can't load any module, so even if i
choose to compile it with the kernel, it works but the others can't.
So, kernel panic "could not mount ext3" ... can't initialize ehtx...

What is it?

Why any modules can't be load?

Posted by J.O. Aho on February 22nd, 2004


JoeAley2003 wrote:
Don't seem you got the modules installed, check your /lib/modules and see if
there are any modules at all for the kernel in question.

Something you have to keep in mind, that for you have an all up to date system
(I hope you have that), don't mean that you just can get down the kernel
sourcve and build a new kernel that 2.6.x will work, there are many scripts
and tools that must be 2.6 enabled.

As you seem to be a Redhat user, I suggest you try with the Fedora Core2 RC
rpms and see what scripts/tools you must update to get 2.6 to work.

//Aho

Posted by Mike Chirico on February 22nd, 2004



"JoeAley2003" <joealey2003@yahoo.com> wrote in message
news:79d8d5b3.0402220554.6718a4e6@posting.google.c om...
See step 8 below. Maybe you're trying to mount /boot which is ext3?

Redhat 9 with 2.6 Kernel Upgrade from Source
Mike Chirico
Last Updated: Thu Feb 19 10:41:38 EST 2004

The latest version of this document can be found at:
http://prdownloads.sourceforge.net/s...6.txt?download

For configs ref:
http://sourceforge.net/project/showf...kage_id=109944



STEP 1:

Download the latest version of the kernel and any patches. This
documentation
is done with linux-2.6.3, but look for later versions.
http://www.kernel.org/pub/linux/kernel/v2.6/

Also take a look at http://www.codemonkey.org.uk/post-halloween-2.5.txt
This has some useful hints on some of the changes needed.

STEP 2:

Download the latest version of module-init-tools
[module-init-tools-3.0-pre10.tar.gz] and modutils-2.4.21-2x.src.rpm

http://www.kernel.org/pub/linux/kern...rusty/modules/

STEP 3:

Install module-init-tools. This will replace depmod [/sbin/depmod] and
other tools.

tar -zxvf module-init-tools-3.0-pre10.tar.gz cd
module-init-tools-3.0-pre10 ./configure --prefix=/sbin make make
install

STEP 4:

Install modutils-2.4.21-23.src.rpm. You'll may get warnings about user
rusty and group rusty not existing. Also, yes, you'll have to force the
install. If you don't do these steps for both Redhat 9 and Redhat 8, you'll
have problems with the make modules_install.

rpm -i modutils-2.4.21-23.src.rpm
rpmbuild -bb /usr/src/redhat/SPECS/modutils.spec
rpm -Fi /usr/src/redhat/RPMS/i386/modutils-2.4.21-23.i386.rpm

STEP 5:

Install and configure the kernel. Do NOT use the /usr/src/linux area!
Reference the README. I put my files in /home/src/kernel/

gunzip linux-2.6.3.tar.gz tar -xvf linux-2.6.3.tar cd linux-2.6.3

If you have patches install these now:

bzip2 -dc ../patch-2.6.xx.bz2 | patch -p1

STEP 6:

Copy the appropiate /usr/src/linux-2.4/configs [kernel-2.4.20-i686.config,
kernel-2.4.20-i686-smp.config] to .config in /home/src/kernel/linux-2.6.3

cp /usr/src/linux-2.4/configs/kernel-2.4.20-i686.config
/home/src/kernel/linux-2.6.3/.config

If you don't have the source configs, you can download them from here:

https://sourceforge.net/project/show...kage_id=109944

I've also included a file config2.6-chirico which was a 2.6 version for some
of my systems. This isn't a bad reference if you run into trouble.

STEP 7:

Assuming you copied the appropriate kernel-2.4 config to .config, run the
following which will run through necessary questions for the 2.6 kernel. Or,
you might want to use the config2.6-chirico...this has already been run
through make oldconfig on my system, and I've answered the necessary
questions
for a general system.

make oldconfig

STEP 8:

This is very important. Make sure you're .config has the following in it
CONFIG_EXT3_FS=y You'll run into the following error if you leave this =m
instead of =y:

pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed

This is because Redhat 9.0 and 8.0 user the ext3 filesystem for /boot ...


STEP 9:

Edit the Makefile and add changes to the Extraversion is needed. Patches
will
update these values as well.

VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 3
EXTRAVERSION = -skim-ch6

STEP 10:

make bzImage

STEP 11:

make modules

STEP 12:

make modules_install


STEP 13:

make install

If you come across errors here, what version of "depmod" is being picked
up in your path?

STEP 14:

mkdir /sys

STEP 15:

/etc/rc.sysinit needs to be modified. Look for the following line

action $"Mounting proc filesystem: " mount -n -t proc /proc /proc

and after this line enter the following:

action $"Mounting sysfs filesystem: " mount -n -t sysfs /sys /sys

Here's my /etc/rc.sysinit for reference:

http://prdownloads.sourceforge.net/s...t.txt?download



Be very careful at this step. Backup the /etc/rc.sysinit file. I didn't
need any USB support, but your configuation may need it.

Thomer [http://thomer.com/linux/migrate-to-2.6.html ] also added changes
to /etc/fstab. I did NOT have to do this. No harm in addding; you'll just
get errors when booting that it can't be mounted twice.

STEP 16:

Check the following:

a. The new image file should be installed on boot and there should be sym
link to it. My latest kernel is 2.6.3-skim-ch6, and I got the "-skim-ch6"
from the values I put in the Makefile, so I see the following:

/boot
vmlinuz -> vmlinuz-2.6.3-skim-ch6
System.map -> System.map-2.6.3-skim-ch6

/boot/grub/grub.conf Should have been automatically updated from make
install and look something like the the following:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this
file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,2)
# kernel /vmlinuz-version ro root=/dev/hda6
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,2)/grub/splash.xpm.gz
title Red Hat Linux (2.6.3-skim-ch6)
root (hd0,2)
kernel /vmlinuz-2.6.3-skim-ch6 ro root=LABEL=/
initrd /initrd-2.6.3-skim-ch6.img

b. The directory /sys exists

c. You added the mount command for sys

d. CONFIG_EXT3_FS=y was used in the .config

REFERENCES:

http://www.codemonkey.org.uk/post-halloween-2.5.txt
http://kerneltrap.org/node/view/799
http://thomer.com/linux/migrate-to-2.6.html
http://www.kernel.org/

http://bugzilla.kernel.org/
http://groups.google.com/groups?hl=e...p=linux.kernel


http://prdownloads.sourceforge.net/s...6.txt?download
http://prdownloads.sourceforge.net/s...t.txt?download
https://sourceforge.net/forum/forum.php?forum_id=353715

http://www.redhat.com/software/rhel/kernel26/



Posted by JoeAley2003 on February 23rd, 2004


First, thank you for your reply.

Second...

/lib/modules/2.6.3/kernel/drivers/md

total 204
-rw-r--r-- 1 root root 45939 Feb 23 01:43 dm-mod.ko
-rw-r--r-- 1 root root 5897 Feb 23 01:43 linear.ko
-rw-r--r-- 1 root root 55620 Feb 23 01:43 md.ko
-rw-r--r-- 1 root root 10437 Feb 23 01:43 multipath.ko
-rw-r--r-- 1 root root 9129 Feb 23 01:43 raid0.ko
-rw-r--r-- 1 root root 17870 Feb 23 01:43 raid1.ko
-rw-r--r-- 1 root root 23002 Feb 23 01:43 raid5.ko
-rw-r--r-- 1 root root 18853 Feb 23 01:43 xor.ko


The only difference i see is that files are ".ko". My 2.4 kernel is
".o"

There is a ".o" too but it in in my compilation directory.

/root/Kernel/2.6/linux-2.6.3/drivers/md/raid1.o

Hold on...

I have an idea... I will rename the directory /lib/modules/2.6.3/ to
/lib/modules/2.6.3_OLD/ and create a symlink to my compilation
direcory /root/Kernel/2.6/linux-2.6.3/

So here we go...

renaming directory with midnight comander...

creating symlink


And that's it!!!

Thank you all!!!

The web is fantastic!!!

Posted by Billy Watt on February 23rd, 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In news:79d8d5b3.0402222118.467ed98@posting.google.co m,
JoeAley2003 <joealey2003@yahoo.com> rambled:

That's because the modules are a different format, you need
module-init-tools for a 2.6 kernel instead of the modutils you used
to use for 2.4.

Billy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32) - WinPT 0.7.96rc1

iQD1AwUBQDoCGm2aRmqinBtGAQI2ngb/fz4iom6TbW/vKFBSeWC5QOyyKSrTAPlk
JVEU1znmKRemi2UUV7tVKN6Az2ZNUDgtp8NG8HRhmkERpbkuhb cFV8j6oNzUl2HO
I04v01uJKo0zKUljQNRjMXKontCBfZ2Q2mvwEmvYPKq+XN5CIE OrXFLXqCYnWqqM
YW+9CKjiJ1It3/uN8GRiHcDi33iM1oSSHQ8YcA3iznq9lco2vPRt00F9GKz+a7K9
nH/QSnfuoKpt5Tx2/lUOVoytKsFYSgsTXPlYEL9/91IEGaRA7+W0n8sjsj1WYq8k
Iz3s8sOET74=
=T+p0
-----END PGP SIGNATURE-----



Posted by Happyslayer on February 23rd, 2004



"Billy Watt" <newsspam@billywatt.plus.com> wrote in message
news:Yjn_b.9271$h44.1063591@stones.force9.net...
pointers to get the updated module-init-tools? (New to linux but learning
fast...)

Happy


<snip>



Posted by Mike Chirico on February 23rd, 2004



"Happyslayer" <happyslayer@nospam.bellsouth.net> wrote in message
news:Pnu_b.12670$Ve2.7076@bignews6.bellsouth.net.. .
See below...I've only tested on Redhat.


How to Compile 2.6 kernel for RedHat
Mike Chirico
Last Updated: Mon Feb 23 14:47:55 EST 2004

The latest version of this document can be found at:
http://prdownloads.sourceforge.net/s...6.txt?download

For configs ref:
http://sourceforge.net/project/showf...kage_id=109944



STEP 1:

Download the latest version of the kernel and any patches. This
documentation
is done with linux-2.6.3, but look for later versions.
http://www.kernel.org/pub/linux/kernel/v2.6/

Also take a look at http://www.codemonkey.org.uk/post-halloween-2.5.txt
This has some useful hints on some of the changes needed.

STEP 2:

Download the latest version of module-init-tools
[module-init-tools-3.0-pre10.tar.gz] and modutils-2.4.21-2x.src.rpm

http://www.kernel.org/pub/linux/kern...rusty/modules/

STEP 3:

Install module-init-tools. This will replace depmod [/sbin/depmod] and
other tools.

tar -zxvf module-init-tools-3.0-pre10.tar.gz cd
module-init-tools-3.0-pre10 ./configure --prefix=/sbin
make
make install
./generate-modprobe.conf /etc/modprobe.conf

STEP 4:

Install modutils-2.4.21-23.src.rpm. You'll may get warnings about user
rusty and group rusty not existing. Also, yes, you'll have to force the
install. If you don't do these steps for both Redhat 9 and Redhat 8,
you'll
have problems with the make modules_install.

rpm -i modutils-2.4.21-23.src.rpm
rpmbuild -bb /usr/src/redhat/SPECS/modutils.spec
rpm -Fi /usr/src/redhat/RPMS/i386/modutils-2.4.21-23.i386.rpm

STEP 5:

Install and configure the kernel. Do NOT use the /usr/src/linux area!
Reference the README. I put my files in /home/src/kernel/

gunzip linux-2.6.3.tar.gz tar -xvf linux-2.6.3.tar cd linux-2.6.3

If you have patches install these now:

bzip2 -dc ../patch-2.6.xx.bz2 | patch -p1

STEP 6:

Copy the appropiate /usr/src/linux-2.4/configs
[kernel-2.4.20-i686.config,
kernel-2.4.20-i686-smp.config] to .config in
/home/src/kernel/linux-2.6.3

cp /usr/src/linux-2.4/configs/kernel-2.4.20-i686.config
/home/src/kernel/linux-2.6.3/.config

If you don't have the source configs, you can download them from here:

https://sourceforge.net/project/show...kage_id=109944

I've also included a file config2.6-chirico which was a 2.6 version for some
of my systems. This isn't a bad reference if you run into trouble.

STEP 7:

Assuming you copied the appropriate kernel-2.4 config to .config, run
the
following which will run through necessary questions for the 2.6 kernel.
Or,
you might want to use the config2.6-chirico...this has already been run
through make oldconfig on my system, and I've answered the necessary
questions
for a general system.

make oldconfig

STEP 8:

This is very important. Make sure you're .config has the following in
it
CONFIG_EXT3_FS=y You'll run into the following error if you leave this
=m
instead of =y:

pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed

This is because Redhat 9.0 and 8.0 user the ext3 filesystem for /boot
....


STEP 9:

Edit the Makefile and add changes to the Extraversion is needed.
Patches will
update these values as well.

VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 3
EXTRAVERSION = -skim-ch6

STEP 10:

make bzImage

STEP 11:

make modules

STEP 12:

make modules_install


STEP 13:

make install

If you come across errors here, what version of "depmod" is being picked
up in your path?

Also, if you get a module not found, say the following:
No module aic7xxx found for kernel 2.6.x
Then, in /lib/modules/2.6.x/kernel/drivers/scsi/aic7xxx/
cp aic7xxx.ko aic7xxx.o

insmod should look for aic7xxx.ko ;but, it looks for aic7xxx.o

If you still have touble, make the following change in the .config
CONFIG_BLK_DEV_SD=y
and go back to STEP 10.

You also may want to ref
kernel-2.6.3-i686-smp-chirico-aic7xxx.config



STEP 14:

mkdir /sys

STEP 15:

/etc/rc.sysinit needs to be modified. Look for the following line

action $"Mounting proc filesystem: " mount -n -t proc /proc /proc

and after this line enter the following:

action $"Mounting sysfs filesystem: " mount -n -t sysfs /sys /sys

Here's my /etc/rc.sysinit for reference:

http://prdownloads.sourceforge.net/s...t.txt?download



Be very careful at this step. Backup the /etc/rc.sysinit file. I didn't
need any USB support, but your configuation may need it.

Thomer [http://thomer.com/linux/migrate-to-2.6.html ] also added changes
to /etc/fstab. I did NOT have to do this. No harm in addding; you'll
just
get errors when booting that it can't be mounted twice.

STEP 16:

Check the following:

a. The new image file should be installed on boot and there should be
sym
link to it. My latest kernel is 2.6.3-skim-ch6, and I got the
"-skim-ch6"
from the values I put in the Makefile, so I see the following:

/boot
vmlinuz -> vmlinuz-2.6.3-skim-ch6
System.map -> System.map-2.6.3-skim-ch6

/boot/grub/grub.conf Should have been automatically updated
from make
install and look something like the the following:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this
file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,2)
# kernel /vmlinuz-version ro root=/dev/hda6
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,2)/grub/splash.xpm.gz
title Red Hat Linux (2.6.3-skim-ch6)
root (hd0,2)
kernel /vmlinuz-2.6.3-skim-ch6 ro root=LABEL=/
initrd /initrd-2.6.3-skim-ch6.img

b. The directory /sys exists

c. You added the mount command for sys

d. CONFIG_EXT3_FS=y was used in the .config

REFERENCES:

http://www.codemonkey.org.uk/post-halloween-2.5.txt
http://kerneltrap.org/node/view/799
http://thomer.com/linux/migrate-to-2.6.html
http://www.kernel.org/

http://bugzilla.kernel.org/
http://groups.google.com/groups?hl=e...p=linux.kernel


http://prdownloads.sourceforge.net/s...6.txt?download
http://prdownloads.sourceforge.net/s...t.txt?download
http://prdownloads.sourceforge.net/s...ar.gz?download
https://sourceforge.net/forum/forum.php?forum_id=353715

http://www.redhat.com/software/rhel/kernel26



Posted by Joachim Feise on February 23rd, 2004


[followup-to set]
Happyslayer wrote on 2/23/2004 13:38:
kernel.org, in the utils directory.

For all the requirements, see the Changes file in the kernel source tree
(linux-2.6.3/Documentation/Changes)

-Joe

Posted by Happyslayer on February 24th, 2004


Sorry for the top posting, but I wanted to say that Mike's instructions,
combined with those at http://kerneltrap.org/node/view/799 were an absolute
success!

I'm running 2.6.3 on a Toshiba Satellite 1805 with 128Mb of RAM--the
difference between my 2.4 and 2.6.3 kernels is amazing! Loadup in 1/3 the
time, everything running much faster, and even the mouse goes about 3X
faster (lol...takes a little getting used to)

Wanted to say thanks for the help--I'm sure I'm going to get a lot more
intimate with kernel-hacking. The results from a sledgehammer approach
(compile it all, let the BIOS sort it out) are amazing enough.




<snip>



Posted by Gillian Hobley on March 1st, 2004


On 22 Feb 2004 05:54:04 -0800, joealey2003@yahoo.com (JoeAley2003)
wrote:


I am having some problems with this at the moment also.

http://markhobley.yi.org/linux/kerne...buildmods.html

There is a problem with the target directory for modules.dep not being
created by the kernel build tools.

Create this directory manually may solve problem.

My path names are customised, but the problem will still occur with
traditional path naming schemes.

http://markhobley.yi.org/linux/annoyances/lin01.html

I hope this helps.

Regards,

Mark.