Re: [PLUG] kernel compilation questions
Hi, Can anyone suggest me a better document than kernel compilation README,which explains each and every steps of kernel compilation? There used to be a kernel-build-howto. It seems that the main howto is taken down for maintenance. But you can access a workable and readable copy at: http://www.digitalhermit.com/linux/Kernel-Build-HOWTO.html Being said that, the README is just a quick reference. There is more documentation in the Documentation subdiretory. I want to know ,what problem can occur if i dnt follow step number 3 ,what if i dnt follow step number 4 etc.This will create better understanding for each and every steps of kernel compilation. Most of the steps are really logical. Like why you need to (re)configure the kernel before rebuilding? Probably because you need to add/remove some feature/device support etc. Apart from this, if you need to find out what happens when you skip one of the steps, what better way than to try it yourself. And then maybe you can prepare/publish a document for our benefit :). What is system.map file used for? http://www.dirac.org/linux/system.map/ What if i don't create initrd image after kernel compilation? Your initrd contains the extra modules that you need to during boot but were not compiled in the kernel. Which means you (or whoever compiled the kernel) chose to compile them as modules. Typically, these include modules for your filesystems, for your scsi disks etc. /usr/src/linux-2.4/Documentation/initrd.txt For example,i compile my linux kernel and select an option that leads to disaster,I mean due to which after reboot i can not boot my machine. Then in this case how can i revert back to my original settings? Preserve your older kernels. It generally is unless you delete the files and bootloader configurations. If the new kernel panics/oops/refuses to boot for any reason, you can always fall back to the older one. In general, installing a new kernel just means putting the kernel, initrd and modules at specific locations and adding a new entry to the bootloader config. So preserving old kernels is not really difficult. Everytime after i recompile my kernel i have to reinstall my network device driver and vmware drivers?Is there any solution to get rid of this problem? vmware yes. Network not unless you use propritary drivers. Same goes fro any other modules. If they are propritary or not provided in kernel, you need to rebuild/reinstall them all. Can i not backup my modules and related settings? Ofcourse you can. /lib/modules/ has the modules, /etc/modules.conf (2.4 kernels) or /etc/modprobe.conf (2.6 kerenls) has your module configuration and so on. HTH, Saurabh -- __ Pune GNU/Linux Users Group Mailing List: (plug-mail@plug.org.in) List Information: http://plug.org.in/mailing-list/listinfo/plug-mail Send 'help' to [EMAIL PROTECTED] for mailing instructions.
Re: [PLUG] kernel compilation questions
Hello Paavan, > Can anyone suggest me a better document than kernel compilation > README,which explains each and every steps of kernel compilation? Here's a thumb rule when you want to find a doc that guides you through the steps of doing a particular thing: google for " HOWTO" The Linux HOWTOs are (from the tldp.org site): detailed "how to" documents on specific subjects. The HOWTO index lists all HOWTOs along with short descriptions. The HOWTOs are written in SGML or XML, and translated to different output formats using SGML-Tools (Linuxdoc DTD) or the DocBook/DSSSL tools. Besides the ones that are ^officially^ maintained at TLDP, there are numerous HOWTOs spread across the net. Reading HOWTOs is a good way to learn about the linux system (I should know, I learned most of my linux from there). Most often than not HOWTOs are fairly comprehensive and besides what is claimed, they cover a lot more that just the nuts and bolts of doing a particular task. Now that I have dispersed sufficient gyaan, here's the answer to your question: http://www.digitalhermit.com/linux/Kernel-Build-HOWTO.html HTH Regards Steve -- __ Pune GNU/Linux Users Group Mailing List: (plug-mail@plug.org.in) List Information: http://plug.org.in/mailing-list/listinfo/plug-mail Send 'help' to [EMAIL PROTECTED] for mailing instructions.
Re: [PLUG] kernel compilation
On 5/25/05, Manas Alekar <[EMAIL PROTECTED]> wrote: > If you really want your recompiles to make a *noticable* difference, > try doing two things: > > 1. Remove loadable modeule support. Kind of hard to recommend if you're using external drivers (by external I mean which are not included in the kernel) for example external alsa drivers, or wireless, or nvidia/ati binary drivers... > 2. change -O2 flag to -O3 and add -funroll-loops Living on the edge huh? ok :) As for a question earlier in the thread: > 3. What kind of improvements 've people experienced on the CLI after re-compiling? Improvements in the CLI? Hows the CLI going to improve by recompiling the kernel? Sure, you could improve the amount of memory the kernel occupies, or how fast the os feels, or maybe if you use some uber disk scheduler, then your disk may just operate 0.1% faster... but CLI? If you want an improved CLI, change the shell which you use (which is most probably bash, and therefore there's probably no other shell which is much better than bash).. Sagar -- Sagar Gokhale -- __ Pune GNU/Linux Users Group Mailing List: (plug-mail@plug.org.in) List Information: http://plug.org.in/mailing-list/listinfo/plug-mail Send 'help' to [EMAIL PROTECTED] for mailing instructions.
Re: [PLUG] kernel compilation
If you really want your recompiles to make a *noticable* difference, try doing two things: 1. Remove loadable modeule support. 2. change -O2 flag to -O3 and add -funroll-loops This will speed things up considerably. However, keep in mind that some drivers, especially in kernel 2.6 may break under O3. Naturally, this method is not for those weak of heart. I picked up these tricks from Securing RedHat Linux by Gerard Mourhoni. Great Reading. Regards, Manas -- __ Pune GNU/Linux Users Group Mailing List: (plug-mail@plug.org.in) List Information: http://plug.org.in/mailing-list/listinfo/plug-mail Send 'help' to [EMAIL PROTECTED] for mailing instructions.
Re: [PLUG] kernel compilation
On 5/24/05, shirish agarwal <[EMAIL PROTECTED]> wrote: > As far as I know there're 2 ways to re-compile the kernel :- (Doing all as > root) > A] > 1. Install the sources & go to /usr/src/linux & read the README. > 2. make menuconfig : menu comes, after choosing processor types & > other parameters exit. > Make sure to save the configuration file. > 3. make all :- This makes something knows as bz or BZ Image? Anybody > can give more clarity about this? It also makes modules which are > needed later. > 4. make modules-install : Installs the module install files > 5. make install :- Installs the module > Hi, It depends on which version of the kernel are u re-compiling? 2.4 or 2.6. Since 2.6 u need not be root to compile the kernel (says my knowledge, experts may differ). i have looked up various sites to compile kernel, but the README file in the source is the best. It gives u complete info on how to compile. while compiling make sure u have the (prefer all ext2/3, fat, ntfs, etc) file system built into the kernel and not as module. Else it will never boot. Also try and skim over the book Internals of a linux kernel. It gives u a fair idea of what should u include and what needs to get compiled as modules. DO NOT add any un-wanted hardware support. Compile only the necessary things. And most of the fun lies in compiling first, then successfully failing and re-compiling till u get it correct. It helps u in lea ring the internals of the kernel. Regards Aditya -- __ Pune GNU/Linux Users Group Mailing List: (plug-mail@plug.org.in) List Information: http://plug.org.in/mailing-list/listinfo/plug-mail Send 'help' to [EMAIL PROTECTED] for mailing instructions.