LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Compiling the Pinguin (https://www.linuxquestions.org/questions/programming-9/compiling-the-pinguin-257184/)

LordOfer 11-20-2004 07:31 AM

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

Hko 11-20-2004 08:35 AM

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.

LordOfer 11-20-2004 09:54 AM

thanks, will do


All times are GMT -5. The time now is 08:05 PM.