Tux on VM

Last updated on:
Tuesday, December 01, 2015

Software

Information

Community

News

Fun

Credits




Valid HTML 4.01!
Linux for Big Iron

IBM's current patches for the Linux kernel are available at the developerWorks web site.


Generate a SLES for System z AutoYaST Install File

(Last updated April 19, 2010)
Mark Post has created a script that will generate an autoinst.xml file that can be used to automate a very minimal SLES on System z install.

Bring an unconfigured QETH device online

Mark Post has created a script that can be used to bring an unconfigured QETH device online, whether that is a real or virtual OSA or HiperSocket. This has only been tested on a SLES10 SP2 system. No warranties, unsupported, etc.

Make SLES9 Install Tree Script

(Last updated March 31, 2008)
Mike MacIsaac of IBM has created a script that takes the installation CD .iso images for SLES9, the Service Pack CD .iso images, and combines them all into one directory structure that can be used to install new SLES9 systems.

Linux 2.4.26 - 2.4.32 Patches for S/390 and zSeries

These files have the equivalent of all the IBM patches for their 2.4.21 "June 2003 stream," plus a couple of patches to fix compilation errors. Most of the work was done by the Debian folks, so thank them (although I'm gaining on them). The kernels resulting from these patches have been IPLed, but not much testing done. No warranties, use at your own risk, the usual stuff.

These patches do include the timer patch, and the kerntypes patch, as well as the two patches for xip2fs.
Older versions

Netware to Samba Conversion Tool

Joe Poole and Brian Mays of Boscovs have donated some VB code that they used to migrate/convert 600 users and 80GB of their data from a Netware 4.1 environment to Samba running on Linux. They also did something very unusual for our industry, and provided some documentation. :) Please note that this is free for your use, no warranty implied, etc., etc. In other words, you get to use the code, not bug them if it doesn't work perfectly in your environment. If anyone does not have MS Word available to read the document, let me know and a PDF version can be created.

Execute in Place file system driver - xip2fs

(Last updated May 1, 2004)
Xip2fs is a file system driver that allows you to mount an ext2-compatible file system from a DCSS (VM Discontiguous Shared Segment). The benefit of using xip2fs instead of mounting the file system as ext2 using the DCSS block device driver is that xip2fs provides execute-in-place capability.

This means that memory-mapping a file residing on xip2fs will simply result in the user process' page table entries pointing directly to the DCSS pages, as opposed to reading file pages into the page cache (as a typical ext2 mounted file system would do).

Since all executables and shared libraries are memory-mapped in order to execute, running those from an xip2 mounted file system will mean that all processes across all VM guests in the system that use these files will share the same physical pages of memory to hold the executable code, potentially resulting in significant overall memory savings.

There is also a new manual, specifically dedicated to these patches, on IBM's developerWorks web page. Both the "containing" page, and the document itself are referenced below.

Linux/390 Interface to z/VM's Control Program - cpint

(Last updated September 7, 2005)
Neale Ferguson has created a program that will allow superusers on Linux/390 guests running on z/VM to issue CP commands, and get back the response. The original version of the command came out in 2000, and has been improved several times since then. The command has been packaged with at least one Linux/390 distribution. If yours does not have the latest version in binary form, you will need to build it from the source provided below.

Bootshell support for gcc 3.2 and glibc 2.2.5

Mark Post contributed a small patch to Mike Kershaw's bootshell program that will allow it to compile with gcc 3.2 and glibc 2.2.5. A link to both the original source, and the patch are included.

CMS File System (cmsfs) Utilities mirror

(Last updated February 12, 2006)
As requested by Rick Troth, we are providing a mirror copy of his CMS File System package. This package allows access to CMS files on CMS minidisks that are owned or linked by a Linux/390 guest on z/VM. The CMS minidisk must not reside in a z/VM SFS pool.
http://linuxvm.org/Patches/S390/cmsfs-1.1.8c.tar.gz
http://linuxvm.org/Patches/S390/cmsfs-1.1.8.tar.gz
http://linuxvm.org/Patches/S390/cmsfs-1.1.7.tar.gz

Multiple Configuration Boot Support

(Last updated March 19, 2003)
Leland Lucius has created a "multiboot" patch that adds the ability to IPL different configurations from the same device using the LOADPARM parameter on VM's IPL command or the "Load Parameter" field on the Hardware Management Console.

It is especially useful when IPLing zLinux in an LPAR. You may setup several configs in /etc/zipl.conf, like a known good one, a test one, and one that IPLs into single user mode. Then if something untoward happens while testing, you have alternatives to get zLinux back up.

You can even maintain 1 zipl.conf that can be used by several LPARs and/or VM guests.

The patch applies to s390-tools-1.1.6, available from IBM's developerWorks site.

mono RPMs for Linux/390

(Last updated May 5, 2005)
Neale Ferguson has created updated RPMs for mono on Linux/390. They total about 21MB in size. These should eventually be available at the mono.org web site. They will be removed from here when that happens. The icu- and libicu- files are in support of Unicode.

Patches to gdb 5.2.1

The good folks at Dignus, LLC have donated some patches to gdb 5.2.1 so that it will compile on Linux/390. As is usual with Open Source software, no warranty is implied or expressed, so don't rag on them too much if they don't work for you. There are two patches:
  1. gdb-5.2.1.s390.patch is the one that gets the code to compile. It fixes an incompatability in a type definition that the gdb maintainers aren't willing to fix for Linux/390. A fix very similar to this was reported to the mailing list by Nish Deodhar, back in December of 2001, but he never published the actual diffs.
  2. gdb-5.2.1.s390-tdep.c.patch changes the s390_get_frame_info() function so it will recognize Dignus prologues and some variants of gcc prologues.

A script to print out the current IPL volume

Rob van der Heij documented a technique to determine the IPL volume on a Linux/390 2.4 and higher system. Mark Post turned that into a shell script to make it easy to use. The script checks for a few things that are required to run successfully, and then prints out the device number of the IPL volume. Due to the permissions on /proc/kcore, you must be running with UID=0 to execute the script.

A spam abatement sendmail feature

David Boyes contributed a section of his sendmail host.mc file that relates to spam abatement. He had a number of warnings about trying to use these parameters on your system, so please read them at http://www.marist.edu/htbin/wlvtype?LINUX-VM.31917. The file has been given a hopefully descriptive name, antispam.host.mc.

A patch to the CMS Filesystem (cmsfs) Utilities

Richard Hirst reported a problem with cmsfscp not correctly handling sparse CMS files. According to Richard "for 4K blocks of zeros, CMS does allocate any disk space - it just sets the corresponding indirect pointer on disk to zero." The patch fixes the cmsfs utilities, but does not touch the kernel module.

A patch to 2.4.7 to correct a hang condition when doing I/O to a CMS Reserved Minidisk

Carsten Otte of IBM reported the following problem.

"With our latest 2.4.7 patches there is a problem with CMS reserved minidisk: As soon as you start to do I/O to a CMS reserved minidisk on a system with VM pseudo page fault support, the application doing the I/O hangs forever. The following patch applies on top of the developerworks patches and fixes the problem. Note, that the problem is already fixed on 2.4.17, this is a retrofit of the corresponding patch!"

The patch is available here, since there doesn't seem to be any sign of it on IBM's DeveloperWorks site. There is a later patch file for 2.4.7, but it only seems to address an IUCV problem.

Reba file system benchmark utility

(Contributed by Jim Sibley)
Reba is a file system benchmark focused on the dasd driver and hardware file system using sequential write and read. Since the read can be deferred to a later time, the read can be timed to
  • immediately follow the write, highlighting the effect of memory cache
  • after enough data has been written to clear memory, but smaller than the device cache, highlighting the effect of the DASD cache
  • after enough data has been written to clear memory and DASD cache, highlighting the effect of direct DASD I/O.
Reba readme.txt file
Reba binary and source package

Automated Shutdown of the Linux System

(Contributed by Neale Ferguson)
These patches for 2.4.7 and 2.4.17 add support for an automated shutdown of a Linux/390 system when one of these situations are encountered:
  1. CP SHUTDOWN (z/VM 4.3)
  2. CP SIGNAL SHUTDOWN (z/VM 4.3)
  3. LPAR shutdown
It uses the SERVC facility to tell VM/LPAR that it is interested in being informed when the system is going down. At such a time an external interrupt is received (0x2401 - same as used by hwc) with an indicator of how long the system has got before the underlying hypervisor and/or hardware will "vanish." The code, as I've written it, will invoke the ctrl-alt-del processing. If you have the following entry in /etc/inittab You should be in business.
# Powerdown
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -h now
linux-2.4.7-s390-quiesce.diffs
linux-2.4.17-s390-quiesce.diffs
linux-2.4.17-s390x-quiesce.diffs

Patch for IUCV initialization delay

(Contributed by David Kennedy) Note that IBM has produced their own version of this patch, linux-2.4.7-s390-8-iucv, which is available at http://www10.software.ibm.com/developerworks/opensource/linux390/current2_4_x-august2001.shtml#SBCRkernelsum7. IBM claims that when running on a guest with more than one CPU, David's patch can bring down VM.

"Some people have been commenting about slowness in starting up IUCV connections to the TCPIP service on z/VM. Some mailing list messages on this topic include:
http://www.marist.edu/htbin/wlvtype?LINUX-VM.25123
http://www.marist.edu/htbin/wlvtype?LINUX-VM.25137

"It appears the issue with this is because of a race condition in the drivers/s390/net/iucv.c code. The patch provided in this email should remove the race condition.

"This patch can be applied to the latest 2.4 and 2.5 kernel series. I have submitted this patch to linux390@de.linux.com."

Autologin Patch for mingetty for SuSE SLES 7.2

(Contributed by Ken Hall)
"SuSE SLES7 came with a highly modified version of mingetty that wouldn't accept the patch as it was (from http://users.jagunet.com/~kodis/autologin/autologin.html). (It looks like someone added several features without changing the version number.)

"I've refitted the changes and created a new patch that seems to work properly with the version of mingetty shipped with that version.

"You have to install the Source RPM for sysvinit, and then apply the patch to the mingetty-0.9.4b directory."

Configure Problems

Config patch:
Config patch for older autoconf installations:

To cleanly port anything with a configure script, you will want to apply this patch to config.guess and config.sub. In the directory that contains config.guess and config.sub:
patch -p1 < pathname-of-config.patch

If that fails, you should try the patch for older autoconf scripts and see whether that works.

I have written a tool, patchconf.pl, to apply the patch recursively within a directory hierarchy. Its syntax is
patchconf.pl patch-file-name [dir ...]

If no directory is given, it works from the current directory downward.

It is quite possible that neither of these patches will work. There are a near-infinite number of configure script variations out there. What you want to do is actually fairly simple.

  • config.guess tries to determine your machine type. It does this by parsing the output of uname. In short, you look for "s390" and return "s390-ibm-linux".
  • config.sub uses that information to return the canonical system name. In older configuration scripts, this is a 3-part name, which is also "s390-ibm-linux". More recent scripts return a four-part name, which should be "s390-ibm-linux-gnu".
  • Even if they won't apply cleanly, the patch files are a good starting point for fixing your own configure scripts.

In general, configure wants to give you CFLAGS of -g -O2. Optimization level 2 is currently broken under Linux/390, so you should specify CFLAGS=-O1 on your make command line.

This can be made trickier if CFLAGS itself is more complex; in general, replace -Ox, where x > 1, with -O1.
sed -e 's/\-O[2-9]/\-O1/g' run over the Makefile will do the trick.

Ported software

So far, I have patches for the following packages to build them under the IBM flavor of Linux/390.

Questions? Problems? Send mail to Adam Thornton, <adam@io.com>.


Date Problems

If you're running the 2.2.14 level of Linux/390 and the date is incorrect here's how to fix it:

  1. make a new compiler:
    • Get the original source tree for the gcc-2.95.2 and the gcc-2.95.2-s390.diff patch from Developers Works.
    • Unpack the gcc source tree and apply the main patch: -
       tar xfz gcc-2.95.2.tgz patch -sp0 < gcc-2.95.2-s390.diff 
    • Then apply the condition code patch: -
       patch -sp0 < gcc-2.95.2-cc.diff
      gcc-2.95.2-cc.diff should contain:
      --- gcc-2.95.2-s390/gcc/config/s390/s390.md~ Wed Mar 1 11:29:41 2000
      +++ gcc-2.95.2-s390/gcc/config/s390/s390.md Wed Mar 1 08:09:49 2000
      @@ -97,7 +97,7 @@
       (eq_attr "type" "arith")
          (const_string "clobber") (eq_attr "type"
          "logic") (const_string "clobber") (eq_attr
          "type" "test") (const_string "compare")
          - (eq_attr "type" "muldiv") (const_string
          "none") + (eq_attr "type" "muldiv")
          (const_string "clobber") (eq_attr "type"
          "branch") (const_string "none") (eq_attr
          "type" "jsr") (const_string "clobber")
          (eq_attr "type" "nop") (const_string "none")
          
      The patch commands should not report any problem.
    • After the source has been patched, compile gcc:
      • mkdir gcc-build
      • cd gcc-build
      • ../gcc-2.95.2/configure --prefix=/usr --target=s390-ibm-linux --host=s390-ibm-linux --enable-languages="c,c++" --enable-shared
      • make install


  2. make a new glibc with the new compiler:
    • Get a copy of the source rpm glibc-2.1.2-11.src.rpm.
    • Get the diff files glibc-2.1.2-s390.diff and
    • glibc-linuxthreads-2.1.2-s390.diff.
    • Install the source rpm and move the diff files to /usr/src/redhat/SOURCES.
    • Add the patches to the glibc-2.1.spec file in /usr/src/redhat/SPECS. Here is a diff file which might help:
      --- glibc-2.1.spec~ Fri Mar 3 14:35:52 2000
      +++ glibc-2.1.spec Mon Feb 7 17:10:19 2000 
      @@ -18,6 +18,8 @@ 
       Patch6: glibc-2.1-sparcll.patch
       Patch7: glibc-2.1-nojaydbg.patch
       Patch8: glibc-2.1-version.patch
      +Patch9: glibc-2.1.2-s390.diff
      +Patch10: glibc-linuxthreads-2.1.2-s390.diff
       Buildroot: /var/tmp/glibc-%{PACKAGE_VERSION}-root
       Obsoletes: zoneinfo, libc-static, libc-devel, libc-profile,
       Obsoletes: libc-headers, linuxthreads, gencat, locale
      @@ -108,6 +110,8 @@
       %patch6 -p1
       %patch7 -p1
       %patch8 -p1
      +%patch9 -p1
      +%patch10 -p1
       %ifarch armv4l rm -rf glibc-compat 
    • Now compile the glibc with the command
      rpm --bb --clean
              glibc-2.1.spec
    • Take a coffee break. A long one if you have a slow machine.
    • After its done you can install the new glibc with the commands
      "cd /usr/src/redhat/RPMS/s390 ; rpm -i --force --nodeps
              glibc-*"

      Questions? Problems? Send mail to Martin Schwidefsky, <schwidefsky@DE.IBM.COM>
      .
 

Site hosting courtesy of Velocity Software