10+ advices BEFORE you rebuild Linux kernel

linux logoMany Linux newbies think that kernel recompilation is inherent and almost necessary thing to do after OS is just installed or some time later. By the following advices I would try to show these fellows in which situations this really makes sense and what to do if one persists :)

1. If you don’t know why you should patch/recompile kernel – DO NOT DO THIS.
2. If your running kernel is smart and supports all necessary hardware, technologies and doesn’t contain critical vulnerabilities – DO NOT REBUILD IT.
3. If you don’t know what are kernel patches and why they are used – DO NOT REBUILD KERNEL.
4. If kernel with needed functionality is available as binary package for your distribution (especially in official repositories) – DO NOT BUILD KERNEL.
5. If you insist, certainly read Kernel HOWTO and notes about kernel recompilation in regards to your distribution.
6. Do change kernel config values only if you know what they mean.
7. Don’t forget to build initrd before rebooting your system.
8. Do not remove workable kernel and make it default in boot loader menu (like grub).
9. Don’t panic if something goes wrong – most probably the same situation happened to thousands people earlier. But sometimes shit happens.
10. Rebuilding procedure usually takes hours depending on hardware you use. BE PATIENT! :)
11 (thanks to Erek Dyskant). Use your distro’s package management system to build kernels whenever possible (like make-kpkg in Debian or rpmbuild in Fedora/RedHat/CentOS)

I really hope this helps and pretty sure you’ll build your “perfect” kernel once ;)

Any further advices are WELCOME!

P.S. Thanks to Stas Kogut for encouraging me to write this post.

Read more →

 

Web app. of the day: interactive Linux kernel map

As it comes from name of the post, here is interactive Linux kernel map I recently came across. It’s available as web application as well as html version. I think you understand who it may be useful for… Good luck in programming!

Read more →

 

Get information about Linux kernel modules

Small tip: there is modinfo utility to get more information regarding Linux kernel modules. Here is an example of it’s usage: viper@viper-laptop:~$ modinfo ati_agp filename: /lib/modules/2.6.20-16-lowlatency/kernel/drivers/char/agp/ati-agp.ko license: GPL and additional rights author: Dave Jones srcversion: 6920C657E39118CCE9BAC63 alias: pci:v00001002d*sv*sd*bc06sc00i00* depends: agpgart vermagic: 2.6.20-16-lowlatency SMP preempt mod_unload 586

Read more →

 

Manage FreeBSD kernel modules on the fly

There are several utilities in FreeBSD to manage kernel modules. Among them are: kldload, kldstat, kldunload. First (kldload) would be useful for loading files *.ko into FreeBSD kernel using kernel linker. Second (kldstat) displays status of files loaded into kernel. Third (kldunload) helps to unload files which were previously loaded into kernel with kldload. This utilities are analogues of modprobe and lsmod utilities in Linux. Example: in order to enable […]

Read more →

 

Linux history: 0.02 and 0.03 releases memories

“Do you pine for the nice days of minix-1.1, when men were men and wrote their own device drivers?” began the October 5th, 1991 announcement for Linux kernel version 0.02 on the comp.os.minix newsgroup. In the release notes, Linus Torvalds continued, “as I mentioned a month ago, I’m working on a free version of a minix-lookalike for AT-386 computers. It has finally reached the stage where it’s even usable (though […]

Read more →