[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: compiling kernel



"JH" == Joshua Holland <jholland3@uswest.net> writes:

   JH> I'm about to compile a kernel (1st time) on a 250 mhz G3
   JH> Powerbook.  I've read a bunch of stuff online, but have
   JH> a couple of questions.

   JH> Is the current linux kernel image /boot/vmlinux-2.2.xx ?

The current Linux kernel is the one in the drop-down menu of
BootX.  Presumably it's in a folder in your System Folder on your
MacOS partition.  MacOS doesn't know anything about the Linux
partitions, so the kernels in /boot aren't important.  The
System.map files, however, are.

   JH> I've read I should back this up as
   JH> 'running_kernal.something' How would I boot with the backed
   JH> up kernel image then if I botch everything?

Even better, you should copy your new kernel to your kernels
folder in the System Folder, giving it a different name (I tend to
use vmlinux-<maj>-<min>-<patch>[-<pre-patch>]-<name>, where <maj>
is the major version (2), <min> is the minor version (2), <patch>
is the patch level (currently 17 on my system).  I'm running
Alan's pre-patches, so <pre-patch> is something like ``pre4'',
and, finally, <name> is a word (I'm currently using names of
characters from Iain Banks' _Feersum Endjinn_).  So the kernel I'm
building right now will be called vmlinux-2.2.17-pre10-gaston.

You can (and should) specify a name using the EXTRAVERSION field
in the top-level Makefile in your kernel source tree.  Make sure
you don't have any spaces following the word (just a carriage
return).

When I build kernels, I do `make mrproper', copy the last kernel
config (you should back these up), `make oldconfig', `make dep',
`make vmlinux', and `make modules' as me.  Then I su to root, do
`make modules_install', then copy the `vmlinux' file to the /boot
directory, renaming it as above (even though it's kind of
pointless with my current setup) and to my Linux Kernels folder
inside the System Folder of my (MacOS) boot disk, with the same
name.  You'll also need to copy the System.map file from
/usr/src/linux to your /boot directory, renaming it to match the
kernel (in my case, System.map-2.2.17-pre10-gaston).

When you're done, you'll have a new kernel, with new modules and a
new System.map file, all of which will be independent of your old
kernel.  To use the new kernel, you reboot, and when the BootX
menu comes up, you choose your new kernel from the drop-down list.
If your new kernel doesn't boot, or has other problems, you can go
back to your old kernel by rebooting and choosing your old,
working kernel.  If you haven't clicked on the save button in
BootX, the older kernel will still be the default.

   CMC

+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
 Behind the counter a boy with a shaven head stared vacantly into space, 
 a dozen spikes of microsoft protruding from the socket behind his ear.
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
   C.M. Connelly               c@eskimo.com                   SHC, DS
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 



Reply to: