From: Jeremy Utley <[EMAIL PROTECTED]>
Reply-To: LFS Support List <[email protected]>
To: LFS Support List <[email protected]>
Subject: Re: Easy way to config kernel?
Date: Wed, 09 Mar 2005 21:23:52 -0800

lin q wrote:

Hi,
I am to run "make menuconfig", the options are so huge, i am afraid to make mistakes and hard to figure out in later period.


My host currently runs Fedora Core 1, I wonder if somewhere I can find a good reference to config the kernel? Image that in installing, Fedora already figured out the correct config...

Thanks.

Here's my own "Beginners" guide to kernel configuration.

1) Use the help documentation (when in menuconfig, hit the ? key) - often in the description of the different options, it will say "If unsure, say blah" - follow this advice

2) On a machine for which I've never compiled a kernel before, I *ALWAYS* boot up a Knoppix CD first, and run /sbin/lsmod. Since Knoppix compiles most of it's support as modules, and has extremely good hardware detection, using this option will often tell you just which drivers will work for the different pieces of your system, and that's better than half the battle.

3) Until you become more comfortable with compiling the kernel, don't use modules - compile everything into the kernel - it definately makes things a lot easier.

4) Whatever filesystem you have used for your root filesystem (ext2, ext3, reiserfs, xfs, jfs) must be compiled into the kernel. Make sure you also enable the /proc virtual filesystem (that's a default option usually), and the tmpfs filesystem (sometimes called shmfs as well)

5) Sometimes, but not always, on your host you'll find a file "/proc/config.gz" - this will contain a compressed copy of the config file for that kernel - you can utilize this by doing "zcat /proc/config.gz > .config" followed by "make oldconfig"

There you go, a few tips to hopefully get you on your way - after a few times, you'll become an old hand at kernel compilation.

-J-

--
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Hello All,
Thanks for your replies. Now I have the kernel compiled, but there are some problem in booting it.


 My computer is like this partition:

Partition Mount point Partition type
1 /boot ext2
2 / ext2
3 /mnt/mybld ext2
4 /swap Linux swap


I installed Fedora Core 1 to root and tryig to build my linux on /mnt/mybld.

In config the kernel, I enable all the options, no model is used. And as you suggested, I enabled ext2 and tmpfs File Systems, actually they are on by default.

After I compiled the kernel, I copy bzImage to /boot/my_bld_image. Then I edit /boot/grub/grub.conf like this,

default=0
timeout=10
splashimage=(hdo,0)/grub/splash.xpm.gz
title Fedora Core -1(2.4.22-1.2115.nptl)
root(hd0,0)
kernel /vmlinuz-2.4.22-1.2115.nptl ro root=LABEL=/ rhgb ide=nodma
========= this above is the old file, I add the following ====================
title My Build
root(hd0,0)
kernel /my_bld_image ro root=/mnt/mybld LABEL=/ rhgb ide=nodma



Then I re-boot the machine, as expected I see "My Build" as the 2nd option in GRUB menu, I select it, I see the screen scroll fast and I do see that the Samsung CD-ROM is found and some PCI message looks correct. At last it stops with the following messages.


  VFS: Can not open root device "mnt/mybld" or 00:00
  Please append a corrent "root=" boot option
  Kernel panic

 It seems like " root=/mnt/mybld" has problem, but I do not see the reason.

I check /boot and find that there are a couple soft links there, vmlinuz and System.map, which point to the exact Fedora Linux kernel image and system map files respectively.

  I wonder if this is something I should do?

Thanks.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


--
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to