This site best when viewed with a modern standards-compliant browser. We recommend Firefox Get Firefox!.

Linux-HA project logo
Providing Open Source High-Availability Software for Linux and other OSes since 1999.

USA Flag UK Flag

Japanese Flag

Homepage

About Us

Contact Us

Legal Info

How To Contribute

Security Issues

21 December 2007 Heartbeat release 2.1.3 is now out Download it and install it!

11 October 2007 NEW educational HA/DR Blog hosted by Alan Robertson

9 April 2007 Check out the Cool Heartbeat Screencasts: Installation, Intro to the GUI Part of the Heartbeat Education project

Last site update:
2008-07-04 17:36:37

original post:

From: Jens Benecke
Subject: [DRBD-dev] Re: RFC: new ./INSTALL hints
Date: Wed, 24 Dec 2003 13:14:23 +0100

Howto Package DRBD for Debian

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. :)


CategoryHowto