LinuxQuestions.org
Review your favorite Linux distribution.
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 10-15-2005, 02:31 PM   #1
RodWC
Member
 
Registered: Oct 2005
Distribution: Debian Etch i386, Lenny and Sid amd64
Posts: 177

Rep: Reputation: 30
Compiling a Kernel for the first time?


Hello all, I am a very fresh newbie to Linux, and have reached the very scary conclusion that I should recompile. I have a few questions.

I have kernel 2.6.8.something or other (Debian 3.1, sarge), and I was wondering if I should download a later one like 2.6.13? Or if I have to download one at all to recompile? If these questions seem dumb, it's probably because I'm still dumb with Linux! Not that I'm trying to make excuses for myself or anything . . .

I also run my Debian on a laptop, and I would like to be able to "hibernate" as booting takes longer than Windows did! I downloaded software suspend 2, but apparently have to compile it into the kernel along with ACPI or APM (or something like that). I am clueless as to how to do this. And "compile" and "recompile" are still very scary words in my Linux vocabulary. Yup, I guess I'm that green. I think I should really know how to do this though, and I can't make head or tail of many of the instructions I have come across.

Any advice?

Somewhat unrelated question, but why does "Starting MTA:" take so long during the boot?
 
Old 10-15-2005, 02:37 PM   #2
debianmike
Member
 
Registered: Sep 2005
Posts: 115

Rep: Reputation: 15
www.debian-administration/articles/202

MTA is the mail transport agent...i think it takes a while 'cause i think its looking for mail servers for the domain its in, which it cant' find, so it finally gives up...i think
 
Old 10-16-2005, 07:35 AM   #3
RodWC
Member
 
Registered: Oct 2005
Distribution: Debian Etch i386, Lenny and Sid amd64
Posts: 177

Original Poster
Rep: Reputation: 30
Okay, I got as far as "make-kpkg" in the case of which my computer tells me "command not found". So, I'm a little stuck there.

I accidentally entered "make" by itself once and it started doing something which took a lot of CPU and a long time, but it ended with a bunch of errors and never did make any file. Is 'make-kpgk' a standard thing in Debian? Cause it's not in mine!
 
Old 10-16-2005, 08:05 AM   #4
cybrog
Member
 
Registered: Oct 2005
Location: Earth
Distribution: Slackware 10.2
Posts: 60

Rep: Reputation: 15
Here'a a link to Debian-Kernel-Compile-Howto (Kernel 2.6). Maybe this will be of some help.
 
Old 10-16-2005, 08:17 AM   #5
RodWC
Member
 
Registered: Oct 2005
Distribution: Debian Etch i386, Lenny and Sid amd64
Posts: 177

Original Poster
Rep: Reputation: 30
Thanks! yes both of these articles are helpful. Once I get done, I can tell I will think it is very easy.

Anyway, I found the 'kernel-package' thing on the Debian site, so I am able to use "make-kpkg".

Whoopsie, looks like I did something wrong. It stopped while building my kernel:

KSYM .tmp_kallsyms2.S
AS .tmp_kallsyms2.o
LD vmlinux
SYSMAP System.map
SYSMAP .tmp_System.map
Inconsistent kallsyms data
Try setting CONFIG_KALLSYMS_EXTRA_PASS
make[1]: *** [vmlinux] Error 1
make[1]: Leaving directory `/usr/src/linux-2.6.13.4'
make: *** [stamp-build] Error 2
CPX:/usr/src/linux-2.6.13.4#

Could this have anything to do with it telling me that it won't compile cleanly when I patched it with the Software Suspend 2 patch? Rats, and I really wanted to be able to hibernate.
Well I guess this will have to wait as it's time for church. l

Last edited by RodWC; 10-16-2005 at 08:20 AM.
 
Old 10-16-2005, 09:01 AM   #6
cybrog
Member
 
Registered: Oct 2005
Location: Earth
Distribution: Slackware 10.2
Posts: 60

Rep: Reputation: 15
See if the information in this link helps. inconsistent kallsyms data
 
Old 10-18-2005, 02:36 PM   #7
RodWC
Member
 
Registered: Oct 2005
Distribution: Debian Etch i386, Lenny and Sid amd64
Posts: 177

Original Poster
Rep: Reputation: 30
Thank you, that did help.
I successfully compiled my first kernel in Sarge (2.6.13.4), but now it stopped detecting my network PC card on my laptop (Netgear, PCMCIA, 16bit, 100mbps, “FA411”). I did disable the ISA support in the kernel, as well as most SCSI and perhaps a few PCI. I'm almost positive I did not undo anything having to do with PC card or PCMCIA. I even compiled a second time and enabled more PCMCIA and network/ethernet stuff. Still no luck. What did I do wrong?

Any more advice?

Thanks again.
 
Old 10-18-2005, 07:01 PM   #8
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Lenny/Squeeze/Wheezy/Sid
Posts: 4,087

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
RodWC:

Some advice to a newbie:

1. Read this: how to compile a kernel in Debian until you can memorize large parts by heart.

2. Using a Debian kernel is OK. Have a recent kernel image installed, or use the one which came with the distribution (binary, not source)

3. Copy the configuration which came with your kernel to /usr/src/linux/.config (note the dot in front of config). Run make menuconfig, look around in the config program, save your new configuration. Don't change anything in the config or your source!

4. Compile the kernel according to the directions in the manual, and install the new image.

5. Try to boot from the new image, and make sure everything works as before.

If you work like this, you start from a safe point where you know that you are compiling the kernel in the correct way. Otherwise, you are trying to solve 3 problems (patching, compiling, finding the errors) at the same time. That's impossible.

I have installed many different machines which required patches, including laptops, and I always started this way. Just to make sure that the _standard_ unpatched kernel compiled and installed correctly.

Some notes on swsuspend2: It doesn't patch correctly on all kernels. Debian kernels are even more difficult. You'd might have to use a pristine kernel. Refer to the manual how to do that. Scrap making initrd, you don't need it. Using intitrd in swsusp2 is complicated.

2.6.13 didn't work on my laptop, I stuck with 2.6.12.

WARNING: Debian uses initrd as a standard. As soon as you don't use it, you get a kenrel panic because the IDE drivers are not compiled in. Make sure you add IDE drivers to the kernel in make menuconfig, and NOT as a module. This is a config file for 2.6.12 on my laptop

Take a look at http://www.tuxmobile.org and see if your laptop is mentioned there.

jlinkels
 
Old 10-18-2005, 09:13 PM   #9
RodWC
Member
 
Registered: Oct 2005
Distribution: Debian Etch i386, Lenny and Sid amd64
Posts: 177

Original Poster
Rep: Reputation: 30
Thanks, I will read through that ASAP. The thing is, I really didn't change much in the configuration (I could probably find everything I changed). When I boot the kernel, I get the message "cardmgr[I forget what number is here, would that help?]:no sockets found!" That is the only bug in the whole system as far as I can tell. It would be nice if I only had to recompile once instead of twice or more, but hey, what use is being a newbie without a little "experience"?

I will gladly accept a short-cut to fixing this, however, if anyone has experienced a similar problem.
 
Old 10-29-2005, 08:00 AM   #10
RodWC
Member
 
Registered: Oct 2005
Distribution: Debian Etch i386, Lenny and Sid amd64
Posts: 177

Original Poster
Rep: Reputation: 30
failed to load pcmcia_core

Okay, I finally got around to recompiling again. I loaded the old configuration file (from 2.6.8), and didn't change anything except to remove 3Dlabs, which was causing an error in compilation. It took nearly three hours to compile since I didn't remove anything.

But NOW I get the message (on boot up) saying that it "failed to load pcmcia_core". What now? Is it a problem with the 2.6.13.4 kernel itself?
 
Old 10-29-2005, 10:16 AM   #11
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 50
maybe pcmcia is built-in now and not compiled as a module.
If it is working but the message bothers you edit the file /etc/modules and remove the reference to pcmcia.
 
Old 10-29-2005, 12:40 PM   #12
RodWC
Member
 
Registered: Oct 2005
Distribution: Debian Etch i386, Lenny and Sid amd64
Posts: 177

Original Poster
Rep: Reputation: 30
No, pc card still is not working.
 
Old 10-31-2005, 06:55 AM   #13
RodWC
Member
 
Registered: Oct 2005
Distribution: Debian Etch i386, Lenny and Sid amd64
Posts: 177

Original Poster
Rep: Reputation: 30
Problem solved! Used the new 2.6.14 kernel. Everything is working fine now.
 
  


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
Cannot cp the bzImage. Help plz first time compiling kernel sendas4 Linux - Newbie 6 07-20-2004 12:48 AM
Compiling kernel for first time, unsure about 1 thing Nigh Unstoppabl Slackware 1 07-15-2004 04:23 AM
Setting System Time: kernel in wrong time zone warrenweiss Linux - General 7 05-15-2004 03:25 PM
Kernel Compiling time Contest! lokee General 15 05-16-2003 04:04 PM
compiling kernel/first time...issue wr3ck3d Linux - General 3 02-28-2003 09:27 PM


All times are GMT -5. The time now is 10:56 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration