Tux on VM

Last updated on:
Sunday, July 06, 2008

Software

Information

Community

News

Fun

Credits

Linux for Big Iron

Building Linux/390 Under VM/ESA Using Minidisks and IUCV TCPIP

(Rev. B - 5/23/00)

By Gordon Wolfe, Ph.D

VM Technical Services

The Boeing Company, Seattle

gordon.w.wolfe@boeing.com

  1. Obtaining the Code

A. Disclaimers

This is a "cookbook" for installing the Marist version of Linux as a guest under a VM/ESA system. Specifically, it shows how we at Boeing have installed Marist Linux 2.2.1.4 under VM/ESA 2.4.0 using minidisks for the Linux file system and using IUCV to communicate with TCPIP on the VM host. If you’re expecting a cookbook for installing in an LPAR or on native hardware, this document won’t help you. If you would prefer to use the DASD drivers instead of the minidisk drivers, you’ll have to work that out for yourself. If you want to use virtual or real CTC’s to communicate with TCPIP or connect a 3172 or CISCO router directly to Linux, you’ll have to ask someone else.

Part of the reason for this document is that there is considerable confusion in the Linux/390 community about the methods of installation. Part of that confusion is caused by the fact that some of the documentation stored with the Marist code is for an earlier release and is obsolete or incorrect for the 2.2.14 release. This document is a compilation of the gleanings from months of e-mail and archives on the Linux-390 listserver. (The real reason for this document is so we ourselves can have all the information in one place while waiting for the redbook to come out.)

All we are willing to say is that this method appears to have worked for us at Boeing, using our releases of software on our version of hardware in our configuration. It may or may not work for you. It is presented to the Linux-VM community as guidelines that may or may not help and we at Boeing are not responsible for whether it works for you or not. We’re sure that some errors and typos have crept into this document, so use it at your own risk.

Lastly, It should be pointed out that in Linux/390, unlike VM/ESA, there is a difference between minidisk and DASD. Using minidisks with Linux under VM has some advantages and disadvantages. DASD is bootable, minidisks are not, but minidisks can benefit from CP error recovery processes and standard CMS backup techniques can be used to back up Linux. Different Linux drivers are used for each method and different processes are used to set them up. This document will discuss only the minidisk method.

B. FTP from Marist College

First of all, you need to obtain the code files from the Marist site. Four files are needed:

IMAGE.VM

INITFS_B.TGZ

INITMD.TXT

INITRD.GZ

Note that these filenames are not the same as listed in the "Linux for S/390 Installation, Configuration and Use" manual also downloadable from the Marist site.

The Marist site is generally accessible from a web browser at http://linux390.marist.edu. and you can download direct to your PC browser and then do binary FTP to the VM mainframe. But a better method, if you have FTP capability direct from VM, is to use anonymous FTP direct to the Marist site, as follows: (Items in bold are what you type in)

Ready;

term chardel off

Ready;

set ldrtbls 24

Ready;

ftp linux390.marist.edu

USER (identify yourself to the host):

anonymous@linux390.marist.edu

>>>USER anonymous@linux390.marist.edu

331 Guest login ok, send your complete e-mail address as password.

Password:<enter your e-mail address here>

>>>PASS ********

230 Guest login ok, access restrictions apply.

Command:

cd /pub/download

250 CWD command successful.

Command:

ls

>>>PORT 192,33,58,110,5,0

200 PORT command successful.

>>>NLST

150 Opening ASCII mode data connection for file list.

archive1

image.tape

image.vm

initfs_big.tgz

initfs_small.tgz

initmd

initrd.gz

lcs-2.2.14.o.gz

image.vm.bin

image.tape.bin

initmd.bin

initrd.bin.gz

Linux390.pdf

Linux390_QS.pdf

Linux390_lcs.pdf

inst.pdf

quick.pdf

lcsdd.pdf

226 Transfer complete.

Command:

binary

FILE TRANSFER IS IMAGE

locsite fix 80

get image.vm.bin image.vm

226 Transfer Complete

locsite fix 1024

get initmd initmd.txt

226 Transfer Complete

get initrd.gz

226 Transfer Complete

get initfs_big.tgz initfs_b.tgz

226 Transfer Complete

quit

>>>QUIT

221- Goodbye...

Doing a FILELIST on the receiving minidisk, you should see

INITMD TXT C1 F 1024 65536 15978

INITRD GZ C1 V 8192 369 738

IMAGE VM C1 V 8192 178 356

INITFS_B TGZ C1 V 28672 3564 24948

Check the file sizes with the above. If yours are smaller, you may have a problem with the transfer. There is no need to "unzip" the "GZ" files. That will be done later. Ignore the fact that you used block sizes of 80 and 1024 and these are different.

  1. Building a RAMDISK version for Install
  1. Set up the Userid

Now we need a userid to act as the guest for VM. Let’s assume that Linux/390 will run as userid named DLNXTEST in a VM/ESA system named VMHOST. We need to set up a userid DLNXTEST that looks like this:

USER DLNXTEST LINUX390 64M 256M G

IPL CMS PARM AUTOCR

MACHINE ESA

ACCOUNT LINUX DLNXTEST

IUCV ALLOW

IUCV ANY PRIORITY

IUCV *CCS PRIORITY MSGLIMIT 255

CONSOLE 0009 3215

LINK MAINT 190 190 RR

LINK MAINT 19E 19E RR

MDISK 1B0 3390 10 200 LXVOL1 MR ROOT ROOT ROOT

MDISK 1B1 3390 1 1000 LXVOL1 MR FILESYS FILESYS FILESYS

MDISK 191 3390 402 1 LXVOL1 MR

The MACHINE ESA statement is very important. LINUX will not run without it. The IUCV statements are required to communicate with TCPIP on VMHOST.

Do a CMS format on the 191 minidisk.

Place the four files you downloaded from Marist onto the 191 disk of this userid.

  • Set up the Parm file

Many thanks to Rob van der Heij of Princeton University for much of the following.

Log on to the DLNXTEST userid.

XEDIT a file named DLNXTEST PARM and put this one line into it.

mdisk=1B0 root=/dev/ram0 ro dasd=

File the result and issue COPYFILE DLNXTEST PARM A ( RECFM F LRECL 80

To be sure the file is fixed-length, 80 characters. Then format the 1B0 disk as follows:

FORMAT 1B0 B

1

LNX1B0

RESERVE LINUX ROOT B6

1

 

  • Create an IPL EXEC and a PROFILE EXEC

Now we have to create an EXEC to actually IPL LINUX from the files we have. Use XEDIT to create the file IPLRDR EXEC A. This one is actually overkill, but it will make sure the right files get into the reader in the right order and nothing else. Don’t put anything in the reader you want to keep!

/* */

ADDRESS COMMAND

'CP SP CONS START TO *'

'CP SP PUN TO * NOCONT'

'CP PUR R ALL'

'PIPE < IMAGE VM A | FBLOCK 80 00 | PUNCH'

'CP SP PUN CLOSE NAME IMAGE VM'

'PUNCH' userid() 'PARM A ( NOH'

'CP CHANGE RDR ALL NOH KEEP'

'PIPE < INITRD GZ A | FBLOCK 80 00 | PUNCH'

'CP SP PUN CLOSE NAME INITRD GZ'

queue 'IPL 00C CLEAR'

We’ll also need a PROFILE EXEC, so enter this from XEDIT:

/*-----------------------------------------------------------*/

/* */

/* */

/*-----------------------------------------------------------*/

'SET RDYMSG SMSG'

'CP SET ACNT OFF'

'CP SET PF12 RETRIEVE'

'CP TERMINAL LINESIZE 255'

'CP TERMINAL CHARDEL OFF'

'ACCESS 1B0 B'

'CP SET EMSG ON'

SAY 'DO YOU WANT TO START UP LINUX NOW? (Y/N)'

PULL ANS .

IF LEFT(ANS,1) = "Y" THEN QUEUE 'EXEC IPLRDR'

EXIT

At this point, if all you want to do is play with Linux and look at the basic filesystem structure, you’re done. You can bring up Linux in the virtual machine as it is. You won’t have any communications. The only terminal you’ll have is the main console. The only filesystem you have is what’s in the RAMDISK that you’ve IPLed. There won’t be any program products at all, and it will give you a few errors at IPL time, but it will come up.

What’s actually happening here is that you punch the Linux image, which is the bootstrap you actually IPL from the reader. When that comes up, it reads the parm file, which tells it how to set up Linux for use. Next, when the image comes fully up, it will recognize the INITRD GZ file as a "g-zipped file" and automatically run "gunzip" to decompress and load it as a ramdisk filesystem and start it.

If you want to try this, just EXEC PROFILE and answer "Y" to start up Linux. You’ll get a couple of pages of messages and the start up of the kernel. When asked for a network, reply "N", ignore the message about Control-D and enter "pass4root" as the root password. You’re up! Note that once you’re logged on to root, you are not in the filestructure yet. To look at the root directory, you must change the directory with the command "cd /".

To shut down Linux, issue the command "shutdown now", and when the messages stop, enter "halt". This should bring you back to CMS, or at least to CP. Answer "N" unless you want to go right back to Linux.

 

3. Setting up TCP/IP

  1. Use IUCV connections
  2. I am much indebted to Romney White of IBM for providing most of the following information.

    Linux can communicate with other hosts using TCPIP. There are many ways to connect TCPIP to Linux, including real Channel-to-Channels, real 3172’s or CISCO routers attached to the virtual machine, virtual channel-to-channel between the Linux virtual machine and the TCPIP machine on the host, or simply IUCV between TCPIP and the Linux virtual machine. The last two require no additional hardware, and of the two, IUCV provides almost two and a half times the speed, up to about 500 mb/sec. This will be a discussion of how to set up an IUCV connection between Linux under VM and the VM host’s TCPIP stack.

     

  3. Setting up TCPIP on the VM Host

First, you will have to go to your TCPIP communications staff and have them assign you some IP addresses that aren’t being used, and create a subnet of your host. You will end up with the IP address of the DLNXTEST server and the subnet mask. This approach does not require any additional hardware, and does not require that DLNXTEST be put in the Domain Name Server or listed in the routers. This means that you will only be able to get to DLNXTEST by doing a TELNET from VMHOST. Using this setup, you won’t be able to TELNET from your PC. If you know more about TCPIP than I do, you can probably work with your TCPIP staff to make DLNXTEST known to the entire local network.

In PROFILE TCPIP in the TCPIP userid on VMHOST, add the following lines in the appropriate sections:

HOME

        1. DLNXTEST <or whatever your DLNXTEST IP address is>

;

DEVICE DLNXTEST IUCV 0 0 DLNXTEST B

LINK DLNXTEST IUCV ) DLNXTEST

;

BSDROUTINGPARMS TRUE

DLNXTEST 9216 0 <subnet mask> <dlnxtest ip address>

ENDBSDROUTINGPARMS

;

START DLNXTEST

You will have to cycle TCPIP before this becomes effective.

4. Building the Base System

  1. Install the base filesystem on 1B0
  2. Log on to the DLNXTEST userid and remain in CMS.

    Using XEDIT, create the PUTDISK EXEC on your a-disk

    /* */

    PARSE UPPER ARG IFN IFT IFM VDEV OFM .

    lblrec=3;chop=0

    if left(diag(210,vdev),1)=='01'x then

    if blksz=512 then lblrec=2

    else do; lblrec=1; chop=512; end

    'PIPE MDSKBLK READ' ofm lblrec '¡ NOT CHOP' chop ,

    '¡VAR lbl'

    if rc <> 0 then exit rc

    parse var lbl cms1 +4 volser +6 . 13 blksz +4 53 offst +4

    BLKSIZE=C2D(BLKSZ)

    'PIPE CMS LISTFILE * * ' ofm'¡TAKE 1 ¡ VAR FILEID'

    if rc <> 0 then exit rc

    'PIPE <' ifn ift ifm '¡',

    'BLOCK 65536 ¡',

    'SPECS RECNO BY' 65536/BLKSIZE '1 1-* NEXT ¡',

    'DISKUPDATE' fileid 'FIXED'

     

    Issue the following commands to load the basic file system onto the 1B0 disk:

    FORMAT 1B0 B ( BLKSIZE 1024

    1

    LNX1B0

    RESERVE LINUX MDISK B6

    1

    PUTDISK INITMD TXT A 1B0 B

     

  3. Set up the Parm file
  4. XEDIT the DLNXTEST PARM file and change the line to look like this:

    mdisk=1B0 root=/dev/mnda ro dasd= iucv=TCPIP

     

  5. IPL and set the TCPIP parameters

The following example is given for a system running on userid DLNXTEST on a host that has the DNS name VMHOST.MYCOMPANY.COM at IP address 192.76.104.163. DLNXTEST has been assigned IP address 192.76.104.169 and the subnet mask is 255.255.255.224. The address of the DNS server is 134.152.1.11 for search domain mycompany.com. Get this information from your TCPIP network folks.

To IPL, EXEC PROFILE and say "Y" to start up Linux, as before. You’ll get lots and lots of pages of startup text. Eventually you will get to the point where it asks you if you are connected to a network. Your responses (adjusted for your particular network) will be in bold.

Are you connected to a network?

Y

Enter the kind of network

    1. OSA Token Ring
    2. OSA Ethernet
    3. Channel to Channel

1

Enter your host name

dlnxtest.vmhost.mycompany.com

Enter your ip address

192.76.104.169

Enter the net mask

255.255.255.224

Enter the broadcast address

192.76.104.169

Enter the gateway address

192.76.104.163

Enter the net address

192.76.104.0

Enter the IP address of the DNS server

134.152.1.11

Enter the search domain

mycompany.com

Linux will ask you to confirm these choices. Enter "Y".

Give root password for maintenance

pass4root

Linux is now up and running with a basic filesystem. The TCPIP configuration is stored in the basic filesystem and will not need to be entered again. To start communications with VMHOST, enter the commands

ifconfig iucv0 192.76.104.169 pointopoint 192.76.104.163 mtu 9216

route add –net default iucv0

These two commands will have to be entered every time you boot Linux. Since they are so lengthy and non-intuitive, you may want to place them in a shell script. See the section below on swap space.

 

  1. Test TELNET

Now that Linux is up and running, you can actually use it! We will need to use it to install the big filesystem in section 5 below, but it’s usable (without all the program products) as is.

To get into Linux from something other than the system console, you’ll need to use TELNET. TELNET can only be used from a userid on VMHOST. Set up an exec with the following lines in it:

/* Log in to DLNXTEST */

address command

‘CP LINK TCPMAINT 592 592 RR’

‘ACCESS 592 K’

'SET LDRTBLS 20'

'CP SET CHARDEL OFF'

'SET INPUT | 7C'

'SET OUTPUT 7C |'

'TELNET 192.76.104.169 ( L'

exit rc

When you run this exec, it will eventually log you in to DLNXTEST. I say eventually because it takes a long time to run. It may take as long as five minutes. I’m told it’s doing some weird things with reverse DNS lookups and broadcasting to every host on your net. There is a way to fix this, but we’ll wait until the big filesystem is installed. Up until now, the only userid on your system is ROOT and its password is pass4root. Once you’re logged in, you can look at the filestructure and see what is available for use. Note that once you’re logged on to root, you are not in the filestructure yet. To look at the root directory, you must change the directory with the command "cd /". To log off, use the command "logout".

5. Installing the Big Filesystem

  1. Format the Minidisk
  2. Much of this is taken from the VM Bootstrapping recipe of Rob van der Heij of Princeton University with many thanks.

    The Marist instructions have you doing the "dasdfmt" commands extensively. Those commands are needed only if you are using the dasd drivers. For minidisk drivers, the formatting is done from CMS using reserved minidisks.

    We are now going to use the big 1B1 minidisk. It needs to be formatted and reserved from CMS in the DLNXTEST userid.

    FORMAT 1B1 C (B 4096

    1

    LNX1B1

    RESERVE LINUX FILESYS C

    1

    Also, the DLNXTEST PARM file needs to be modified yet again to read as follows:

    mdisk=1B0 mdisk=1B1 root=/dev/mnda dasd= iucv=TCPIP

    This is so that Linux can recognize the 1B1 disk as being driven by the mdisk drivers.

  3. Start up LINUX
  4. Start up Linux as you have done before, and use TELNET to log in as root.

  5. FTP the code to LINUX
  6. Initialize and mount the 1B1 disk with a ext2 type filesystem

    mke2fs /dev/mndb –b 4096

    mkdir /mnt/dasd

    mount /dev/mndb /mnt/dasd

    Start up FTP from root and go get the big filesystem file.

    ftp 192.76.104.163 <FTP to VMHOST from Linux>

    dlnxtest

    <password for dlnxtest>

    cd dlnxtest.191

    binary

    get initfs_b.tgz /mnt/dasd/initfs_b.tgz

    quit

    df

    The "df" should show both mnda and mndb. Mndb should be about 15% full.

  7. Install the code
  8. Decompress and install the file initfs_b.tgz by doing

    cd /mnt/dasd

    tar –xzf initfs_b.tgz <this may take a while>

    df

    The last command should show both mnda and mndb, with mndb now about 65% full.

    Now we just have to update the filesystem table by doing

    cd /mnt/dasd/etc

    mv fstab fstab.old

    cat fstab.old | sed s/dasda1/mndb/ > fstab

    ls –alF fstab*

    The "cat" command is tricky. What it is doing is typing out the fstab.old file and running it through a pipe that edits all the occurrences of "dasda1" and changes them to "mndb" and puts the output back into the file "fstab". The "ls" command should show a file "fstab" with a non-zero number of bytes. If you have something otherwise, the problem is probably in the ascii translation of your vertical bar (|). Do "mv fstab.old fstab" to restore the original file, fix your vertical bar, and run the process again.

  9. Change the parm file
  10. Shut down the Linux system and return to CMS.

    Xedit the DLNXTEST PARM file so that it looks like this:

    mdisk=1B0 mdisk=1B1 root=/dev/mndb dasd= iucv=TCPIP noinitrd

     

  11. Change the IPL EXEC
  12. XEDIT the IPLRDR EXEC and comment out these two lines:

    /*'PIPE < INITRD GZ A | FBLOCK 80 00 | PUNCH'

    'CP SP PUN CLOSE NAME INITRD GZ' */

    We won’t need the ramdisk file any more, so there’s no need to punch it out to the reader.

  13. IPL and set the TCPIP parameters
  14. Now you can reboot Linux by running EXEC PROFILE as before. You should see Linux come up with /dev/mndb as the root.

    You will have to re-enter all the TCPIP parameters again, just like in section 4C above. This needs to be done only once.

    You will still have to enter the ifconfig and route statements like always.

  15. Remove the tar file

Once you’re happy with the big filesystem, the file initfs-b.tgz can be removed to save disk space. The command

rm initfs_b.tgz

Will do the trick.

6. Customizing

A. Adding swap space

Swap space will make Linux more flexible and probably faster with multiple users. Adding it is fairly easy. In CMS, change the last lines of PROFILE EXEC to look like this:

SAY 'DO YOU WANT TO START UP LINUX NOW? (Y/N)'

PULL ANS .

IF LEFT(ANS,1) = "Y" THEN do

'CP DEF VFB-512 1B2 50000'

queue '1'

queue 'LXSWAP'

'FORMAT 1B2 E'

queue '1'

'RESERVE LINUX SWAP E6'

queue 'EXEC IPLRDR'

end

EXIT

Alternately, instead of doing the CP DEF VFB-512 in the PROFILE EXEC, you can do it in the directory entry for DLNXTEST:

MDISK 1B2 FB-512 V-DISK 50000 MR

Now change the DLNXTEST PARM file to look like this:

mdisk=1B0,1B1,1B2 root=/dev/mndb dasd= iucv=TCPIP noinitrd

And proceed to bring up Linux by using the PROFILE EXEC.

Once it is up, and you are in the userid ROOT, enter the commands

mkswap /dev/mndc

chmod 600 /dev/mndc

swapon /dev/mndc

These commands will have to be entered every time Linux boots. With this, swapping is running on the V-disk on virtual device 1B2. These three commands can be put into a shell script under root, along with the "ifconfig" and "route" command for TCPIP. If these are put into the file profile.sh in the root directory using the "ed" editor or some other editor, then all these commands can be entered by doing just the following two commands:

cd /

sh profile.sh

If you would like to have these swap commands and the tcpip statements executed automatically at every boot, use some editor and place them at the end of the file /etc/rc.d/rc.local. That is what this file is for.

  1. Adding user space
  2. Add a 1B3 disk sufficiently large enough to hold all the user data you think will be necessary. Format and reserve this disk while in CMS.

    FORMAT 1B3 F

    1

    HOME

    RESERVE LINUX HOME F6

    1

    Then change the DLNXTEST PARM file to read as follows:

    mdisk=1B0,1B1,1B2,1B3 root=/dev/mndb dasd= iucv=TCPIP noinitrd

     

    Finally, start up Linux as usual. Enter the following commands to create and mount the new minidisk as the /u directory:

    mke2fs /dev/mndd –b 4096

    mkdir /u

    mount /dev/mndd /u

    df (should show both mndb and mndd active)

    To make the results permanent after the next boot of Linux, you will have to add mndd to the filesystem table. Do this by carefully editing the file /etc/fstab to add just one line:

    cd /etc

    cp –p fstab fstab.old2 (backup, just in case.)

    ed –p + fstab

    $a (start input mode just after the last line)

    /dev/mndd /u ext2 defaults 0 0

    . (just a period to end input mode)

    1,$w fstab

    q

    To make the user space even cleaner, we can rename it to /home. But there’s already a /home directory, so we have to move that first, and then create a symbolic link from the /u directory to a fictitious /home directory so that when someone looks for something in /home, Linux automatically goes to the /u directory. Do these commands:

    cp –pR /home/httpd /u/httpd

    rm –fR /home/httpd

    rmdir /home

    ln –s –v /u /home

    Instead of doing the last command to set up the symbolic link, you could again edit the /etc/fstab file to mount /dev/mndd as /home instead of /u.

  3. Adding users
  4. To add a user, you need to know several things:

    The name of the userid, e.g. myuser. In the examples below <userid> is simply myuser.

    The userid’s "uid" number, which must be unique in the system.

    A password for the userid

    The user’s group name, like root, or bin or usr or something like that.

    The "gid" number for that group name, listed in /etc/group-

    Where the user’s files will reside, usually in the /home or the /u directory. E.g./u/myuser

    Do a "cat /etc/passwd" for some examples. Don’t make changes directly to this file unless you REALLY know what you’re doing!

     

    Create a directory for the user’s data to live in:

    mkdir /u/<userid> where <userid> is the name of the user.

    Now add the user with the "adduser" command: This example is for a user called myuser with uid=100, in the root group with gid=0 (superuser authority – be careful!), and home directory of /u/myuser, using the kornshell (ksh) and eventually having password of mypass:

    adduser -u 100 -g 0 –G root -d /u/myuser -p temppw -r myuser –s ksh

    passwd myuser

    New UNIX password:

    mypass

    Retype new UNIX password:

    mypass

    chown –R myuser:<groupname> /u/<userid>

    You could probably set up a shell script to perform all of these tasks, including looking to see if the uid is unique and the group/gid are valid.

    A note of caution: If you will have multiple Linux servers, it would be wise if the same userid on all the servers has the same uid/gid numbers on all systems. If you will want to use NFS to share data eventually this will make the process much simpler. It is also wise to extend this rule to all the Unix servers in your network.

  5. Make some updates
  1. Install a new editor
  2. The Hessling Editor (THE) is much like XEDIT. It can be downloaded from http://linux.s390.org/download/

    And specify RPMS and S390 subdirectories. Download to your PC using your browser and then upload to VM via binary FTP and then to Linux via binary FTP.

    A better way is to do direct FTP from VM to the linux.s390.org host.

    ftp linux.s390.org

    anonymous

    youruserid@yourhost.com

    cd /pub/ThinkBlue/RPMS/s390

    binary

    get THE.3.0-1.s390.rpm THE.RPM

    quit

    And then use FTP to move the files from VM to Linux with their original names.

    Once you have the RPM file somewhere, you will need to get to a user with root authority to do the install.

    rpm --install --nodeps THE.3.0-1.s390.rpm

  3. Fix telnet logon speed

Some relief can be had from the long connect time for TELNET by adding the file /etc/hosts. If no other editor is available, use the "ed" editor:

ed

f /etc/hosts

$a

192.76.104.163 VMHOST

192.76.104.169 DLNXTEST

. (just a period to end the input mode)

1,$w /etc/hosts

q

 

Also, the file /etc/resolv.conf needs to be updated as well. If you’ve done the initial TCPIP setup when Linux first booted, it should have the IP address of the DNS server in it, as well as the search domain. Check this with the "cat /etc/resolv.conf" command. You should see two lines with your domain and nameserver. You’ll want to add one line at the top so that TCPIP on Linux will search the /etc/hosts file before asking the Domain Name Server. Do that like this:

ed /etc/resolv.conf

$a

hostresorder local bind

. (just a period to end the input mode)

1,2m3

1,$w /etc/resolv.conf

q

If you don’t have a Domain Name Resolver on the VMHOST, you will have to blank out the IP address after the word "nameserver".

You will need to cycle Linux for this to have an effect.

3. Fix the local time zone

Linux/390 is delivered with Eastern time. To change to Pacific time zone (US) , enter the following two commands (Thanks to Brian Gray of HDS):

mv /etc/localtime /etc/localtime.old

ln -s /usr/share/zoneinfo/PST8PDT /etc/localtime

Other time zones can be found in /usr/share/zoneinfo/

 

  1. Run Linux in a DCSS

(Thanks to Romney White of IBM for supplying this information) Running Linux from a DCSS rather than IPLing it from the reader is simplicity itself. You’re already halfway there by IPLing from the reader.

First, change the directory of the Linux server machine to give it class E CP privilge. We need this to write the DCSS. Then log back on to the server id, but do not start Linux. In CMS, create the MAKEDCSS EXEC

/* CREATES LINUX NAMED SAVED SYSTEM */

address command

trace o

'CP DEFSYS LINUX 0-1FF EW MINSIZE=2M'

'CP PURGE READER CLASS L'

'CP SPOOL PUNCH TO * CLASS L'

'CP SPOOL READER CLASS L'

'PIPE < IMAGE VM A | FBLOCK 80 00 | PUNCH'

'CP SP PUN CLOSE NAME IMAGE VM'

'PUNCH DLNXTEST PARM A ( NOHEADER'

'CP CHANGE RDR ALL NOH KEEP'

initcmd = "RESET 00C #SAVESYS LINUX #TRACE END"

'CP TRACE INST RANGE 10000.4 CMD' initcmd

'CP IPL 00C CLEAR'

Then run the exec. It will define a skeleton for the Linux DCSS, then populate the DCSS by loading the reader the same way we always do. When we IPL the reader, it starts a trace, just in case, loads memory from the reader, then saves it as a DCSS, stops the trace, and quits, leaving you in CP.

To test it, just issue the CP command, "IPL LINUX". It should come up the same way it always does, but much faster.

Note that if you need to change the PARM file, you’ll either have to IPL from the reader again or re-save the DCSS.

To run from the DCSS, either replace the IPL 00C CLEAR with IPL LINUX in the IPLRDR EXEC (and take out all that punching of files), or just change the directory to IPL LINUX instead of IPL CMS.

 

7. Now what?

If you are unfamiliar with UNIX or Linux-type systems, there are a few things you ought to know about the way the filesystem is set up. It’s like SFS in a way. (Actually more like BFS.) Everything is contained within the root (/) directory. Then everything is in a subdirectory below that. Some parallels to CMS:

190 disk /bin/ or /usr/sbin/

19E disk /usr/local/ or /usr/local/bin/

191 disk for user XXX /home/XXX/

19D disk /usr/man/

CF1 and AUTOLOG1 191 /etc/

SYSPROF EXEC /etc/profile

PROFILE EXEC for user XXX /home/XXX/.profile

XEDIT various editors. "vi" is the standard, but is unusable on a 3270-type terminal. This is a "love it or despise it" editor, there doesn’t seem to be any middle ground. ‘the" is much like XEDIT, but must be installed after Linux is up. "emacs" is part of the big file system. ‘ed" is a line-mode editor.

There is no such thing as a CMS search order. To search a number of directories, a user must set up a PATH variable to tell what directories to search for commands or files. The file /etc/profile sets up a default path for all users which includes /bin/, /usr/local/bin/ and /home/XXX/. To add a new directory, say /abc/xyz/ to the PATH, add this to the .profile file on your /home/<userid>/ directory:

PATH=$PATH:/abc/xyz

The following is the list of Program Products on the Big Filesystem, supplied by Rob van der Heij: I don’t even know what all this stuff is, but what I do know of is very useful.

setup-2.0.5-1 emacs-leim-20.4-4 tftp-0.10-23

filesystem-1.3.5-1 emacs-nox-20.4-4 unzip-5.40-1

basesystem-6.0-4 emacs-X11-20.4-4 utempter-0.5.1-2

ldconfig-1.9.5-15 fvwm2-2.2.2-3 xbill-2.0-6

glibc-2.1.2-11 fvwm2-icons-2.2.2-3 xearth-1.0-13

bdflush-1.5-10 gettext-0.10.35-13 xfig-3.2.2-7

chkconfig-1.0.7-2 ghostscript-5.10-10 xfishtank-2.0-14

file-3.26-6 ghostscript-fonts-5.10-3x loadimage-4.1-12

flex-2.5.4a-6 gmp-2.0.2-10 xpaint-2.4.9-8

mingetty-0.9.4-10 gperf-2.7-5 xpm-3.4k-1

mktemp-1.5-1 lesstif-0.86.5-2 zsh-3.0.5-15

mount-2.9o-1 lesstif-mwm-0.86.5-2 Xaw3d-devel-1.3-21

losetup-2.9o-1 lesstif-clients-0.86.5-2 gmp-devel-2.0.2-10

net-tools-1.51-3 libjpeg6a-6a-4 lesstif-devel-0.86.5-2

shadow-utils-19990827-2 libjpeg-6b-9 libjpeg-devel-6b-9

tcp_wrappers-7.6-7 libpng-1.0.3-4 libpng-devel-1.0.3-4

termcap-9.12.6-15 libtiff-3.4-6 libtermcap-devel-2.0.8-18

which-1.0-11 newt-0.50-13 libtiff-devel-3.4-6

autoconf-2.13-5 patch-2.5-8 newt-devel-0.50-13

automake-1.4-5 pdksh-5.2.13-3 python-devel-1.5.2-7

diffutils-2.7-16 perl-5.00503-6 readline-devel-2.2.1-5

groff-1.11a-9 procps-X11-2.0.2-2 slang-devel-1.2.2-4

man-1.5g-6 python-1.5.2-7 xpm-devel-3.4k-1

ntsysv-1.0.7-2 python-tools-1.5.2-7 apache-1.3.9-1

texinfo-3.12h-2 python-docs-1.5.2-7 apache-devel-1.3.9-1

popt-1.3-1 tkinter-1.5.2-7 XFree86-100dpi-fonts-3.3.5-3

vim-common-5.3-7 readline-2.2.1-5 XFree86-3.3.5-3

X11R6-contrib-3.3.2-6 rsh-0.10-25 XFree86-75dpi-fonts-3.3.5-3

Xaw3d-1.3-21 slang-1.2.2-4 XFree86-Xnest-3.3.5-3

bash2-2.03-4 tcl-8.0.5-30 XFree86-Xvfb-3.3.5-3

bash2-doc-2.03-4 tk-8.0.5-30 XFree86-cyrillic-fonts-3.3.5-3

byacc-1.9-11 expect-5.28-30 XFree86-devel-3.3.5-3

chkfontpath-1.5-1 tclx-8.0.5-30 XFree86-doc-3.3.5-3

cvs-1.10.6-2 tix-4.1.0.6-30 XFree86-libs-3.3.5-3

emacs-el-20.4-4 itcl-3.0.1-30 XFree86-xfs-3.3.5-3

 

8. Further Reading

  • See the Linux/390 Documentation Project at http://www.linuxdoc.org/.
  • Much of the information in this document was gleaned from Linux Administration for Dummies, Michael Bellomo, IDG Books, Foster City CA (1999) ISBN 0-7645-0589-0. It includes a CD-ROM to install a version of Linux on a PC.
  • There are a lot of "how-to’s at http://howto.tucows.com/howto.html.
  • Information on the GNU project and the free software foundation can be found at http://www.gnu.org/.
  • Subscribe to the Linux-390 Listserver! All your questions will be answered and the archives are a gold mine! The archives and a subscription form can be found at http://www.marist.edu/htbin/wlvindex?linux-vm.
  • I presume you’ve already found the Marist download site at http://linux390.marist.edu/ and the IBM Linux/390 site at http://oss.software.ibm.com/developerworks/opensource/linux390/.
  • Believe it or not, some OpenEdition manuals have lots of information applicable to Linux. Allow me to recommend SC24-5728-01 "OpenEdition for VM/ESA Command Reference for VM/ESA 2.3.0" and a redbook SG24-4747-00 "OpenEdition for VM/ESA Implementation and Administration Guide".
 

Site hosting courtesy of Velocity Software