How can I tell what patches are already on if any?

Peter






Michael MacIsaac <[EMAIL PROTECTED]>
Sent by: Linux on 390 Port <[EMAIL PROTECTED]>
05/02/2002 10:18 AM
Please respond to Linux on 390 Port


        To:     [EMAIL PROTECTED]
        cc:
        Subject:        Re: Samba causes kernel to abend


> it creates a problem and Linux has to be rebooted.

Known problem - you can:

(a) Pay for support and SuSE will supply you with the latest fixes, or,
(b) Patch the kernel with IBM developerWorks patches 3 and 4:

For (b) I wrote it up redbook-style (which has become a bad habit :))
Go to:
http://www10.software.ibm.com/developerworks/opensource/linux390/index.shtml
Under "Downloads for kernel 2.4" in the left frame,
we click on Recommended level (2.4.7). We see the
patches from November, 2001 and click on
linux-2.4.7-s390-3 which moves us further down
the same HTML page. We then click on
linux-2.4.7-s390-3.tar.gz which brings up a browser
panel with the GNU GPL. When we click Accept,
we are able to download the patch.

We do the same for patch 4 (linux-2.4.7-s390-4.tar.gz),
and FTP these two files to /usr/src on the Linux system
to be patched. (you may also consider patches 5
and 6, but they are not needed for the kernel oops)
Get the kernel source
Those which come with the distribution are usually
shipped in RPMs. If the RPM is installed, the head
of the source tree is almost always in the directory
/usr/src. If you do not have the directory
/usr/src/linux-2.4.7.SuSE, it can be added via YaST as follows:
# yast
Choose Package Management (Update, Installation, Queries)
  Choose Change or create configuration
    Choose Development (C, C++, Lisp, etc.)
      Choose kernel-source (with a space bar, then F10)
    Escape up a level
  Choose Start installation - watch for "INSTALLATION COMPLETE"
  Choose Main Menu - SuSEconfig is launched
Choose Exit Yast
You should now have a directory /usr/src/linux-2.4.7.SuSE.
Patch the code
We now have the patches as tar files named
linux-2.4.7-s390-3.tar.gz and linux-2.4.7-s390-4.tar.gz
on our Linux system. We untar them:
# cd /usr/src
# tar -xzf linux-2.4.7-s390-3.tar.gz
# tar -xzf linux-2.4.7-s390-4.tar.gz
We now have .diff files which are also called patches.
We peek into them using the head command to see the directory
structure:
# ls *.diff
linux-2.4.7-s390-3.diff  linux-2.4.7-s390-4.diff
# head -3 *.diff
==> linux-2.4.7-s390-3.diff <==
linux-2.4.7-s390/Documentation/s390/chandev.8
--- linux-2.4.7/Documentation/s390/chandev.8    Wed Nov  7 11:43:51 2001
+++ linux-2.4.7-s390/Documentation/s390/chandev.8  Wed Oct 17 14:44:39
2001

==> linux-2.4.7-s390-4.diff <==
diff -urN linux-2.4.7/arch/s390/kernel/entry.S
linux-2.4.7-s390/arch/s390/kernel/entry.S
--- linux-2.4.7/arch/s390/kernel/entry.S        Fri Nov 23 16:30:58 2001
+++ linux-2.4.7-s390/arch/s390/kernel/entry.S   Fri Nov 23 16:32:38 2001
Note that the base directory is named linux-2.4.7 and the
directory from which the patch was obtained is linux-2-4-7-s390.
To apply a patch cleanly, the base directory must be named
correctly, so we create two symbolic links - one named linux-2.4.7
because that is what the patch file expects and one name linux
because by convention, the directory /usr/src/linux contains
the current kernel's source code (If you were to upgrade to a
new kernel or IPL a different one, you should update the symbolic
link /usr/src/linux). We then apply patches 3 and 4:
# cd /usr/src
# ln -s linux-2.4.7.SuSE linux-2.4.7
# ln -s linux-2.4.7.SuSE linux
# patch -p0 < linux-2.4.7-s390-3.diff
# patch -p0 < linux-2.4.7-s390-4.diff
To customize the build, you use the make menuconfig command.
Just exit and save the values (unless you want to change some
build configuration variables).
We now build the kernel.
# make dep
...
# make modules
...
# make modules_install
...
# make image
...
Write the new kernel to the boot DASD
We now want to write the IPL record to cylinder 0 of the DASD that will be
IPLed.
Look at the [ipl] section of /etc/zipl.conf:
[ipl]
target=/boot/zipl
image=/boot/kernel/image
#ramdisk=/boot/initrd
parameters="dasd=0130-134 root=/dev/dasda1 noinitrd"
Now backup and copy the new kernel files
# cd /boot/kernel
# mv image image.orig
# mv ipleckd.boot ipleckd.boot.orig
# mv System.map System.map.orig
# cd /usr/src/linux-2.4.7/arch/s390/boot
# cp image /boot/kernel
# cp ipleckd.boot /boot/kernel
# cd /usr/src/linux-2.4.7
# cp System.map /boot/kernel
Now run zipl to write the boot info to DASD and reboot
cp System.map /boot/kernel
# cd /etc
# zipl -c zipl.conf
building bootmap    : /boot/zipl/bootmap
adding Kernel Image : /boot/kernel/image located at 0x00010000
adding Parmline     : /boot/zipl/parmfile located at 0x00001000
Bootloader for ECKD type devices with z/OS compatible layout installed.
Syncing disks....
...done
# shutdown -r now
Now you can IPL the new kernel. smbd will no longer cause an oops
when a share is written to.

          -Mike MacIsaac,  IBM   [EMAIL PROTECTED]   (845) 433-7061

Reply via email to