[DRBD-user] Fedora Core 1 compile problems

Lars Ellenberg Lars.Ellenberg at linbit.com
Fri Feb 20 13:14:15 CET 2004

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


/ 2004-02-19 21:27:57 -0500
\ William Dooley:
> Todd
> 
> Thanks for the input.
> 
> This may help others who have wanted to take on this challenge to build
> an RPM
> 
> My steps that I took to a complete build drbd-0.6.11
> drbd-0.6.10 version has problems with the build process so I chose
> to try drbd-0.6.11.
> 
> logged in as root user.
> 
> These proceedures are required to prep the kernel tree for drbd.
> 
> download and install the kernel-sources for your distribution for fedora 
> core 1


NOTE: that 0.6.11 is supposed to build against a read only tree
of preconfigured kernel headers, too. (At least it does for my SuSE)
So if RH/Fedora provides such preconfigured kernel headers
matching your running kernel, then you can try and use that as
KDIR=, and skip the steps below until unpacking of drbd.

> it is kernel-source-2.4.22-1.2115.nptl
> intall it by issuing command
> 
> # rpm -ivh kernel-source-2.4.22-1.2115.nptl
> 
> # cd /usr/src/linux-2.4.22-1.2115.nptl/
> 
> Modified the Makefile in that directory by removing the custom portion of 
> the EXTRAVERSION line to look like this below
> 
> EXTRAVERSION = -1.2115.nptl
> 
> saved file
> then issued command
> # make mrproper
>
> then copy the orignal configuration file for building the kernel into the
> /usr/src/linux-2.4.22-1.2115.nptl/
> 
> The original configuration file is found in the /boot directory called
> config-2.4.22-1.2115.nptl
> 
> # cp /boot/config-2.4.22-1.2115.nptl 
> /usr/src/linux-2.4.22-1.2115.nptl/.config
> Then
> # make oldconfig

As stated in the INSTALL.{pod,html}
# yes "" | make oldconfig ; yes "" | make oldconfig

is the way the RH kernel-*.src.rpm does it ...

> Then
> # make dep
> Didn't have to make bzImage



> Now on to the drbd portion of the.
> Download and install drbd into the /usr/src/ directory
> change directory to
> # cd /usr/src/
> uncompress and untar it with the command
> # tar -zxvf drbd-0.6.11.tar.gz
> 
> Now you need to modify some files for drbd to build properly
> You need modify drbd_config.h and drbd.spec.in
> change directory
> # cd drbd-0.6.11
> uncomment the #define SIGHAND_HACK in the drbd_config.h by deleting
> the two forward slashes preceeding the line and save.


> comment the find sbin/rcdrbd -printf "/%p\n" >> "$FILELIST" by placing a
> # in front of it and save.

Uh? Why this?
If it is not found, it won't be in the FILELIST,
so it cannot disturb the RPM built. Am I wrong?

And apart from this step, you reiterate exactly
what is stated in INSTALL in the base DRBD directory
(and somewhere on the drbd.org web site).

> now make the rpm by issuing command
> # make rpm KDIR=/usr/src/linux-2.4.22-1.2115.nptl/
> 
> This should build with no errors.
> 
> The rpms are built and placed in the
> /usr/src/drbd-0.6.11/dist/RPMS/i386 
> directory.
> 
> install the rpms by issuing command
> # rpm -ivh drbd-0.6.11-3.i386.rpm
> # rpm -ivh drbd-km-2.4.22_1.2115.nptl-0.6.11-3.i386.rpm
> # rpm -ivh drbd-debuginfo-0.6.11-3.i386.rpm
> 
> Todd thanks again on the help
> I was getting hung up on the .config issue.  I didn't quite know
> where to find the orginal .config file inorder to do a proper build.
> 
> Bill

	Lars Ellenberg



More information about the drbd-user mailing list