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

RE: Adaptec Raid



I think I will take your advice and try it however I do not want to modify
the kernel that the current machine is running on.
So I have created a different directory ~/src/ and am doing all the work
there.

Maybe I dont need to work about modifiing the current kernel but I didnt see
any way tell the "patch" program what the file to patch is so I did it this
way.

Now when I run the patch command:
  michael@www:~/src/linux$ patch -p0 <../patches/dpt_i2o-2.0-2.2.18
I recieve the following message

>can't find file to patch at input line 4
>Perhaps you used the wrong -p or --strip option?
>The text leading up to this was:
>--------------------------
>|diff -urN linux-2.2.18/drivers/scsi/Config.in
linux->>>>2.2.18.SuSE/drivers/scsi/Config.in
>|--- linux-2.2.18/drivers/scsi/Config.in        Mon Dec 11 01:49:42 2000
>|+++ linux-2.2.18.SuSE/drivers/scsi/Config.in   Mon Feb 26 17:46:21 2001
>--------------------------
>File to patch:

And it is prompting me for a file to patch.

do you know how to specify the kernel to patch or even what the name is and
where it is located in the src.


Thanks again
Michael Blood


-----Original Message-----
From: kmself@ix.netcom.com [mailto:kmself@ix.netcom.com]
Sent: Sunday, July 29, 2001 4:03 PM
To: debian-user@lists.debian.org
Subject: Re: Adaptec Raid


on Sun, Jul 29, 2001 at 03:34:47PM -0600, Michael Blood
(Michael@CustomDB.net) wrote:
> Rich,
> I am unfamiliar with applying patches, recompiling kernels or otherwise
> messing with the "Guts of the installation process".  I have, however,
been
> working on a debian 2.2 box for about 8 months though.

I'd start learning.  It's a useful skill, and not as daunting as you may
think.

For patches:  download appropriate patch (ask if you need a specific URL
pointer) to /usr/src, apply it with the 'patch' command, usually:

    $ patch -p0 < patchfile

Naturally, you need your Linux kernel image:

    $ apt-get install kernel-source-<version>
    $ cd /usr/src
    $ tar -xjvf kernel-source-<version>.tar.bz2
    $ ln -sf kernel-source-<version> linux   # removes any existing link
    # patch now:
    $ patch -p0 < patchfile
    $ cd linux
    $ less README       # RTFM!
    $ make mrproper

The next part is the interesting one:  you configure your kernel.
Options are 'config', 'menuconfig', 'xconfig', and 'oldconfig'.  I tend
to like menuconfig.  Here you get to select options for your kernel --
the key is that you *only* need to select the options you're going to
use -- but it helps to select *all* the options you need.  Following the
guidance provided in the accompanying help usually works, as does the
"when in doubt, compile as module" doctrine.

    $ make menuconfig

When done, save your changes.  I like to keep my configurations in
/usr/src as config-YYYYMMDD-<version>, that is, timestamped, by kernel
version.  This convention is strictly for your convenience, it has no
significance for your system.

    $ make dep

At this point, the Debian method departs from the traditional GNU/Linux
kernel configuration.  Under Debian, the make-kpkg package allows you to
create your own Debian package, of your own kernel,

    $ make-kpkg <options>

...the options bit varies, I tend to use:

    $ make-kpkg --bzimage --revision custom.<major>.<minor> binary modules

e.g.:

    $ make-kpkg --bzimage --revision custom.1.0 binary modules

...the '--revision' option allows you to differentiate between different
configurations of the same kernel version.

To install a given kernel, e.g., all of the packages produced by the
above make-kpkg command:

   $ cd /usr/src
   $ dpkg -i kernel-*_custome.1.0*.deb

You might also want to refer to http://www.debian.org/doc/FAQ/ch-kernel.html

Corrections appreciated, I think I've got most of that about right.

--
Karsten M. Self <kmself@ix.netcom.com>      http://kmself.home.netcom.com/
 What part of "Gestalt" don't you understand?         There is no K5 cabal
  http://gestalt-system.sourceforge.net/           http://www.kuro5hin.org
Free Dmitry!! Boycott Adobe!! Repeal the DMCA!!  http://www.freedmitry.org



Reply to: