Getting the base configuration file
Getting the base configuration file
The base configuration that is recommended is what we’re going to call a a kernel “seed”, these are from kernel-seeds.org which are created and maintained by Pappy Mcfae
Currently there is none specifically for the zen kernel, but a vanilla one will suffice
First of all, be in your kernel source directory (if you couldn’t figure that out yourself you should probably quit the tutorial for now) – then pick the kernel “vanilla” seed by navigation on THIS page. (pick 32 or 64-bit, then find the configuration for the most modern/matching vanilla version)
I’ll be demonstrating an example with a 18.104.22.168 64_bit configuration for the 2.6.31-zen8 kernel, obviously yours may vary.
cd /usr/src/linux-2.6-zen wget http://kernel-seeds.org/seeds/64_bit/vanilla/22.214.171.124-x86_64-07.config # Move the config file to ".config" mv 126.96.36.199-x86_64-07.config .config
Now since the seed isn’t made for our specific kernel version (it’s not even made for the zen kernel at all), you want to run a “make oldconfig” which will prompt all new options in the kernel version (Some of the code that zen has but 188.8.131.52 doesn’t in this case)
make oldconfig # Answer y/n/m/? to all of the prompt, this isn't required -- just recommended
Choosing some custom options
The options chosen in the kernel seed are basic, and it doesn’t include any drivers or file systems generally. There are probably some options you want to customize that are basic, here are some defaults and recommendations for the Zen Kernel if it is being used on a desktop, you can choose any of these if you desire – they are recommended for best desktop performance
Remember! You can search in menuconfig by typing “/”
CONFIG_CPU_BFS=y # BFS is recommended for every desktop system without 4096 CPUs CONFIG_CPU_BFS_AUTOISO=y # Will run X as sched_iso automatically, but not other applications # you can run apps as sched_iso with "schedtool -I appname" # CONFIG_CPU_CFS=n
CONFIG_NO_HZ=n # set to N on a desktop system, Y on a notebook environment where battery life is important
CONFIG_HZ=1000 # 1000HZ for any desktop system, 100/250 is sufficient for a server system
CONFIG_DEFAULT_IOSCHED=”bfq” # BFQ has been tested to be the best performer on most file systems and in most scenarios
# I/O scheduler can be changed at boot time or during run time as well
CONFIG_PREEMPT=y # NOT Voluntary in ANY situation, PREEMPT_NONE on server systems
CONFIG_PREEMPT_RCU # 2.6.31 only, in 2.6.31 CONFIG_PREEMPT_TREE_RCU, and adjust the fanout based on the help option
CONFIG_FRAME_POINTER=y # Will provide useful debugging traces if you encounter a bug
# Will make binary sizes slightly bigger, un-measurable speed decrease (you won’t notice a thing, so ENABLE IT!)
# IF set to N then you will get useless traces that will make debugging impossible
# This should never be enabled when using a Zen kernel or ANY kernel for that matter
Those are simply general recommendations for the best performance/results. Frame pointers are criticial if you ever hit a bug, and they won’t affect your system speed by a measurable margin.
Configuring CPU Options, Drivers, and File Systems
Ok, only you can know your CPU options, you need to do a “cat /proc/cpuinfo” any options here will be found in “Processor Types and Features”. Things such as power management, suspend, or tuxonice you should configure/set up yourself (no explanation is needed because everybody will use different things)
To determine your drivers execute the following:
Wait a minute! That gave me junk!
A: No, it’s useful and should look something like this
00:00.0 0600: 8086:277c (rev c0) 00:01.0 0604: 8086:277d (rev c0) 00:1c.0 0604: 8086:27d0 (rev 01) 00:1c.4 0604: 8086:27e0 (rev 01) 00:1c.5 0604: 8086:27e2 (rev 01) 00:1d.0 0c03: 8086:27c8 (rev 01) 00:1d.1 0c03: 8086:27c9 (rev 01) 00:1d.2 0c03: 8086:27ca (rev 01) 00:1d.3 0c03: 8086:27cb (rev 01) 00:1d.7 0c03: 8086:27cc (rev 01) 00:1e.0 0604: 8086:244e (rev e1) 00:1f.0 0601: 8086:27b8 (rev 01) 00:1f.1 0101: 8086:27df (rev 01) 00:1f.2 0101: 8086:27c0 (rev 01) 00:1f.3 0c05: 8086:27da (rev 01) 01:00.0 0300: 10de:0292 (rev a1) 03:00.0 0200: 10ec:8168 (rev 01) 04:00.0 0106: 197b:2360 (rev 02) 05:00.0 0401: 1102:0008 05:03.0 0c00: 1106:3044 (rev 80)
I should not need to say that yours are different.
Now, head over to the following web page:
Here, you need to paste the OUTPUT of “lspci -n”
Do this, and press “Check”
Now you will see the Vendor, If it works, the device name, the driver name (which is what you want!) , and a kernel version that it is supported in.
Now you want to look at the driver names and scroll through the config and select what you need/what they are. Enable things like “ATAPI Floppy” or “ATAPI Disk Support” too if you have a floppy or ide cd/dvd/bd drive (just use common sense basically)
Remember, “/” in menuconfig searches! (type driver name or device name to find location of drivers)
You need to configure your filesystems, you should know this, if not /etc/fstab will tell you of all the ones that you mount (or keep track of mounting)
These are selected in the “File Systems” menu and is very easy to do.