Technology news and Jobs
Information Technology News
An Ubuntu guide to taming the Linux kernel
Information Technology News
An Ubuntu guide to taming the Linux kernel | An Ubuntu guide to taming the Linux kernel |
|
|
| by David M Williams | |
| Monday, 15 October 2007 | |
|
Page 3 of 3 Tuning the kernelMost pieces of software use configuration files to adjust how they function; the kernel is no different in this regard. One of its most important configuration files is /etc/sysctl.conf which sets the value of a wide range of kernel parameters. You don’t need to reboot to see your modifications take effect; Ubuntu handily provides a command called sysctl to adjust parameters directly on the running kernel. Note that although sysctl will act right away, it won’t persist the modification; if you are happy with it, you need to still modify /etc/sysctl.conf. An example of using sysctl to alter a running kernel is given in the Ubuntu Community Docs to adjust timer resolutions for MIDI purposes. Compiling the kernel All this said, there are times when you might want to install a new kernel. For most people this will not be necessary, as Ubuntu provides a range of kernels for different processor types as well as letting modules be manipulated and parameters be tweaked as we have discussed, but rebuilding does allow you to make use of the very latest compilers and libraries, and allows you to exercise full control. If you wish to go down this route, be sure to make a working boot disk so you can boot back up to a known state should something go wrong. From here, the steps are basically a sequence of ‘make’ commands. Begin with make mrproper to tidy up the source tree. This command will clear all previously compiled binaries as well as other intermediate files. Note carefully this will remove the essential .config file so either save a copy, or wait until after running mrproper to create it. You can use commands make menuconfig or make xconfig (for a GUI) to adjust this configuration file. Use make dep to create code dependencies, make clean to prepare sources, and then make bzImage to actually generate a compressed binary image. Execute make modules to compile modules; make modules_install to install the resulting binaries into /lib/modules. Run make install to copy your new kernel to /boot and to perform other important tasks. You’ve finished with the source code at this point, but before rebooting to test your new kernel, be sure to verify that the /boot/grub/grub.conf or /etc/lilo.conf boot loader files have been updated to use your new kernel. While rebooting, monitor the screen for any errors and be sure to inspect /var/log/messages after successfully logging in. With this information all understood, you now have a good grounding to launch into the kernel and to take full control over how it operates on your own computer.
Get stories like this delivered daily - FREE - subscribe now
|
| < Next story in category | Previous story in the category > |
|---|



Tags





