install server admin on a non-redhat kernel in 7.1 or 7.2

Steve_Boley@Dell.com Steve_Boley at Dell.com
Mon Mar 25 07:10:00 CST 2002


This is NOT a Dell supported procedure so please do not call tech support
for help on this issue. :)  They will only refer you to or send you this
email if you do.  This was a recompiled kernel 2.4.9 from kernel.org and
after getting the procedure to the steps below, it was working after every
reboot of the system.

Here is the procedure that we've discovered is necessary for a customer to
use the Dell Openmanage Applications cd and get Server Administrator 1.0 to
work in Redhat 7.1 or 7.2 with a non Redhat kernel (Linus Torvalds kernel
from kernel.org).  It is rather process intensive but can be done in 15
minutes or so.  

They need updated ucd-snmp from redhat to fix snmp bug before they do the
install of the server administrator.  

Dependencies not listed in any of the documentation are compat-libstdc++ and
I believe is on cd2.  

They will obviously already have the kernel source and the headers are N/A
when using kernel.org kernels.  

They will need the package make installed due to the way the Server
Administrator has to build the esm against the running kernel and is using
makefiles and make in the background.  Module support has to be on in the
kernel configuration they have built and are using as well.  

We spent 3 days on this to get it down to the steps below and working
everytime it is run and still be working after a system reboot.  This will
give them the ability to use with IT assist 6.2.1 as well as the browser
https://localhost(oripaddressifremote):1311 .  

If you stop at step 17 and don't run the install script you have the server
agent loaded and running but not the integrated web browser if you don't
want the omawsd web browser loaded and running.  It runs in numerous
processes and they all share the same 18mb memory footprint among them (if
you happen to look at top and see all the processes have 18mb memory usage
it is shared).

Steve Boley
Dell Server Redhat Linux Support

> i did a base install of redhat 7.1 (2.4.2-smp), downloaded 2.4.9 from
kernel.org, recompiled with your .config, then diff'ed your rpm -qa > rpms
with my rpm -qa > rpms2, and installed/uninstalled rpms to make them
identical.
> 
> then i booted into 2.4.9 and began the install.
> 
> 1. update ucd-snmp to the most recent version before you start the install
> 2. install the compat-libstdc++ and patch rpms *** the SADM User's Guide
says you need the kernel-source rpm, which you do not (as this is a
non-redhat kernel,) but it doesn't mention the stdc++ compatibility library,
which you do need.
> 3. download the 2 patches from domsch.com/linux -- dellomsaesm.patch and
Makefile.patch *** i have attached them to this email. rename without .txt
extension ***
> 4. mount systems management 3.0 cdrom and cd /mnt/cdrom/sa451/linux
> 5. rpm -ivh dellomsa , then rpm -ivh dellomsa-drivers, then rpm -ivh
ServerAdministrator
> 6. cp Makefile.patch
/usr/lib/dell/openmanage/omsa/drivers/open_src/Makefile.patch
> 7. cd /usr/lib/dell/openmanage/omsa/drivers/open_src/
> 8. patch -p0 < Makefile.patch
> 9. cp dellomsaesm.patch /usr/lib/dell/openmanage/omsa/dellomsaesm.patch
> 10. patch -p0 < dellomsaesm.patch *** run this patch 2x, the first time 1
hunk will install, the 2nd time the 2nd will install ***
> 11. cd /etc/rc.d/init.d
> 12. ln -s /usr/lib/dell/openmanage/omsa/dellomsaesm dellomsaem
> 13. service dellomsa start *** it will fail with errors but you must do
this step ***
> 14. cd /mnt/cdrom/sa451/linux
> 15. rpm -ivh --force --nodeps dellomsa-drivers
> 16. reapply both patches per steps 8 and 10 *** perform step 10 twice
again ***
> 17. service dellomsa start
> 18. cd /mnt/cdrom/
> 19. ./start_text.sh
> 20. service dellomsa restart
> 
> this should work. we have replicated your image and tested these steps
several times. reboot and make sure the dellomsa comes up as well as the
omawsd. if it does not come up automatically, you may need to go back to the
/usr/lib/dell/openmanage/omsa/drivers/open_src and rerun make. reboot.> 
Makefile patch

--- /tmp/Makefile.orig	Tue Nov 20 16:33:36 2001
+++ Makefile	Tue Nov 20 17:10:30 2001
@@ -1,9 +1,39 @@
 LOCALSUBDIRS=esm
-KERNEL_SUB_DIRS= $(shell uname -r | sed "s/[a-z].*//")
+KERNEL_SUB_DIRS= $(shell uname -r)
 ia64 = $(shell grep "define __MODULE_KERNEL_ia64" /boot/kernel.h |  awk
'{print $$3}')
 
+kernel_i686 =       $(shell grep "define __MODULE_KERNEL_i686"
/boot/kernel.h |  awk '{print $$3}')
+kernel_enterprise = $(shell grep "define __BOOT_KERNEL_ENTERPRISE"
/boot/kernel.h |  awk '{print $$3}')
+kernel_smp =        $(shell grep "define __BOOT_KERNEL_SMP" /boot/kernel.h
|  awk '{print $$3}')
+kernel_up =         $(shell grep "define __BOOT_KERNEL_UP" /boot/kernel.h |
awk '{print $$3}')
+
+
+ifeq ("$(kernel_i686)", "1")
+ifeq ("$(kernel_up)", "1")
+	config_file = $${KDIR}/kernel-$${KVER}-i686.config
+endif
+ifeq ("$(kernel_smp)", "1")
+	config_file = $${KDIR}/kernel-$${KVER}-i686-smp.config
+endif
+ifeq ("$(kernel_enterprise)", "1")
+	config_file = $${KDIR}/kernel-$${KVER}-i686-enterprise.config
+endif
+endif
+
+ifeq ("$(ia64)", "1")
+ifeq ("$(kernel_up)", "1")
+	config_file = $${KDIR}/kernel-$${KVER}-ia64.config
+endif
+ifeq ("$(kernel_smp)", "1")
+	config_file = $${KDIR}/kernel-$${KVER}-ia64-smp.config
+endif
+endif
+
 all: $(patsubst %, _mod_%, $(KERNEL_SUB_DIRS)) 
 
+
+
+
 $(patsubst %, _mod_%, $(KERNEL_SUB_DIRS)):
 ifeq ("$(ia64)", "1")
 
@@ -18,8 +48,9 @@
 		for i in ${LOCALSUBDIRS}; do \
 			ln -s ../$$i $${KDIR}/$$i ; \
 		done; \
-		cp $${KDIR}/kernel-$${KVER}-ia64.config $${KDIR}/.config; \
-		cp $${KDIR}/kernel-$${KVER}-ia64-smp.config
$${KDIR}/.config; \
+		if [ ! -e $${KDIR}/.config ]; then  \
+			cp ${config_file} $${KDIR}/.config; \
+		fi; \
 		make -C $${KDIR} SUBDIRS="${LOCALSUBDIRS}"
COMPILE_VERSION="-DSYSTEM_TYPE_LINUX" EXTRAVERSION=-$${BVER}
INSTALL_MOD_PATH=`pwd`/$${KDIR} modules; \
 		make -C $${KDIR} SUBDIRS="${LOCALSUBDIRS}"
COMPILE_VERSION="-DSYSTEM_TYPE_LINUX" EXTRAVERSION=-$${BVER}
INSTALL_MOD_PATH=`pwd`/$${KDIR} modules_install; \
 		for i in ${LOCALSUBDIRS}; do \
@@ -42,16 +73,14 @@
 		for i in ${LOCALSUBDIRS}; do \
 			ln -s ../$$i $${KDIR}/$$i ; \
 		done; \
-		cp $${KDIR}/kernel-$${KVER}-i386-BOOT.config
$${KDIR}/.config; \
-		cp $${KDIR}/kernel-$${KVER}-i386.config $${KDIR}/.config; \
-		cp $${KDIR}/kernel-$${KVER}-i386-smp.config
$${KDIR}/.config; \
-		cp $${KDIR}/kernel-$${KVER}-i686-enterprise.config
$${KDIR}/.config; \
+		if [ ! -e $${KDIR}/.config ]; then  \
+			cp ${config_file} $${KDIR}/.config; \
+		fi; \
 		make -C $${KDIR} SUBDIRS="${LOCALSUBDIRS}"
COMPILE_VERSION="-DSYSTEM_TYPE_LINUX" EXTRAVERSION=-$${BVER}
INSTALL_MOD_PATH=`pwd`/$${KDIR} modules; \
 		make -C $${KDIR} SUBDIRS="${LOCALSUBDIRS}"
COMPILE_VERSION="-DSYSTEM_TYPE_LINUX" EXTRAVERSION=-$${BVER}
INSTALL_MOD_PATH=`pwd`/$${KDIR} modules_install; \
 		for i in ${LOCALSUBDIRS}; do \
 			rm $${KDIR}/$$i ; \
 		done; \
-		rm $${KDIR}/.config; \
 		rm $${KDIR}/modules/*; \
 		rmdir $${KDIR}/modules; \

dellomsaesm patch

--- /tmp/dellomsaesm.orig	Tue Nov 20 16:01:37 2001
+++ dellomsaesm	Tue Nov 20 17:05:10 2001
@@ -26,6 +26,8 @@
 # Source script functions
 . /etc/rc.d/init.d/functions
 
+set -x
+
 OMSA_NAME="Dell OpenManage Server Agent"
 OMSADD_NAME="${OMSA_NAME} Device Drivers"
 OMSADD_ROOT_DIR="/usr/lib/dell/openmanage/omsa/drivers"
@@ -247,23 +249,46 @@
 	GENERIC_VER=`uname -r | sed "s/-.*//"`
 	GENERIC_VER_DIR="${OMSADD_OPEN_DIR}/${GENERIC_VER}-generic"
 
-	CURRENT_VER=`uname -r | sed "s/[a-z].*//"`
+	# There are various formats for uname -r
+	# 2.4.3-6smp 2.4.3-6 2.4.3-6enterprise (for Red Hat kernels)
+	# 2.4.15-pre7  (for Linus pre kernels)
+	# 2.4.15       (for Linus released kernels)
+	# 2.4.14-ac8   (for Alan Cox kernels)
+	# 2.4.14ac8    (for Alan Cox kernels built from 'make rpm')
+
+	CURRENT_VER=`uname -r`
 	CURRENT_VER_DIR="${OMSADD_OPEN_DIR}/${CURRENT_VER}"
+	KERNEL_SOURCE_DIR="/usr/src/linux"
+
+	# The canonical location for the kernel
+	if [ -e /lib/modules/${CURRENT_VER}/build ]; then
+	    KERNEL_SOURCE_DIR="/lib/modules/${CURRENT_VER}/build"
+	elif [ -e /usr/src/linux ]; then
+	    KERNEL_SOURCE_DIR="/usr/src/linux"
+	elif [ -e /usr/src/linux-2.4 ]; then
+	    KERNEL_SOURCE_DIR="/usr/src/linux-2.4"
+	fi
 
 	# Create generic version directory
 	mkdir -p ${GENERIC_VER_DIR}
-	ln -sf /usr/src/linux*/arch ${GENERIC_VER_DIR}
-	ln -sf /usr/src/linux*/scripts ${GENERIC_VER_DIR}
-
+	ln -sf ${KERNEL_SOURCE_DIR}/arch ${GENERIC_VER_DIR}
+	ln -sf ${KERNEL_SOURCE_DIR}/scripts ${GENERIC_VER_DIR}
 	# Create current version directory
 	mkdir -p ${CURRENT_VER_DIR}
-	cp -rf /usr/src/linux*/configs/* ${CURRENT_VER_DIR}
2>>${OMSADD_LOG_FILE}
+	# Copy the .config file or configs/* if necessary
+	if [ -e ${KERNEL_SOURCE_DIR}/.config ]; then
+	    cp -f ${KERNEL_SOURCE_DIR}/.config ${CURRENT_VER_DIR}
2>>${OMSADD_LOG_FILE}
+	else
+	
+	    cp -rf ${KERNEL_SOURCE_DIR}/configs/* ${CURRENT_VER_DIR}
2>>${OMSADD_LOG_FILE}
+	fi
+
 	if [ $? != 0 ];
 	then
 		echo "The kernel headers and source are not installed."
>>${OMSADD_LOG_FILE}
 		return 41
 	fi
-	ln -sf /usr/src/linux*/include ${CURRENT_VER_DIR}
+	ln -sf ${KERNEL_SOURCE_DIR}/include ${CURRENT_VER_DIR}
 
 	# Copy the rules for compiling
 	cp -sf ${OMSADD_OPEN_DIR}/install/Rules.make ${GENERIC_VER_DIR}
 
 <<Makefile.patch>>  <<dellomsaesm.patch>> 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Makefile.patch.txt
Url: http://lists.us.dell.com/pipermail/linux-poweredge/attachments/20020325/66c73413/Makefile.patch.txt
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dellomsaesm.patch.txt
Url: http://lists.us.dell.com/pipermail/linux-poweredge/attachments/20020325/66c73413/dellomsaesm.patch.txt


More information about the Linux-PowerEdge mailing list