Here's a script I wrote that I've used to update several systems:

#!/bin/sh
#
#  install_kernel_updates - install Mandrake 7.1 kernel updates
#

RPMS="location of your RPMS"


OLDVER="2.2.15-4mdk"
VER="2.2.16-9mdk"

#
#  Save the old loop module, in case of problems.
#  The kernel updates delete it and we need it
#  later for 'mkinitrd'
#
if [ -f /lib/modules/$OLDVER/blocks/loop.o ]
then
        tar cvf /tmp/loop.tar /lib/modules/$OLDVER/blocks/loop.o \
               /lib/modules/${OLDVER}secure/blocks/loop.o
fi

#
#  Load the loop module for 'mkinitrd'
#
insmod loop 2>/dev/null

# verify that that the  module is loaded
lsmod | grep ^loop
if [ $? -ne 0 ]
then
        echo "ERROR: unable to load loop module"
        exit 1
fi

rpm -ivh $RPMS/kernel-headers-$VER.i586.rpm
sleep 3
rpm -ivh $RPMS/kernel-source-$VER.i586.rpm
sleep 3


KERN_LIST="
kernel-$VER.i586.rpm
kernel-doc-$VER.i586.rpm
kernel-secure-$VER.i586.rpm
kernel-utils-$VER.i586.rpm"

#
#  Install kernel updates
#
for PKG in $KERN_LIST
do
        rpm -Fvh $RPMS/$PKG
        echo "======="
        sleep 3
done

#
#  Update ReiserFS utilities
#
rpm -Fvh --force $RPMS/reiserfs-utils-2.2.16_3.5.19-9mdk.i586.rpm
echo "======="
sleep 3


#
#  Fix stuff so that ReiserFS will work
#
#  The 'mkinitrd' needs the loop.o module, which seems to
#  have been deleted in a previous step.  Where should be do this?
#
mkinitrd -f --ifneeded /boot/initrd-$VER.img $VER
mkinitrd -f --ifneeded /boot/initrd-${VER}secure.img ${VER}secure

#
#  Set up links to new kernel
#
rm -f /boot/initrd.img
ln -s initrd-${VER}.img /boot/initrd.img

rm -f /boot/initrd-secure.img
ln -s initrd-${VER}secure.img /boot/initrd-secure.img

rm -f /boot/vmlinuz
ln -s vmlinuz-${VER} /boot/vmlinuz

rm -f /boot/vmlinuz-secure
ln -s vmlinuz-${VER}secure /boot/vmlinuz-secure

#
#  run lilo
#
/sbin/lilo

At 01:33 PM 7/11/00 -0500, you wrote:
    I am having problems updating my kernal for 7.1 I am using update to
do the job, and I'm using the ReiserFS. In the documentation it says
that I need to do the following

    mkinitrd -f --ifneeded /boot/initrd-2.2.16-9mdk 2.2.16-9mdk

I let update install the kernal, but every time I try to mkinitrd it
barfs. I get in error message stating the the kernal is not a loopback.
I need to install loop.o or recomplile the
kernal. I tried to install loop.o, but I get an error that the module is
not found. After I update the kernal initrd-2.2.16-9mdk is not found,
but vmlinuz-2.2.16-9mdk is and thats what I use. I could compile a new
kernal myself, but I would realy like to get this to work.

    Can anyone tell me what I did wrong, or what I need to do to correct
this problem??

Jerry



Reply via email to