LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 08-23-2003, 05:08 AM   #1
apostglen46
LQ Newbie
 
Registered: Aug 2003
Posts: 2

Rep: Reputation: 0
Question How do i re-compile the MDK 9.0 KERNEL?


I want to recompile my (existing) kernel for architecture "athlon" so i can install the nForce2 drivers from nVIDIA.com.
 
Old 08-23-2003, 09:02 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
Hi!

You can either:
Install the kernel sources from your install CD's, this kernel will have a lot of patch levels that might be of use to you;
OR
You can go to www.kernel.org and grab the latest STABLE kernel.

Let's assume you wanna use the one off your CD's. So, locate the package:
kernel-source-2.4.19-16mdk
And install it:
urpmi kernel-source-2.4.19-16mdk

Now, if you look in /usr/src you should see 2 new entries:
Code:
lrwxr-xr-x    1 root     root           18 Dec 14  2002 linux -> linux-2.4.19-16mdk/
drwxr-xr-x   18 root     root         4096 May  4 23:10 linux-2.4.19-16mdk/
The 'linux' entry is simply a symlink to the other directory, that contains the actual kernel source. This symlink is created to assist when compiling applications against your kernel version, so the applications know what you have going on with your kernel and such.

Ok, so let's get started:

Fire up a terminal, and as root type:
cd /usr/src/linux
Then:
make xconfig

This will bring up the configuration screen for compiling a kernel. You can choose to load the current kernel's config (Load an existing configuration) which should be living at:
/boot/config-2.4.19-16mdk

So go ahead and load that up, then get started on making the necessary changes you are looking for. Be careful, since this is likely your first compile, make a few changes at a time. This may seem tedious, but will help you to see when you make a bad change. Save the kernel each time, make an entry in LILO (I'll describe this better below) and then test the new kernel. Go back, make a few more changes, rinse and repeat

If you get a complaint/error when you type 'make xconfig' feel free to post it up, or resolve the missing dependency(ies) and continue on.

After you are finished making all the changes you want to make to the kernel, save your final config to an "alternate" file, I'd say for uniformity:
/boot/config-2.4.19-custom

And now we need to edit the boot loader.

I'm going to reboot into Mandrake real quick so I can give the specific instructions for the rest of this.

Cool
 
Old 08-23-2003, 09:27 AM   #3
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
After you finish each configuration of the kernel, you'll need to do a few things. Save and exit the configurations screen, and type:
make dep &&
make clean &&
make modules &&
mv /lib/modules/2.4.19-16mdk /lib/modules/2.4.19-16mdk.old &&
make modules_install &&
make bzImage

This should take a good amount of time, even on a fast system. Once it finishes (post up any errors if you get them) you should have a kernel image smiling back at you, let's copy it to the /boot directory:
cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.19-custom
And make an initrd image:
cd /boot
mkinitrd /boot/initrd-2.4.19-custom vmlinuz-2.4.19-custom

And finally, the System.map:
cp /usr/src/linux/System.map /boot/System.map-2.4.19-custom

Fire up the Mandrake Control Center, and click 'boot' followed by Boot Config.

Click the Configure button on the right side of the screen, and we should now be in the LILO configuration menu.

Click OK on the first screen, we don't need to edit any part of the global portion of the config.

On the second screen, click "Add" Then click "Linux"

Choose an appropriate label, maybe "CustomKernel" for now. Make sure it's obviously named to show that it's not the original kernel.
The next line is the kernel image we specified above:
/boot/vmlinuz-2.4.19-custom

Root should remain the default

Append. This should have at the very least:
quiet devfs=mount

Video Mode, leave blank

And initrd should be what we made above:
/boot/initrd-2.4.19-custom

Click OK, then DONE

Now we should be back to the Mandrake Control Center. Click OK, then close it.

Reboot, and you should have the new entry for the new kernel.

Now, follow the instructions on NVIDIA's website to compile the NForce drivers.

Cool
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hydrogen compile on mdk 10.1 buzz3953 Linux - Software 4 04-19-2005 03:41 PM
MDK 10.1 - QT 3.3.3 Won't Compile DoddyUK Linux - Software 2 01-21-2005 06:14 PM
the MDK compile problem Steagr Linux - Newbie 5 12-13-2004 11:22 AM
USB Mouse/Sound no longer work after kernel compile, MDK 10, 2.6.3 Kramer Linux - Hardware 8 03-25-2004 11:49 PM
a few 2.6 compile problems on mdk 9.2 rainchill Linux - Software 1 10-16-2003 07:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 01:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration