Problems compiling RedHat 7.2 with new kernel

Problems compiling RedHat 7.2 with new kernel

Post by Johnny Choqu » Sat, 26 Jan 2002 18:39:51



I have installed Redhat 7.2 without any problems. Afterwards, I try to
install kernel 2.4.17 following these steps:

cd /usr/src
rm -f linux-2.4
gzip -cd linux-2.4.17.tar.gz | tar xfv -
mv linux linux-2.4.17
ln -s linux-2.4.17 linux
cd linux
make mrproper
make menuconfig
* I select my hardware options with (Y)
make dep
make clean
make bzImage
make modules
make modules_install
cd arch/i386/boot
* I edit the /etc/lilo.conf
/sbin/installkernel 2.4.17 bzImage /usr/src/linux/System.map
reboot

But the options that I have configured through "make menuconfig" as network
card driver don't work because they aren't loaded by the kernel during
startup. Moreover, I have noticed that the kernel options work well when
they are fixed as modules (M), but not when I select (Y) in the config. This
problem doesn't exist with RedHat 7.1.

Somebody has any idea about this problem?

Thanks ins advance,

Johnny

 
 
 

Problems compiling RedHat 7.2 with new kernel

Post by Johnn » Sat, 26 Jan 2002 18:33:06


I have installed Redhat 7.2 without any problems. Afterwards, I try to
install kernel 2.4.17 following these steps:

cd /usr/src
rm -f linux-2.4
gzip -cd linux-2.4.17.tar.gz | tar xfv -
mv linux linux-2.4.17
ln -s linux-2.4.17 linux
cd linux
make mrproper
make menuconfig
* I select my hardware options with (Y)
make dep
make clean
make bzImage
make modules
make modules_install
cd arch/i386/boot
* I edit the /etc/lilo.conf
/sbin/installkernel 2.4.17 bzImage /usr/src/linux/System.map
reboot

But the options that I have configured through "make menuconfig" as network
card driver don't work because they aren't loaded by the kernel during
startup. Moreover, I have noticed that the kernel options work well when
they are fixed as modules (M), but not when I select (Y) in the config. This
problem doesn't exist with RedHat 7.1.

Somebody has any idea about this problem?

Thanks ins advance,

Johnny

 
 
 

Problems compiling RedHat 7.2 with new kernel

Post by bored by T » Sat, 26 Jan 2002 21:54:51


I had no problems other than a few quirks when compiling the 2.4.17
kernel and that was on a laptop with a lot of weird hardware.

Remember also to do a:

mkinitrd /boot/initrd-2.4.17.img 2.4.17

after moving the System.map and such. Made a big diff with me.

also I can't tell whether you also moved the System.map into the boot
directory and set it separate (mine is System.map-2.4.17 ), but that
could be something as well, though I think you would have bigger problems
if that were the case.

My guess is you misconfigured the kernel or something, that always gets
me from time to time. Go back, try again and make sure you have the old
kernel to boot into as a seperate stanza in lilo.onf (always shoulld do
that as a safety) in case you fluff it.

YOu might want to give some details as to your hardware though, helps...

ciao!
Daryl.



> I have installed Redhat 7.2 without any problems. Afterwards, I try to
> install kernel 2.4.17 following these steps:

> cd /usr/src
> rm -f linux-2.4
> gzip -cd linux-2.4.17.tar.gz | tar xfv - mv linux linux-2.4.17
> ln -s linux-2.4.17 linux
> cd linux
> make mrproper
> make menuconfig
> * I select my hardware options with (Y) make dep
> make clean
> make bzImage
> make modules
> make modules_install
> cd arch/i386/boot
> * I edit the /etc/lilo.conf
> /sbin/installkernel 2.4.17 bzImage /usr/src/linux/System.map reboot

> But the options that I have configured through "make menuconfig" as
> network card driver don't work because they aren't loaded by the kernel
> during startup. Moreover, I have noticed that the kernel options work
> well when they are fixed as modules (M), but not when I select (Y) in
> the config. This problem doesn't exist with RedHat 7.1.

> Somebody has any idea about this problem?

> Thanks ins advance,

> Johnny

 
 
 

Problems compiling RedHat 7.2 with new kernel

Post by ne.. » Sat, 26 Jan 2002 22:07:41



> I have installed Redhat 7.2 without any problems. Afterwards, I try to
> install kernel 2.4.17 following these steps:

> cd /usr/src
> rm -f linux-2.4

Why?????

Quote:> gzip -cd linux-2.4.17.tar.gz | tar xfv -
> mv linux linux-2.4.17
> ln -s linux-2.4.17 linux
> cd linux
> make mrproper
> make menuconfig
> * I select my hardware options with (Y)
> make dep
> make clean
> make bzImage
> make modules
> make modules_install
> cd arch/i386/boot
> * I edit the /etc/lilo.conf
> /sbin/installkernel 2.4.17 bzImage /usr/src/linux/System.map
> reboot

> But the options that I have configured through "make menuconfig" as network
> card driver don't work because they aren't loaded by the kernel during
> startup. Moreover, I have noticed that the kernel options work well when
> they are fixed as modules (M), but not when I select (Y) in the config. This
> problem doesn't exist with RedHat 7.1.

> Somebody has any idea about this problem?

First of if you read the documanetation in the kernel sources,
it says not to use /usr/src for your compiled kernels. It also
gives the reason why. Now you need to go back and reinstall all
the kernel rpms from the original installation and reboot. Then
follow the following steps:

mkdir /home/<user>/workspace
cd home/<user>/workspace
tar xzf /path/to/linux-2.4.17.tar.gz
cd linux
cp /usr/src/linux-2.4/configs/kernel-2.4.7-<your kernel>.config .config
make oldconfig
make menuconfig
* select additional stuff IFF needed.
make dep clean bzImage modules
su
rm -rf /lib/modules/2.4.17
make modules_install
cp System.map /boot/System.map-2.4.17
cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.17
* edit /etc/lilo.conf and make sure the new image pointed to
* is /boot/vmlinuz-2.4.17.
/sbin/lilo -v
reboot

And please do not post the same thing twice from different accounts.
We only need to read it once.

--
Registered Linux User # 125653 (http://counter.li.org)
Certified: 40% bastard, 22% of which is tard.
http://www.thespark.com/bastardtest

 
 
 

Problems compiling RedHat 7.2 with new kernel

Post by Timothy Murp » Sat, 26 Jan 2002 23:18:01



Quote:>Remember also to do a:
>mkinitrd /boot/initrd-2.4.17.img 2.4.17
>after moving the System.map and such. Made a big diff with me.

I don't think this is normally necessary.
(Of course it is necessary if one mentions initrd
in the lilo.conf entry for this kernel.)

I think RedHat had to include initrd with their kernel
to deal with SCSI machines (and possibly other similar problems);
but even in that case if one includes the appropriate SCSI driver
in the kernel then there is no problem.
[The point is that RedHat would have had to include _all_ SCSI drivers
in the kernel, and that would be impossible.]

--
Timothy Murphy  

tel: 086-233 6090
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

 
 
 

Problems compiling RedHat 7.2 with new kernel

Post by Timothy Murp » Sat, 26 Jan 2002 23:26:16



>First of if you read the documanetation in the kernel sources,
>it says not to use /usr/src for your compiled kernels. It also
>gives the reason why.

Where does it say this?
It seems to me completely unnecessary advice.
I've never met any problem compiling kernels in /usr/src .

I don't believe the guy's problem had anything at all to do with this.

--
Timothy Murphy  

tel: 086-233 6090
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

 
 
 

Problems compiling RedHat 7.2 with new kernel

Post by Timothy Murp » Sat, 26 Jan 2002 23:11:49


...

Quote:>cd arch/i386/boot
>/sbin/installkernel 2.4.17 bzImage /usr/src/linux/System.map

...

Isn't it easier just to say "make install" ?

--
Timothy Murphy  

tel: 086-233 6090
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

 
 
 

Problems compiling RedHat 7.2 with new kernel

Post by Paul Kimot » Sun, 27 Jan 2002 16:12:26




>> First of if you read the documanetation in the kernel sources,
>> it says not to use /usr/src for your compiled kernels.
> Where does it say this?
> It seems to me completely unnecessary advice.
> I've never met any problem compiling kernels in /usr/src .

2.4.14-pre3's README says:

:    Do NOT use the /usr/src/linux area! This area has a (usually
:    incomplete) set of kernel headers that are used by the library header
:    files.  They should match the library, and not get messed up by
:    whatever the kernel-du-jour happens to be.

However, this is not even a theoretical possibility if
/usr/include/{linux,asm} are regular directories rather than symbolic
links (this seems to be the recent trend), and in practice it doesn't
often seem to be a problem anyway.

Quote:> I don't believe the guy's problem had anything at all to do with this.

That's probably true.

--
Paul Kimoto
This message was originally posted on Usenet in plain text.  Any images,
hyperlinks, or the like shown here have been added without my consent,
and may be a violation of international copyright law.

 
 
 

Problems compiling RedHat 7.2 with new kernel

Post by Peter T. Breue » Sun, 27 Jan 2002 18:52:45





>>> First of if you read the documanetation in the kernel sources,
>>> it says not to use /usr/src for your compiled kernels.
>> Where does it say this?
>> It seems to me completely unnecessary advice.
>> I've never met any problem compiling kernels in /usr/src .
> 2.4.14-pre3's README says:
> :    Do NOT use the /usr/src/linux area! This area has a (usually
> :    incomplete) set of kernel headers that are used by the library header
> :    files.  They should match the library, and not get messed up by
> :    whatever the kernel-du-jour happens to be.

There's nothing wrong in practice with tossing that area into the junk
bay anyway.  But no, they are wrong.  The distros usually put the stuff
they are thinking of ino /usr/include/linux and /usr/include/asm,
nowadays.

Quote:> However, this is not even a theoretical possibility if
> /usr/include/{linux,asm} are regular directories rather than symbolic
> links (this seems to be the recent trend), and in practice it doesn't
> often seem to be a problem anyway.

As you say.

There is no problem in practice - it is all a political thing about
responsibilities, and there are no practical consequences for the
ordinary user.  For big corporations, maybe!  I say: put your kernel
sources in /usr/src, where you have always put them, and link from
/usr/include/linux and /usr/include/asm, as you have always linked.

Quote:>> I don't believe the guy's problem had anything at all to do with this.
> That's probably true.

Peter