[wplug] I'm a Linux whimp (need kernel help)

Christopher DeMarco cmd at alephant.net
Tue Aug 16 10:54:50 EDT 2005


On Tue, Aug 16, 2005 at 10:23:42AM -0400, Chester R. Hosey wrote:

> > Do they make a kernel for dummies book by any chance?

Dig around for a copy of the Linux Kernel HOWTO.


> 8) make bzImage
> 9) make modules
> 10) make modules_install
> 11) Tell your bootloader about the new kernel.

If running  >= 2.6...

"make && make install"

This installs your modules; copies vmlinuz, System.map .config to
/boot and symlinks 'em all from <name>.2.6.x-foo to <name>; detects
your bootloader and gives you a hint about what to put in there.

If you're running GRUB, you can simply leave the default entry
pointing to "vmlinuz" and hand-code older entries.

Please, do make sure to leave a bootable "last known good" kernel
around somewhere :)

Now: If you're using an initrd, the instructions differ somewhat.  I
haven't followed the thread before this point (yeah, yeah), so if
you're using an initrd then your distro should have tools to handle
this (mkinitrd springs to mind).  I know Red Hat in particular has
decent documentation on the subject; try their SysAdmin doc.


> Most distributions and guides will (used to?) tell you to unpack
> into /usr/src/linux. I found myself playing with many different
> versions, and settled on /usr/src/ksrc/2.6.12 (for instance),
> allowing for intact source trees for all versions I was testing.

The canonical (conanical?) way is to untar into
/usr/src/linux-2.6.x-foo, and symlink /usr/src/linux.


> Some copy the generated kernel to /boot or /, but I like to leave it
> in place. I've always got an old bootable kernel in another source
> tree somewhere -- I'm very demanding of disk space in /usr/src, but
> if faced with limitations I'd probably copy to /boot. The kernel
> will end up at /usr/src/ksrc/2.6.12/arch/i386/boot/bzImage after a
> successful build.

Yikes!  You're not only deviating from standard practice, but what
happens if you hork /usr!?  /boot should be (a) dedicated, (b) mounted
on-demand (not auto!) and (c) if you can afford it, RAID1 :)

Most people will get by just fine with 50MB (yes, that's *MB*) (64 for
purists) of space in /boot to hold many generations of old kernels.


> Note that if you're impatient (which I am) you can specify the -j option
> to make, which will cause make to invoke multiple build processes
> whenever possible. This really only makes sense during 'make bzImage'
> and 'make modules' -- for instance, 'make -j2 bzImage' for single-CPU
> systems or 'make -j4 bzImage' for SMP. I like to increase the number
> until 'top' no longer reports idle CPU time (it will nearly always show
> idle CPU on its first display cycle -- be somewhat patient).

The algorithm for -j is either (nCPU + 1) or (nCPU * 2 + 1).  This
should always be "safe".


-- 
Christopher DeMarco <cmd at alephant.net>
Alephant Systems (http://alephant.net)
PGP public key at http://pgp.alephant.net
+1 412 708 9660
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.wplug.org/pipermail/wplug/attachments/20050816/2c750ad1/attachment.bin


More information about the wplug mailing list