LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-20-2004, 07:31 AM   #1
LordOfer
LQ Newbie
 
Registered: Jul 2004
Location: Israel
Distribution: Fedora 2
Posts: 21

Rep: Reputation: 0
Question Compiling the Pinguin


Hello people,
My goal for today is: compiling the kernel and booting the computer from the new kernel. Here is what happened so far:
----------------------------------------------------------
1) I installed Fedora 2 (including linux source).....goes smooth enogh
2) cd /usr/src/linux2....
3) make menuconfig (I just exited with the default settings)
4) make dep
5) make clean
6) make bzImage (takes a lot of time... but no errors)
7) make modules
8) make modules_install
9) added the new bzImage to /boot/grub/grub.confg
10) shutdown -r now
-----------------------------------------------------------
thats it, I followed the book step by step right? but when i started the computer from the new kernel it worked for a while, then it got stuck on a page full of errors saying things like error loading modal.... and error with magic ring withard (?!).

So what could possibly went rong??
Thanks!
Ofer
 
Old 11-20-2004, 08:35 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Quote:
9) added the new bzImage to /boot/grub/grub.confg
10) shutdown -r now
I suppose you also copied bzImage to a proper place like / or /boot, and also
System.map (while the System.map is not really necessary, but recommended thoug), to that place? And you put that path in /boot/grub/grub.confg.

Quote:
I followed the book step by step right?
Looks quite correct to me, except for using the vanilla defaults maybe.

Quote:
i started the computer from the new kernel it worked for a while, then it got stuck on a page full of errors saying things like error loading modal....
I suppose you mean something like "error loading module [...]". This is probably because you used the defaults. Where did you get the source from? Are these Fedora specific sources, or did you get the "vanilla" kernel from a kernel.org mirror?

The point is you need to have configured the right modules (or linked in options) for your hardware and configuration. Distributions e.g. fedora ship their kernels with as generic-as-possible support for most common hardware. This means almost all modules are included, and often a ramdisk created that contains the most critical modules. This way the kernel can detect what kind of chipset/disk/filesystem modules it needs, load the modules needed for that from the ramdisk, so it can access the disk and filesystem while being flexible in what drivers are needed to access the disk/filesystem that contains the root directory. Once the root directory is mounted, the kernel can load other, less boot-critical modules from the disk.

Often when people compile their own kernel for use on their own computer, they select the boot-critical drivers in "make menuconfig" or "make xconfig" to be linked into the kernel (i.e. saying [Y] to the option), and select other things they need as modules (i.e. saying [M] to the option), or also linked-in. Then there's no ramdisk needed, which makes it easier. And the kernel only has the hardware drivers that are needed for that system. This makes the kernel and the number of modules smaller.

You would probably get away with the defaults if you used a kernel configuration file (/usr/src/linux/.config) that fedora used to build their kernel, and created a ramdisk, and made sure grub knows about the ramdisk.

I think you accecpted the defaults of the standard kernel, and you were more or less lucky to be able to boot the system. Then when some process needs kernel support (say a firewall script is started, or a program tries to access some hardware like a network card or sound card). The the kernel tries to load the needed module, and cannot find it, because you didn't configured the module for your specific hardware or firewall script.

Make sure you know what hardware you have, read up on kernel-configuration (the help of "make menuconfig" goes a long way if understand waht kernels and modules are all about), and then carefully configure the thing.

Then try again.
 
Old 11-20-2004, 09:54 AM   #3
LordOfer
LQ Newbie
 
Registered: Jul 2004
Location: Israel
Distribution: Fedora 2
Posts: 21

Original Poster
Rep: Reputation: 0
thanks, will do
 
  


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
Various Compiling Errors (GCC compiling Openal, GUIlib, xmms-wma) gregorya Linux - Software 2 08-27-2004 05:03 AM
Compiling in ACPI support on Compaq 2135CA (system crashes while compiling) Dag Linux - Laptop and Netbook 20 07-30-2004 07:56 PM
Changing pinguin mokojin Slackware 4 03-06-2004 10:48 AM
Kernel compiling and module compiling tarballed Linux - General 1 12-22-2002 05:31 PM
Compiling sundog Linux - Newbie 1 07-25-2002 06:43 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:18 AM.

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