LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-10-2002, 10:50 PM   #1
robeb
Member
 
Registered: May 2002
Posts: 113

Rep: Reputation: 15
Kernel vs Module


How can you tell when you configure the source kernel which options should be built directly into the kernel and which should be selected as modules? Is is safe to assume you should choose "yes" over "module" when you don't know the answer?

- Thanks, robeb
 
Old 08-10-2002, 11:18 PM   #2
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
Read the documentation provided with kernel, basically built in options make kernel much bigger, secondly modules are inserted and removed dynamically when system decides they are needed or not.
 
Old 08-10-2002, 11:46 PM   #3
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Just to add a bit...

As you delve into kernel building a bit more, and become a Linux bad a$$ like Neo, you will find things that are not necessary to have in your kernel, things you will never use, and will just add bloat to your system.

As a rule of thumb, these things should be "built into" the kernel:
filesystem support (for the systems filesystem, ex: ext3)
Processor support
Keyboard/mouse

And these should be modules:
Sound
USB devices
Not constantly mounted filesystems (maybe)

And to answer your last question:
"Is is safe to assume you should choose "yes" over "module" when you don't know the answer?"
I would say yes it is "safe" but no it's not necessary. If you don't know (and are doing make xconfig) you can read about what the process does right there. If you want more info, or are still unsure, type it into www.google.com/linux and see what comes up.

HTH

Cool
 
Old 08-11-2002, 01:01 AM   #4
robeb
Member
 
Registered: May 2002
Posts: 113

Original Poster
Rep: Reputation: 15
One more question, if you don't mind. Would the following link be an accurate how-to for building a kernel on Mandrake 8.2 (if your familiar with that distribution) or should I use one specifically written for Mandrake?

http://www.tldp.org/HOWTO/Kernel-HOWTO.html

- Thanks again, robeb
 
Old 08-11-2002, 01:09 AM   #5
isajera
Senior Member
 
Registered: Jun 2001
Posts: 1,635

Rep: Reputation: 45
kernels are pretty much the lowest-level most basic component of any linux distro. if you learn how to compile a kernel on mandrake, then you can do it on any distro. the HOW-TO is fine... just follow it, and, if you have any other questions on specifics, just ask us for more help. it's not nearly as hard as it sounds.
 
Old 08-11-2002, 01:22 AM   #6
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Think of kernels as ice-cream. In fact, alot people when referring to them do (sort of). If you go to www.kernel.org and d/l the latest stable kernel (2.4.19 as of now), this will be what is called "vanilla". It's a standard basic kernel. If you go to Mandy's (short for Mandrake) and get the kernel built for mandrake users, then you have a custom kernel (let's call it blueberry). It has some "extras" and such that you may find appealing, or may just confuse you. And each of the major distro producers have these custom kernels (let's call RedHat's strawberry/cheese cake swirl). Depending on your needs, and what you want to accomplish with a kernel recompile, these flavored kernels may make it a little easier for you, or not help at all.

Oh, and I am going to venture out and say that just about anything you find at www.linuxdoc.org (or www.tldp.org - same site) will work on your distro.

Cool

Last edited by MasterC; 08-11-2002 at 01:25 AM.
 
Old 08-11-2002, 01:31 AM   #7
robeb
Member
 
Registered: May 2002
Posts: 113

Original Poster
Rep: Reputation: 15
Thanks for your help, guys! I was just wondering about that because in the "Linux Kenrel How-To" it mentions installing Red Hat binaries (atleast, that's what I think they are called) in the beginning steps of the document (ie, kernel-headers*.rpm, kernel-source*.rpm). I'm just not sure if those are specific to Red Hat or if I need them for Mandrake also.

From the How-To, "Below are commands tested on Redhat Linux Kernel 2.4.7-10, but it should work for other distributions with very minor changes."

I feel like that's elementary question to ask but I just don't want forget any steps that will cause headaches later on.

- Thanks, robeb
 
Old 08-11-2002, 01:36 AM   #8
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
The rpm files are so you can compile a kernel that comes on your distro's cdrom. If you want Chocolate, then go for that. If you want vanilla, and tailor it, install those, and then get the vanilla kernel at www.kernel.org and use it. Not only will it be vanilla, but it's 2.4.19 whereas on your CD it's 2.4.18-6mdk or something like that, but it's not 2.4.19 (the latest and greatest).

Cool
 
Old 08-11-2002, 01:57 AM   #9
robeb
Member
 
Registered: May 2002
Posts: 113

Original Poster
Rep: Reputation: 15
I like vanilla. So, I'm going to install 2.4.19 and screw the distros.

Very Cool
 
Old 09-09-2002, 06:54 AM   #10
aditya
Member
 
Registered: Aug 2002
Distribution: RH 7.x
Posts: 71

Rep: Reputation: 15
Hey,
Do we really need the .rpm files, or can we just use and copy the executables in /bin and /sbin to make the root file system? My kernel has complied and running from boot floppy, but my root file system is in really bad shape. I'm following the same site of tldp.
I've pruned inittab, rc, rc.sysinit, and as well as the init.d and rc*.d directories. But on inserting the root file system floppy, I get the message:
'RAMDISK: Compressed image found at block 0',
and then the computer just stalls. Does nothing, no error messages even.
 
  


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
Can a kernel module call the function of another kernel module sceadu Programming 3 05-02-2011 02:22 AM
[Error] Kernel Module : No kernel module build environment saman007uk Debian 7 09-09-2006 06:34 PM
Unable to build NVIDIA kernel module / determin kernel version Night Ink Fedora 2 05-31-2004 04:54 PM
kernel: No module symbols loaded - kernel modules not enabled. Qucho Debian 9 05-26-2004 02:50 AM
kernel module ignorant newbie looking for any one with kernel module knowledge cpoet Slackware 4 11-24-2003 09:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:20 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