[TriLUG] Re: Build A Kernel (tangential)

Jonathan Mills jonmills at email.unc.edu
Mon May 23 20:18:46 EDT 2005


If you're not using a 2.6 kernel, then don't use the steps I listed 
below.  I've never tested them with a 2.4 kernel, and I don't want to 
lead you down the wrong path.  As some other folks mentioned, building a 
2.4 kernel requires you to run `make deps` right after you create the 
.config file, and before you run `make bzImage`.

That said, the `make all` step below is roughly analogous to make 
`bzImage`, but it also builds the modules.  Step 5 below obviously 
installs the modules.  Step 6 is the really cool one, because it runs a 
script that copies your vmlinuz (kernel) file to /boot along with the 
appropriately named System Map and Config files.  It then automatically 
creates your initrd (ram disk for drivers) and updates your Grub list.

Scott Chilcote wrote:

> Jonathan Mills wrote:
>
>> And by the way, the kernel build process has been greatly simplified 
>> under the 2.6 kernels.  This is all you need to do:
>>
>> 1) cd /usr/src/linux (or wherever you're kernel source is)
>> 2) make mrproper  (may or may not be necessary, depending on 
>> circumstances)
>> 3) make xconfig (or menuconfig, or whatever you're using to build the 
>> .config file)
>> 4) make all
>> 5) make modules_install
>> 6) make install
>>
>
> Hello Jonathan,
>
> I haven't moved to the 2.6 kernels yet.
>
> I'm curious just how many of the steps I currently perform by hand 
> will be accomplished by the instructions you've given above.
>
> - Do I still need to copy the System.map file into /boot?
> - Do I still need to make an initial ram disk?
> - Do I still need to update the grub.conf file to list the new kernel 
> and initrd file?
>
> I know these steps aren't necessary a part of every kernel build, but 
> I still need to perform them on my systems.
>
> Thanks,
>
> Scott C.
>
>> Lance A. Brown wrote:
>>
>>> paul.cour1 at verizon.net wrote:
>>>  
>>>
>>>> Hello
>>>>
>>>> I have a friends Laptop which has Fedora Core 2
>>>> installed. Runs fine.
>>>>
>>>> Friend wants newer kernel.
>>>> Downloaded 2.6.11 from kernel.orq, no problem
>>>> got to point of "make bzImage",
>>>> makefile starts, but gives error:
>>>> cannot find ".config" file...
>>>>
>>>> using find command, tried to find
>>>> .config file, none available,
>>>> but did find a "config-2.6.5-1358"
>>>>
>>>> How to proceed with kernel build?
>>>>   
>>>
>>>
>>>
>>> RTFM... :-)
>>>
>>> You need to generate a .config file using one of the available
>>> configuration mechanisms.  'make menuconfig' will provide a dialog 
>>> based
>>> menu for configuring the kernel.  'make xconfig' (I think) will 
>>> bring up an
>>> X-Window GUI for cnfiguring the kernel, etc.
>>>
>>> Once that is done, you should 'make deps' before 'make bzImage', IIRC.
>>>
>>> --[Lance]
>>>
>>>  
>>>
>
>



More information about the TriLUG mailing list