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

Re: Re-building kernel with make-kpkg (was: cdrecord + ide cdrw)

On Sat, Mar 02, 2002 at 07:28:54PM -0800, Bill Moseley wrote:
| At 11:23 AM 03/03/02 +1100, Davor Balder wrote:
| >
| >make-kpkg clean
| >make-kpkg --revision=<your_kernel_name> kernel_image
| >dpkg -i <your_kernel_image.deb>
| This was nice as it moved my existing kernel to .old, but that made me wonder:
| Say I rebuild my kernel after it's installed I decided I want to change a
| kernel setting.  If I go through the same procedure to build the kernel
| again will the existing kernel get replaced again?

Use this script :


if [ -z "$CONFIG" ] ; then

if [ -z "$VER" ] ; then
    echo "you need to set \$VER first"
    exit 1

fakeroot make-kpkg clean  && \
    fakeroot make-kpkg \
        --config=${CONFIG} \
        --append-to-version=-custom.${VER} \
        --revision=custom.${VER} \
        ${INITRD} \
        kernel_image \

Run it from /usr/src/kernel-source-<version>.  Set the environment
variable "VER" first.  For example,

$ VER=1 ../Build.sh

Then you get a .deb like


When you look at it in dpkg, both the name and the version of the
package are unique.  Then, when you realize that you forgot (or just
want to tweak) some options,

$ VER=2 ../Build.sh

And you'll get a new package named 'kernel-image-2.4.17-custom.2'.
The kernel images will be 

Making both the name and the version unique allows both to co-exist.

| Or will it end up like
|    vmlinuz -> boot/vmlinuz-2.4.17
|    vmlinuz.old -> boot/vmlinuz-2.4.17

Oh, yeah, and I don't use those symlinks either.  I like to explicitly
specify the whole name of the kernel image (version included) in my
bootloader's config.  I'm not sure where the symlinks will point, but
if you use the full name it won't matter.



If your company is not involved in something called "ISO 9000" you
probably have no idea what it is.  If your company _is_ involved in ISO
9000 then you definitely have no idea what it is.
                                (Scott Adams - The Dilbert principle)

Reply to: