Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Outdated] KC11: Kernel compiling for the beginner.
View unanswered posts
View posts from last 24 hours

 
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
wilburpan
l33t
l33t


Joined: 21 Jan 2003
Posts: 977

PostPosted: Fri Jun 06, 2003 2:58 am    Post subject: [Outdated] KC11: Kernel compiling for the beginner. Reply with quote

This FAQ has been updated and extended, please see KC11 - kernel compiling for the beginner instead

Navigation: [Kernel Compilation] [Table of Contents]

Kernel compiling for the beginner

I was a complete beginner when I first tried installing Gentoo. At that time, that was also my first attempt at compiling a kernel. These are some things I would keep in mind for any other beginners at kernel compiling:

1. It is much more important to have a working kernel than an optimized kernel at first.

Again, it is much more important to have a working kernel than an optimized kernel at first. You can always try to optimize and recompile later.

2. Keep it simple at first. All you really need to get the kernel and Gentoo going at first is what's outlined in step 15 of the install docs and networking. To reiterate the install documentation, you need to:

-- under "Code maturity level options":
    -- select "Prompt for development and/or incomplete code/drivers"

-- under "File systems":
    -- select "Virtual memory file system support (former shm fs)"
    -- select "/proc file system support"
    -- select "/dev file system support (EXPERIMENTAL)"
    -- select "Automatically mount at boot"
    -- unselect "/dev/pts file system for Unix98 PTYs"
    -- select all of the hard disk filesystems you are using (reiserfs, ext2, ext3, JFS, XFS)

The first time I got the kernel working (this was install attempt #5 for me) I literally did not include anything in the gentoo-sources kernel except for the appropriate file systems and my network card. I did not have scanner support, I didn't have printer support, but by god, I had a working system. You can always add the other stuff later.

Since I was still very much a beginner at that time, the only way that I was able to do even this simple thing was to take a pen and highlight the corresponding lines in the install doc as I set each of the above configurations in the kernel -- this way I was able to make sure that everything got done.

I would definitely make sure you get a working system that boots, recognizes your video card, mouse, keyboard and connects to the internet before worrying about your scanner, Zip drive, CD burner, and SCSI card. Remember -- these can be added later.

3. Monolithic kernel vs. modules: I would compile everything directly into the kernel at first. You can decide what can be compiled as modules later. This will avoid the problem where something that the kernel needs at boot time is actually compiled as a module. If this happens, you can't boot, since you need to boot the kernel before modules get loaded.

4. In keeping with rule #1 above, once you have installed a working kernel in your /boot partition, it would be a very good idea to install recompiled kernels, alternate kernels, development kernels, etc., as separate files. Both grub and lilo have ways of making a simple menu so that you can have multiple kernels and pick which of your kernels you want to boot.

For example, in my boot partition, I have three different kernels:

Code:
ls /boot
bzImage-2.4.20-gentoo
bzImage-2.5.69-mm8
bzImage-2.5.70-mm5
bzImage-2.4.20-gentoo.old
bzImage-2.5.69-mm8.old
bzImage-2.5.70-mm5.old

In my case I have the latest gentoo-sources kernel, the 2.5.69 mm-sources kernel, which I run most of the time, and the 2.5.70 kernel which I play around with in my ever shrinking free time.

Also note that none of the kernels have the generic "bzImage" name, and that there are backup versions of each kernel. It is a very good idea to have a quick and easy way of documenting which version of the kernel each file was compiled from.

If I recompile a kernel, I always copy my working version of that kernel to a backup file (hence the *.old files) before copying the freshly compiled kernel to the /boot partition. In this way, if my new kernel won't boot, I can always go back to my working copy.

5. Resources:


[edited to incorporate suggested changes. Thanks!]
_________________
I'm only hanging out in OTW until I get rid of this stupid l33t ranking.....Crap. That didn't work.


Last edited by wilburpan on Thu Jun 12, 2003 3:44 pm; edited 2 times in total
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16117
Location: Colorado

PostPosted: Wed Jul 23, 2003 7:20 pm    Post subject: Reply with quote

Comments on this FAQ to [FAQF] KC11: Kernel compiling for the beginner.


Thanks for the FAQ.
Back to top
View user's profile Send private message
Earthwings
Administrator
Administrator


Joined: 14 Apr 2003
Posts: 7751
Location: Karlsruhe, Germany

PostPosted: Fri Mar 30, 2007 12:23 pm    Post subject: Reply with quote

Moved from Frequently Asked Questions to Documentation, Tips & Tricks. This FAQ has been updated and extended, please see KC11 - kernel compiling for the beginner
_________________
KDE 4.14 - Get It While It's Hot!
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum