Re: Upgrading to a test kernel

Riley Williams (rhw@ps.cus.umist.ac.uk)
Mon, 25 May 1998 22:05:56 +0100 (BST)


Hi Michael.

>>>>>> Looking for some help from the Red Hat users on this list (or
>>>>>> knowledgable others). I've tried a couple of times before to
>>>>>> upgrade my existing RH 5.0 system to one of the test kernels, but
>>>>>> I usually end up screwing up one thing or another. I have read the
>>>>>> documentation, and I've tried to upgrade almost of the packages
>>>>>> necessary as listed by the minimum version numbers in the
>>>>>> documentation.

>>>>>> If anyone is currently running RH 5.0, and has successfully gotten
>>>>>> to the point of running a test kernel, I would like to discuss the
>>>>>> steps that you took to get to that point.

>>>> In my case, here's the procedure I used to update to the latest of
>>>> everything...I use the RedHat mirror on SunSite.doc.ic.ac.uk but the
>>>> following should also work with RedHat's own site...

>>>> Q> #!/bin/bash
>>>> Q> mkdir /redhat
>>>> Q> mount -t nfs -o ro,soft,rsize=8192,wsize=8192 \
>>>> Q> 193.63.255.4:/public/Mirrors/ftp.redhat.com/ /redhat
>>>> Q> cd /redhat/pub/redhat/current/updates/i386
>>>> Q> for Z in *.i386.rpm ; do
>>>> Q> X=`echo $Z | sed 's/-[0-9]*\./ /' | cut -d ' ' -f 1`
>>>> Q> Y=`rpm -q $X 2> /dev/null`
>>>> Q> if [ "$Y" != '' ]; then
>>>> Q> if [ $Y.i386.rpm != $Z ]; then
>>>> Q> echo "Updating $Y.i386.rpm to $Z" >&2
>>>> Q> rpm -Uvh $Z
>>>> Q> fi
>>>> Q> fi
>>>> Q> done
>>>> Q> cd /
>>>> Q> umount /redhat
>>>> Q> rmdir /redhat

>>>> The result of the above sequence is that ALL of your currently
>>>> installed RedHat-supplied RPM's are updated to the latest versions,
>>>> thus reducing the problems caused by old versions...

>>> I'm gonna ask a dumb question here, but this script assumes that I
>>> have NFS support either built-in or as a module, correct?

>> Yes, it does - but as far as I'm aware, ALL of the kernel binaries
>> supplied with the various distributions have NFS support compiled in
>> so that their customers can do an NFS install. Certainly both RedHat
>> and Slackware include suchlike support. As a result, that shouldn't be
>> a problem...

> I believe you are correct in that it is installed in the default kernel
> supplied by Red Hat.

My system runs under RedHat 5.0, having previously run under 4.1 and
4.2, and I anticipate upgrading to RedHat 5.1 when it's released...

> I have sinced recompiled the kernel with options that I want and
> one of them wasn't the NFS stuff. I will recompile tonight and add
> it back in. Thanks for the heads up.

No problem...

Actually, it CAN be done a different way, but the alternative is
considerably more complex. Using the NFS approach means that all the
complex bits are irrelevant since the NFS does them for us...

In case you want to investigate it, the basic non-NFS approach is as
follows:

1. Use ftp to download a directory listing of the relevant updates
directory from RedHat's site.

2. FETCH=''

3. Step through that listing one line at a time, applying the
following steps to each line.

A. Assign the filename in the line to the variable LATEST

B. PREFIX=`echo $LATEST | sed 's/-[0-9]\./ / | cut -d ' ' -f 1`

C. CURRENT="`rpm -q $PREFIX 2> /dev/null`"

D. if [ "$CURRENT" != '' ]; then
if [ $CURRENT != $LATEST ]; then
FETCH="$FETCH $LATEST"
fi
fi

If, after the above procedure has been executed, the environment
variable FETCH is non-blank, then there are updated RPM's available,
so start up an AnonFTP session to RedHat's site and grab the ones
listed in $FETCH into a local directory, then "rpm -Uvh" the ones
you've just downloaded...

Best wishes from Riley.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu