LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   recompiled kernel and no vmlinuz.old or kernel module for Nvidia (https://www.linuxquestions.org/questions/slackware-14/recompiled-kernel-and-no-vmlinuz-old-or-kernel-module-for-nvidia-120262/)

Bruce Hill 11-26-2003 06:12 PM

recompiled kernel and no vmlinuz.old or kernel module for Nvidia
 
I installed Slackware 9.1 a couple weeks ago and life's been grand...until yesterday when I compiled and installed a new kernel. I printed and followed DaOne's newbie install guide. I've recompiled kernel's in Debian before so I even had an old .config printed for referral.

I got two problems:

First->

When I did make I got an error ->
make: *** [vmilinux] Error 1
This followed some lines about undefined reference to `ip_conntrack_module'
Since I got no xserver in Slack right now I'm typing from digital photos and using Mozilla in W2K. Will post more of that if it's needed.
Even with that error I continued the kernel compile and install.

Now I got kernel 2.4.22 but no Slack.old, and even if I use the Slack boot floppy I created on the orginal install I only get this new kernel.

Second->

$ startx
returns this error
(EE) NVIDIA (0): Failed to initialize the NVIDIA kernel module!

My video card is Nvidia GeForce FX 5200. On the original install I followed the instructions from Nvidia (basically sh NVIDIA file) and everything worked okay. I tried that with this new kernel and I got several errors.

No precompiled kernel interface was found so it wanted to contact the Nvidia site, but couldn't because of a temporary DNS error. (With the kernel compile I installed support for both my nics, but I got a static IP address in my router, but don't know where to config. Debian was /etc/network/interfaces but no such file in Slack.) Since it couldn't reach Nvidia the installer tried to compile a kernel interface but couldn't because it says->
Unable to load the kernel module `nvidia.o' . This is most likely because the kernel module was built using the wrong kernel header files. etc...
I've downloaded kernel-source-2.4.22-noarch-3.tgz but don't know how to untar this and if this is what I need to do.

A push in the right direction would be appreciated. While I could have reinstalled Slackware quicker than taking these digital photos and posting through the other OS, I wouldn't learn how to fix what I messed up that way.

DaOne 11-26-2003 07:13 PM

Just copy it to /usr/src and untar...tar xvf kernel-source-2.4.22-noarch-3.tgz

Then you can descend into the linux2.4.22 directory and compile from there. Or create a link as /usr/src/linux. Don't forget to edit the Makefile, edit Lilo, and copy your existing .config if you plan to use the config from the working kernel as a starting point.

You may then need to install the Nvidia stuff again...I know with my Radeon 9700 I have to.

Azmeen 11-26-2003 07:17 PM

OK, first things first... Every time you recompile your kernel, and made the necessary adjustments in lilo.conf, don't forget to run /sbin/lilo. Most of the time, this is the culprit.

Another thing, DaOne recommends the make install option... well, I'm from the other school of thought which believes, "If possible, make sure you do everything yourself". No offense to DaOne, I'm just a little bit paranoid when it comes to my kernel :p . So just for the sake of it, copy your new kernel (/usr/src/linux/arch/i386/boot/bzImage) over to /boot manually... along with the System.map file.

Bruce Hill 11-26-2003 07:54 PM

Thanks for the help.

I did /sbin/lilo but it didn't do the vmlinuz.old for some reason. My original Slack kernel was vmlinuz-ide-2.4.22 or something like that. Now I got only one kernel and that's the new one.

I can copy the bzImage and System.map if that's necessary. If I do that do I omit the make install step?

When I compile the kernel, do I put the vesa framebuffer?

And with the bare.i install it detected my secondary Realtek 8139 but when I compiled that and the onboard Tigon3 into the new kernel, now I got that DNS error so I assume neither nic is properly setup.

It also has a list of modules that it doesn't install as it boots, which I think is all the modules I added.

Perhaps I can get back in and edit the /etc/rc.d/rc.modules file again. Once I'm able to check a couple more things against your posts, I'll try to post back something more intelligent.

Bruce Hill 11-26-2003 09:14 PM

Quote:

Originally posted by DaOne
Just copy it to /usr/src and untar...tar xvf kernel-source-2.4.22-noarch-3.tgz

Then you can descend into the linux2.4.22 directory and compile from there. Or create a link as /usr/src/linux. Don't forget to edit the Makefile, edit Lilo, and copy your existing .config if you plan to use the config from the working kernel as a starting point.

You may then need to install the Nvidia stuff again...I know with my Radeon 9700 I have to.

I'm not totally sure I understand. Are you saying to redo the kernel compile again? And I did edit both the Makefile and lilo.conf before I started. I'll post 3 files and maybe someone can tell what I messed up.


Code:

root@paul:/usr/src# ls -aFlc
total 8
drwxr-xr-x    5 root    root          192 Nov 20 16:28 ./
drwxr-xr-x  20 root    root          704 Nov 23 08:05 ../
-rw-r--r--    1 root    root          567 Nov 20 16:28 2.4.22.nat.diff
lrwxrwxrwx    1 root    root          12 Nov 20 16:28 linux -> linux-2.4.22/
drwxr-xr-x  15 root    root          688 Nov 26 07:32 linux-2.4.22/
drwxr-xr-x    7 root    root          168 Nov 20 16:27 rpm/
drwxr-xr-x    2 root    root          432 Nov 20 16:28 xfs-2.4.22/

root@paul:/boot# ls -aFlc
total 1871
drwxr-xr-x    3 root    root          304 Nov 26 07:33 ./
drwxr-xr-x  20 root    root          456 Nov 27 09:36 ../
lrwxrwxrwx    1 root    root          21 Nov 20 16:26 System.map -> System.map-ide-2.4.22
-rw-r--r--    1 root    root      609166 Nov 20 16:26 System.map-ide-2.4.22
-rw-r--r--    1 root    root          512 Nov 20 16:51 boot.0300
lrwxrwxrwx    1 root    root          17 Nov 20 16:26 config -> config-ide-2.4.22
-rw-r--r--    1 root    root        38645 Nov 20 16:26 config-ide-2.4.22
-rw-------    1 root    root        28672 Nov 20 16:51 map
lrwxrwxrwx    1 root    root          18 Nov 20 16:26 vmlinuz -> vmlinuz-ide-2.4.22
-rw-r--r--    1 root    root      1226706 Nov 20 16:26 vmlinuz-ide-2.4.22

root@paul:/boot# pico /etc/lilo.conf
(only the applicable portion)
# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/hda8
  label = Slack
  read-only # Non-UMSDOS filesystems should be mounted read-only for checking
image = /boot/vmlinuz.old
  root = /dev/hda8
  label = Slack.old
  read-only # Non-UMSDOS filesystems should be mounted read-only for checking
# Linux bootable partition config ends
# DOS bootable partition config begins
other = /dev/hda1
  label = Windoze
  table = /dev/hda
# DOS bootable partition config ends


Azmeen 11-27-2003 12:10 AM

From your listing it seems that your make install didn't work... Did you uncomment this line in your Makefile (as instructed by DaOne):
Code:

#export INSTALL_PATH=/boot
Anyway, I'd say you'll be OK if you just do these few steps:
1) cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-new-2.4.22
2) rm /boot/System.map && cp /usr/src/linux/System.map /boot
3) Change your lilo.conf from:
Code:

image = /boot/vmlinuz.old
  root = /dev/hda8
  label = Slack.old

to:
Code:

image = /boot/vmlinuz-new-2.4.22
  root = /dev/hda8
  label = Slack.New

4) Run /sbin/lilo
5) Say prayers and reboot into new kernel at Slack.New

:)

As for the nvidia drivers, you have to run the bin file every time you recompile your kernel.

DaOne 11-27-2003 10:12 AM

I think Azmeen hit the nail on the head. If you did edit Makefile correctly, and for some reason make install doesn't work, then the above instructions will be a complete substitute for make install, and should fix the issue. Good luck.

Bruce Hill 11-28-2003 08:45 AM

Just wanted to thank you guys for the help. I've had a visitor from America, and had about 5 other computers to build/repair, plus a sick daughter; so I haven't had time to look at my Slack system again. I'll do it in the morning.

Three questions, though ->

First, before I compile again, should I remove the kernel I just compiled?

Second, could I rename vmlinuz-ide-2.4.22 as Slack.old? That was the original kernel from the Slack 9.1 bare.i installation.

Third, where do I config my two nics? I went to /etc/rc.d/rc.inet1 and /etc/rc.d/rc.netdevices but for some reason I get the error I posted before about it not being able to reach the Nvidia site that's in my first post. I don't think the new kernel is detecting either of my nics, but I don't know where to change the settings? I have a router and an ADSL modem, and I use static IP addresses through my router. My ISP assigns a dynamic address.


Sorry for the ignorance. I haven't had any time to read and won't for at least 3 more days. You don't have to do research for me, but if you remember where or how to config net devices in Slack I'd appreciate it. For some reason I believe that I've got the kernel header files, because they were apparently there in the bare.i install, and I was able to install the Nvidia drivers before with no problem. I think if I can get this new kernel on the net that Nvidia site will take care of the problem with the Nvidia kernel module.


NB: DaOne, your sig is so true!

Scruff 12-10-2003 08:51 PM

The command 'netconfig' is used to configure your connection (static IP and NIC-->ethX). Do 'lsmod' to see if you have the necessary drivers loaded for your NIC's, then if you want to specify which one to use, edit modules.conf and add an alias like "alias eth0 drivername" w/out the quotes :)
Otherwise, I think Slack will call whichever module appears first in lsmod, eth0.

Bruce Hill 12-10-2003 10:31 PM

Quote:

Originally posted by Scruff
The command 'netconfig' is used to configure your connection (static IP and NIC-->ethX). Do 'lsmod' to see if you have the necessary drivers loaded for your NIC's, then if you want to specify which one to use, edit modules.conf and add an alias like "alias eth0 drivername" w/out the quotes :)
Otherwise, I think Slack will call whichever module appears first in lsmod, eth0.

Thanks, Scruff - and Happy Birthday! I was trying to do too many things at once and couldn't remember 'netconfig'. I ran it the next day after that post and all is well :D

I've got my new kernel compiled - finally. Here's what I did ->

First, the make install step in DaOne's newbie install guide didn't work for me - on two attempts. So I used the method Azmeen suggested, of omitting make install and copying the bzImage and editing LILO by hand. This works great. Here is what my /boot looks like ->
Code:

mingdao@paul:~$ ls -aFlc /boot
total 4251
drwxr-xr-x    3 root    root          384 Dec  7 18:25 ./
drwxr-xr-x  20 root    root          456 Dec 11 07:09 ../
lrwxrwxrwx    1 root    root          21 Dec  2 02:43 System.map -> System.map-ide-2.4.22
-rw-r--r--    1 root    root      609166 Dec  2 02:43 System.map-ide-2.4.22
-rw-r--r--    1 root    root      697857 Dec  7 18:23 System.map-new-2.4.23
-rw-r--r--    1 root    root          512 Dec  2 06:05 boot.0300
lrwxrwxrwx    1 root    root          17 Dec  2 02:43 config -> config-ide-2.4.22
-rw-r--r--    1 root    root        38645 Dec  2 02:43 config-ide-2.4.22
-rw-------    1 root    root        47104 Dec  7 18:25 map
lrwxrwxrwx    1 root    root          18 Dec  2 02:43 vmlinuz -> vmlinuz-ide-2.4.22
-rw-r--r--    1 root    root      1226706 Dec  2 02:43 vmlinuz-ide-2.4.22
-rw-r--r--    1 root    root      1715369 Dec  7 18:19 vmlinuz-new-2.4.23

And I didn't have to omit my old kernel, either, I just put an entry for each one in /etc/lilo.conf like this ->
Code:

# Linux bootable partition config begins
image = /boot/vmlinuz-new-2.4.23
  root = /dev/hda8
  label = Slack-2.4.23
  read-only # Non-UMSDOS filesystems should be mounted read-only for checking

image = /boot/vmlinuz-ide-2.4.22
  root = /dev/hda8
  label = Slack-2.4.22
  read-only

# Linux bootable partition config ends

The command tar xvf as suggested in another post (Just copy it to /usr/src and untar...tar xvf kernel-source-2.4.22-noarch-3.tgz) does not work. You must do installpkg <filename> with .tgz files.

I tried to build the kernel using installpkg with kernel-source-2.4.23-noarch-2.tgz (and omitted make install) but when I finished and wanted to copy the bzImage file to /boot it wasn't in /usr/src/linux/arch/i386/boot. Instead, there was a file (vmlinux-2.4.23*) in /usr/src/linux - with that asterisk beside it. I tried to copy that to /boot but it wouldn't work. When I ran lilo it said the image was too large. Maybe that's how you have to get the make install step to work properly - using the .tgz kernel and installpkg? I don't know.

Can someone tell me if I should use the kernel-source .tgz file with that compile guide, or a .bz2 file? And has anyone tried compiling a kernel in Slack 9.1 with those instructions? Just curious. I've put Knoppix on my wife and daughter's comp temporarily, but will install Slack when I get the time. I'll try that guide again, maybe this time using installpkg with the .tgz file, and see how it works.

I'm new and still reading and learning. :study:

There's only so many hours in a day, and sometimes I have to "use my computer to do work" rather than "work on my computer to use it" so I have to boot into Windoze and get the job done.

Scruff 12-10-2003 10:40 PM

Quote:

Originally posted by Chinaman
Thanks, Scruff - and Happy Birthday! I was trying to do too many things at once and couldn't remember 'netconfig'. I ran it the next day after that post and all is well :D

Thanks :D

As for installing that kernel.tgz, what happens is: when you did installpkg kernel.tgz, it simply installed the source in the /usr/src directory. I think it still needs to be compiled after that to create the bzImage. That's how I did it anyway, when I used Slack 9.0 (with 2.4.20) and installed the .tgz for 2.4.22.. I couldn't get UDMA to work properly with 2.4.20 on my hardware.

Thats weird though that DaOne's guide didn't work out for you. I still refer to it and it's worked for me every time (though I have taken to manually copying the new image lately).

Thanks for that guide by the way, DaOne :D

Scruff 12-11-2003 12:02 AM

Check this out: http://linuxtoday.com/security/2003120203026SCKNSL
Looks like you can upgrade your kernel to 2.4.23 by using 'upgradepkg kernelname.tgz' then upgrading the necessary packages along with it. I learn something new about pkgtool all the time! It's quite a bit more useful than I initially thought. I assume this could also be accomplised a bit more 'automatic' by just using Swaret to update.

Azmeen 12-11-2003 02:24 AM

Quote:

Originally posted by Scruff
Check this out: http://linuxtoday.com/security/2003120203026SCKNSL
Looks like you can upgrade your kernel to 2.4.23 by using 'upgradepkg kernelname.tgz' then upgrading the necessary packages along with it. I learn something new about pkgtool all the time! It's quite a bit more useful than I initially thought. I assume this could also be accomplised a bit more 'automatic' by just using Swaret to update.

Yep, this would be the easiest way if you use the "stock" kernel supplied by Slack.

And remember to run lilo after upgradepkg'ing :)

Bruce Hill 12-11-2003 02:36 AM

I must read about Swaret and pkgtool. I'm itching to install Slack on the wife and daughter's comp, but I really need to get mine fully functional as a "work"station first. I will try that method.

Thanks for all of your help. I still want to know what went wrong with following the compile guide that DaOne has posted. It seems to have worked for so many people, so I must have done something wrong.

Has anyone used this verbatim with Slack 9.1?


All times are GMT -5. The time now is 04:25 AM.