From: Jens Benecke Subject: [DRBD-dev] Re: RFC: new ./INSTALL hints Date: Wed, 24 Dec 2003 13:14:23 +0100
For Debian, IMHO it makes a lot of sense to make a .deb package:
/tmp/drbd-0.6.12# dpkg-buildpackage -us -uc -b
creates drbd_*.deb, drbd-source_*.deb and kernel-patch-wup_*.deb. drbd-source_*.deb only contains /usr/src/linux/drbd.tar.gz, which must be unpacked and recompiled with the target kernel.
/tmp# dpkg -i drbd*deb # install them all /tmp# cd /usr/src/linux ; tar xvzf drbd.tar.gz /usr/src/linux# make menuconfig # FOO=anything-you-want /usr/src/linux# make-kpkg --bzimage --revision $FOO binary-arch modules_image
creates kernel-image*deb, kernel-headers*deb, and drbd-module*deb, in my case (applied reiserfs data-logging patches and changed EXTRAVERSION in the Makefile to my initials, also used --revision $FOO on the make-kpkg command line):
drbd-module-2.4.23-jb-gr+r_0.6.12-1+jb1_i386.deb kernel-headers-2.4.23-jb-gr+r_jb1_i386.deb kernel-image-2.4.23-jb-gr+r_jb1_i386.deb
These can be installed on any computer now.
$FOO can be anything you want, like 01 or jb1 (which I use). It's the kernel revision number for your build. If you build later .deb packages with the same kernel version, you can use
# dch -i 'added $foo patches/configure items/whatever'
to update the Debian changelog in the kernel source directory and then just rebuild the kernel image. It will auto-replace the running kernel on installation.
If you build another .deb with a different version, it will not replace the running kernel. See kernel-package documentation for that.
Trust me, it's much cleaner and easier (also to upgrade) machines this way. Especially if you have several machines to upgrade, which is always the case when running drbd, as that's the whole point.