RE: Rebuilding the Kernel Mini HOW TO
Yes I did read those sources, however they created problems...for those
using xconfig taking out the pcmcia support in this way made it impossible
to use. (The what to do with old kernel headers problem needs to be spelled
out, the issue of where to make the package needs to be spelled out) Not
really trying to reinvent the wheel, trying to get the wheel on the ground
for people like myself who know absolutely next to nothing about what they
are doing in Linux, but who still need to do a couple of things before they
start investing a lot of time in setting things up and customizing:
rebuilding the kernel and learning how to do backups. And second these
instructions need to be geared towards the individual user, not the
corporate sysadmin. The instructions out there look like they are step by
step to the old hands (I know how this works) but they really do not resolve
doubts that occur between steps for the newbie. That is what I am trying to
do with this, not trying to step on anyone's toes. You see your discussion
of certain issues below makes no sense whatsoever to me and I believe it
probably makes perfect sense.
Mike Olds www.buddhadust.org
From: Osamu Aoki [mailto:firstname.lastname@example.org]On Behalf Of Osamu
Sent: Monday, October 14, 2002 6:55 PM
Cc: Michael Olds
Subject: Re: Rebuilding the Kernel Mini HOW TO
Did you read make-kpkg documentation especially by Kent West?
I think instead of reinventing wheel, suppliment existing good document
as patch bug report.
/usr/share/doc/make-kpkg/README.gz (last section is by Kent)
For this, use unstable version.
Also my Debian Reference has a (good) summary. Bug report is welcome.
Lastly, are you aware of following facts (Content from recent post by
prominent Debian person. I am worried about mine ...):
* kernel header files for user application
Some may still say:
> The problem under Debian and SuSE is that the Linux kernel is
> not installed under /usr/src/linux - so you just need to ensure
> that /usr/src/linux links to the directory containing the Linux
> kernel sources. ...
Colin Watson <email@example.com> said:
That is absolutely terrible advice. It's a very good way to break a Debian
system, and you should ignore it. Linus doesn't recommend this old way of
things nowadays either.
Instead, if you *need* kernel headers for something, alter the Makefiles so
that their include path points to
Most "normal" programs don't need kernel headers and in fact may break if
use them directly; instead they should be compiled against the headers with
which glibc was built, which are the versions in /usr/include/linux and
---- END OF QUOTE ---
Do not ask me but it looks like using /usr/src/linux seems to be bad
idea. (OOps, I do that in 2nd classic method. Just do not compile
any application, this may be OK.. I need to check why this is bad...)
On Mon, Oct 14, 2002 at 02:19:48PM -0700, Michael Olds wrote:
> This is still a draft. This is a request for advanced users to take a look
> see and add comments or suggestions. The idea is a step by step
> for Fresh New to Linux/Debian users, with the hope that they will be
> encouraged to attempt a rebuild of their kernel almost first thing after
> initial install. I use a technique which is a blend of using a file
> along with a terminal so I can see where I am at and yet do what I need to
> do in the terminal. This is a good way to work into using the terminal.
> <!--\*#---------REBUILD KERNEL------------#*\--!>
> read (NOTE: we need a source for these as they are not created on a new
> install or by unpacking the kernel-source...and should they be in
> /usr/src/linux/ anyway):
> This is good for using the make menuconfig method
> This is good for using the make xconfig method
> Bear in mind that debian does things a bit differently than other
> distros. What is that difference? In essence, in stead of reconfiguring
> kernel and replacing it directly, the reconfigured kernel is made into a
> package (.deb) primarily so that the rebuild will remain integrated into
> debian package system so that future updates of the kernel can be made
> dpkg. (I have stated this in these boldly confident terms not being sure
> that this is the essence at all...hoping for confirmation or
> R: The way that kernel headers are handled on a debian system may be
> different to other distros, so clarification would be worthwhile just to
> avoid confusion.
> [ ]A. Before 1: Download and create a recovery floppy from:
> [ ]1.a. Download the latest kernel source package (use a Debian source; or
> make sure you have read all the documentation above) to /usr/src (this is
> where it will be installed if you use dselect, a package manager, synaptic
> or aptitude). Best practices seem to indicate that the package be built
> outside of /usr/src so creating /usr/src/linux and creating a sym-link
> /linux to /usr/src/kernel~ as in step 1.d below seems to be the way to
> handle this.)
> [ ]1.b. if no /usr/src/linux dir exists, make it
> $ cd /usr/src
> $ mkdir linux
> [ ]1.c. change directory to /usr/src and unpack the source package -- use
> the unpacking tools with your file manager, or:
> $ su #enter root password
> $ cd /usr/src
> $ tar --bzip2 -xvf kernel-source-2.4.18.tar.bz2 (or latest)
> [ ]1.d create a symbolic link to /usr/src/linux
> $ ln -s /usr/src/kernel-source-2.4.18 /usr/src/linux
> [ ]2. Just to be professional: go to "/etc/kernel.pkg.conf" and modify the
> file by inserting your "Kernel Source Maintainer Name" and e-mail address.
> [ ]3. Make sure
> [ ]"expectk" if you want to use the user friendly: make xconfig
> [ ]"debhelper"
> [ ]"modutils"
> [ ]"libncurses5-dev"
> [ ]"bin86"
> [ ]"libc6-dev"
> [ ]"debianutils"
> [ ]"make"
> [ ]"bzip2" and
> [ ]"kernel-package" are installed.
> R Notes: don't use gcc 3.x, but something like gcc 2.95. Which I do not
> understand. Clarification?
> [ ]4. (on 2nd and subsequent rebuilds) Copy old configuration file to
> $ cd /usr/src/kernel-source-2.4.18
> $ cp /boot/config-2.4.18-386 .config # get current config as
> [ ]5. # cd to /usr/src/linux
> $ make menuconfig or make xconfig
> and make your selections
> To do this you need to have some familiarity with your hardware and
> you are intending to use the system for. This you need to work out
> Once this is figured out, it might be helpful, on the first rebuild, to
> your updates with reference to the original configuration, (called
> config-2.4.18bf24 (or your kernel version)) which you should find under
> /root using the "M" (module) option where a module was used and building
> feature into the kernel (*) or [y] option where it was built into the
> kernel. Use the HELP option for brief explanations. This at least until
> understand which can be safely changed under your setup.
> Note: If you're using --initrd, make sure "Compressed ROM file system
> support" is built in, or you'll get a kernel panic (need CramFS).
> (Side note: I see that answers my question about how to get it in
> [ ]6.a. [ ]# make-kpkg clean
> 6.b. [ ]# make-kpkg -revision=<!--insert your own personal rebuild
> version number here: i.e.: -revision=0001) --initrd kernel_image (see
> NOTES below: do not use --initrd if you do not use).
> OR: # make-kpkg -revision=mydomain.0001 kernel_image
> Note: If you don't want "--initrd" leave out that option, and
> sure /etc/lilo.conf doesn't have it either for that build. Conversely, if
> you do want it, make sure to add an 'initrd=/initrd.img' line to the
> image=/vmlinuz stanza of your /etc/lilo.conf and be sure to run # lilo -a
> [ ]6. A new kernel.version-0001_i386.deb will be placed in the /usr/src
> [ ]7. Install the new kernel using
> # dpkg -i kernel-image-2.4.18_mydomain.0001_i386.deb
> [ ]8. Reboot
> NOTES: make-kpkg kernel_image actually does make oldconfig and make dep.
> not use --initrd if initrd is not used. The current Debian initrd boot
> script requires a cramfs kernel patch, if you obtain kernel source from
> non-Debian archives; see http://bugs.debian.org/149236. As I understand
> initrd is used in situations where many computers use a highly modularized
> kernel, or where an individual has his file system loaded as a module.
> requires the use of a virtual RAM disk in order to run smoothly, and that
> what initrd enables (Experts are requested to make this explanation more
> On an SMP machine, set CONCURRENCY_LEVEL according to kernel-pkg.conf(5).
> Next mini: how to recover when nothing said here works.
> To UNSUBSCRIBE, email to firstname.lastname@example.org
> with a subject of "unsubscribe". Trouble? Contact
~\^o^/~~~ ~\^.^/~~~ ~\^*^/~~~ ~\^_^/~~~ ~\^+^/~~~ ~\^:^/~~~ ~\^v^/~~~ +++++
Osamu Aoki @ Cupertino CA USA, GPG-key: A8061F32
.''`. Debian Reference: post-installation user's guide for non-developers
: :' : http://www.debian.org/doc/manuals/reference/ also http://qref.sf.net
`. `' "Our Priorities are Our Users and Free Software" --- Social Contract
To UNSUBSCRIBE, email to email@example.com
with a subject of "unsubscribe". Trouble? Contact