LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 09-15-2003, 12:13 AM   #1
robojerk
Member
 
Registered: Jan 2003
Posts: 35

Rep: Reputation: 15
kernel for newbies


Okay, if there were a book called "Linux kernel compiling for dummies" I'd buy it. I installed Debian with the 2.4 bf kernel and wanted to try to compile a kernel. I followed the instructions " how to compile a kernel the debian way" and now I get lots of errors when I boot up wih the new kernel and my NIC no longer works. If anyone could direct me to some link or something on how to correctly make a config for a new kernel using menuconfig I'd appreciate it. I've been looking all over google and there's little detail on how to config. If I could use the kernel config as a guide to making my own I'd like to know how.
 
Old 09-15-2003, 01:27 AM   #2
LSD
Member
 
Registered: Jan 2003
Location: Northam, W.A., Australia
Distribution: Gentoo ~x86
Posts: 321

Rep: Reputation: 31
Personally, I'd avoid the "Debian Way" of compiling the kernel as it just seems like it overcomplicates the procedure to a ridiculous extreme without returning any real benefit. Just compile it the old fashioned way:

Quote:
make dep && make clean && make bzImage && make modules && make modules_install
cp arch/i386/bzImage /boot/bzImage-whatever
and make the necessary edits to your bootloader config files before recomitting it to the MBR if it needs it.

Configuration depends largely on your system configuration which is why most tutorials gloss over it, they can't provide tips for every conceivable system so they leave it up to the user. A bit harsh perhaps, but it really isn't practical to do it any other way. If you can post a log of the errors you're getting (like say, piping the output of the dmesg command into a file and then linking it somewhere on the net), along with a summary of your system specs then perhaps someone here can help you out.
 
Old 09-15-2003, 03:15 AM   #3
robojerk
Member
 
Registered: Jan 2003
Posts: 35

Original Poster
Rep: Reputation: 15
Getting internet is probably my #1 goal but when I boot up I see tons of modules failing to load. I am a complete newbie at compiling a kernel so I do appreciate your honesty on how no one goes into configuration, but compiling it was easy, to bad I need a correct configuration to have the compiled kernel to even work right. I've read the steps on how to compile the kernel several different ways, I just need the darn thing configured. =)

My system specs are:
Soyo P4x400 Ultra Mainboard
VIA P4X400/8235 chipset
NIC = RTL8139 chipset
Audio = CMI 8738
USB 2.0
Not using RAID
Not using spdif sound connector, just 2.1 stereo sound =)
Geforce fx 5200 Ultra
P4 2.26
1GB Ram
VIA OHCI compliant 1394/Firewire card
CD-RW
DVD
DVD+/- R (on USB 2.0 Connection)

Last edited by robojerk; 09-15-2003 at 03:49 PM.
 
Old 09-15-2003, 03:32 AM   #4
BittaBrotha
Member
 
Registered: Jan 2002
Location: Third Stone from the Sun
Distribution: Debian Sid, SourceMage 0.9.5, & To be Continued on a TP
Posts: 800

Rep: Reputation: 31
You first need to download two packages, so run apt-get install kernel-package and then apt-get install libncurses5-dev.

You may already have these.

Now you need to decide which version of the kernel you want to build. You can go to www.kernel.org and have the pick of the litter. Here, we're going to build 2.4.20. You can download it with apt-get install kernel-source-2.4.20.

You may use the latest kernel which is 2.4.22

After this has completed, change directories to /usr/src. Next you need to link the kernel version directory to Linux with ln -s kernel-source-2.4.20 linux . Now, change directories to Linux, and run make menuconfig. This presents you with a text-based menu where you can switch between kernel parameters. A help menu even is available for assistance if you are not sure what something means. To complete this step successfully, it is imperative that you know the intricate components that make up your laptop. Many kernel parameters are extremely specific. Be prepared to know minute details, for example, which AGP controller, sound card chipset, video card chipset, USB controller or ATA Bus adapter your laptop has.

After you have gone through the lengthy process of selecting the parameters you like, there are a few different ways to compile the kernel. One way is to run make-kpkg clean and then make-kpkg --revision yourname.1 kernel_image. This uses the make-kpkg utility, a Debian tool used to assist you with compiling kernels. It compiles the kernel and all associated modules and puts them in a .deb package one directory below your kernel source. After you have built the package you can install it with the dpkg utility. I like this because it's easy to keep multiple kernel compiles around. Especially if you are troubleshooting a problem, your latest compile may not be the best. If you're having a problem, all you have to is install an older, more successful one.

The make-kpkg method replaces the more standard six step method of


make dep
make
make bzImage
make modules
make install
make modules_install

Both techniques work, but if you are trying a kernel recompile on a non-Debian system, you do not have the make-kpkg utility at your disposal.

After you have compiled and installed your new kernel, reboot to see how its working. Don't fret if you get some random errors here and there. You can always chase those down. Your main worry is if you get to a valid prompt and the system is coming up in multi-user mode. If the system boots completely, you have jumped the first big hurdle. You can run uname -a to verify that you are indeed running the latest kernel.


This was taken from the

Debian Install on a Laptop article.

It may give you a better idea on how to do it.
 
Old 09-15-2003, 03:53 PM   #5
robojerk
Member
 
Registered: Jan 2003
Posts: 35

Original Poster
Rep: Reputation: 15
Need config help

I can get it to complile fine and it boots up fine, I just have no internet. I do see my NIC as a list of choices in the menuconfig so I select it, but it doesn't work.
 
Old 09-16-2003, 02:33 AM   #6
subnet
LQ Newbie
 
Registered: Sep 2003
Posts: 17

Rep: Reputation: 0
Net:
To fix your net use

modconf

select the kernel/drivers/net

and find the NIC you have

Hit Enter and see if the module is properly installed, else try another one..

Kernel issues:
Now that you are posting this thread under Debian distributions, why not use the apt-get to get and install the kernel..?

apt-cache search kernel-image-2.4.

Find the image that fits ur box

apt-get install kernel-image-2.4.(the one u selected)

after the compile, if you are using lilo as a bootloader, i know that you have to add the line

initrd=/initrd.img

to the image=/wmlinuz

And done..

Maybe write cat /proc/version to check your kernel version..
 
Old 09-21-2003, 12:51 AM   #7
BittaBrotha
Member
 
Registered: Jan 2002
Location: Third Stone from the Sun
Distribution: Debian Sid, SourceMage 0.9.5, & To be Continued on a TP
Posts: 800

Rep: Reputation: 31
Re: Need config help

Quote:
Originally posted by robojerk
I just have no internet. I do see my NIC as a list of choices in the menuconfig so I select it, but it doesn't work.
Did you get it working?
 
Old 09-22-2003, 12:46 PM   #8
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Rep: Reputation: 32
Well, I guess I'm a little late to this thread. I totally see what you mean rj. It would be great if someone wrote an app to help you (ie. give you advice) to get your .config together.

My guess is that, the current way it's done is:

- make sure you know what components and chipsets are in your system

- look at the output of 'dmesg'

- look at your /var/log/XFree86.0.log

- note the output of 'lspci'

- note ouput of other commands I'm missing here (like maybe glxinfo)

- and finally, read the little help sections in 'make menuconfig' for each (yes, there's a ton) option.
 
  


Reply



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
List of kernel module names (database) when helping newbies Emmanuel_uk Linux - Newbie 2 11-16-2005 07:03 AM
Kernel compiling guide for newbies... DaOne Slackware 127 04-17-2005 04:20 AM
: Kernel compiling guide for newbies Question Anibal Slackware 6 08-01-2003 07:06 AM
Newbies - B4 You Ask... cheryl Linux - Newbie 54 06-30-2003 04:04 PM
Newbies BetaPhil Linux - Software 8 05-28-2001 11:44 PM

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

All times are GMT -5. The time now is 02:40 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
Open Source Consulting | Domain Registration