From: afx@muc.ibm.de (Andreas Siegert)
Subject: AIXTIPS NEWS 92374
Followup-To: comp.unix.aix
Reply-To: aixtips@ibm.de
Organization: IBM AIX Field Support Center, Munich
Date: Tue, 17 Nov 1992 10:48:40 GMT

This is AIXTIPS NEWS for customers released at Tue the 17. Nov 1992.

Table of contents:
92374. A simple way to do NLS adaption for TN3270
92376. Secondary Boot Server for Diskless WS
92379. Disk Clear Utility
92384. Switching from a standalone system to a /usr client
92393. Underlining in xterm, FYI
92394. HOTW: What is the size of a memory page?  Use:  PAGESIZE
======================================================================
 
Note:
The information in this document has not been submitted to any formal IBM test
or review and is distributed on an "as is" basis without any warranty either
expressed or implied. The use of this information is a customer responsibility
and customers attempting to adapt these techniques to their own environment
do so at their own risk.

Some of the tips might reference internal TOOLS disks for more information.
Please contact your IBM representative if you need those documents.

Your AIXTIPS Team 		              Internet: aixtips@ibm.de
======================================================================
>92374. A simple way to do NLS adaption for TN3270

 When using tn3270 to a host that uses NLS codepages the environment variable
 RM_HOST_LANG can be used to tell tn3270 the codepage of the host.
 The list of EBCDIC conversions can be found in the "Coverter Overview for
 Programming" article in InfoExplorer.

 The values are for German and French EBCDIC keyboards for example:
 German: IBM-273
 French: IBM-297
======================================================================
>92376. Secondary Boot Server for Diskless WS

Question:

Is it possible to have secondary boot servers for diskless workstations?

Answer:

Yes you can certainly have as many boot servers as you want. The boot.image
and client.info file must be on the server and tftp daemon running along
with the bootp daemon. When you boot the client in service mode and obtain
the menu to enter the server IP address you can specify any boot server. You
can further automate this by specifying a list of boot servers in your
client NVRAM boot list with the "bootlist" command. The syntax should be
documented in its man page or infoexplorer. The client.info file mentioned
above contains the client root server so their should be no restriction
having the root and boot server the same.

However, it is not supported to have a secondary boot server with delay
time for a diskless workstation because the ROS firmware on the
model 220 does not support it.

======================================================================
>92379. Disk Clear Utility

How about a simple shell script?  It is slow, but it works.

MAKE SURE you pick the correct disk!  I tested with /dev/hdisk2.

#!/bin/ksh

DISK=hdisk2
if [[ -z "`lspv | grep $DISK | grep None`" ]] ; then
        echo "This disk is currently in use."
        exit 1
fi
COUNT=100000  # About half a meg of fairly random data
while (( COUNT = COUNT - 1 )) ; do
        echo $RANDOM
done > /tmp/PatternFile
RC=0
while [[ $RC -eq 0 ]] ; do
        dd if=/tmp/PatternFile bs=16k
        RC=$?
done | dd of=/dev/$DISK obs=1024k ibs=16k

For those of us that have problems with EBCDIC -> ASCII ...

#----------------------------------------------------------
# Name                     Symbol            ASCII Hex code
#----------------------------------------------------------
# Parentheses                ()              0x29 0x29
# Square brackets            []              0x5b 0x5d
# Curly  brackets            {}              0x7b 0x7d
# Double quote               "               0x22
# Single quote               '               0x27
# Back single quote          `               0x60
# Forward slash              /               0x2f
# Back slash                 \               0x5c
# Exclaimation mark (bang)   !               0x21
# Unix pipe symbol           |               0x7c
# Tilde                      ~               0x7e
# US Dollar                  $               0x24
# Percent                    %               0x25
# Ampersand                  &               0x26

Mickey
======================================================================
>92384. Switching from a standalone system to a /usr client

From comp.unix.aix:
From: hm292hu@unidui.uni-duisburg.de (Fred Hucht)
Organization: Universitaet Duisburg GH

In <1992Nov9.183050.22598@selway.umt.edu> mcguire@selway.umt.edu (Charles J McGu
ire) writes:

>I'm looking for info on whether it may be possible to "regress" from
>a diskfull machine to one that uses a remote /usr. I'm running AIX
>3.2.2*. Basically, I have several 220's with fully configured 400M
>disks that I would now like to reconfigure for use with a remote /usr.
>The only response I've been able to get from IBM support is to
>re-install the clients using "install for use with remote /usr".
>This means I'll have to go back thru the painful 3.2.2 updates which
>is something I'd really rather avoid if possible.

You can switch from standalone to remote /usr in the following way:

 1) Create /sbin/net.info with the following contents:

    <client-IP> <server-IP> 0 69 0 0 <netmask> 0 ent0 1

    All IPs must be numeric. The last number specifies bnc, change to 0
    for DIX. /sbin/rc.boot reads this file to configure the network
    interface. Here we have no gateway between client and server and use
    standard ethernet.

 2) Edit /etc/filesystems: Comment out the complete /usr:-stanza and add
    a new one with your server-IP:
*/usr:
*       dev             = /dev/hd2
*       vfs             = jfs
*       log             = /dev/hd8
*       mount           = automatic
*       check           = false
*       type            = bootfs
*       vol             = /usr
*       free            = false

/usr:
        dev             = /usr
        vfs             = nfs
        nodename        = <server-IP>
        mount           = automatic
        check           = false
        type            = boot
        options         = ro,fg,hard,intr,retry=3

 3) Execute the command:

    bosboot -a -d <bootdisk> -p /usr/lib/boot/netdisk.proto

    with <bootdisk> being your bootdisk.

With this procedure we have successfully installed a 32H that runs both
as /usr client and standalone (for demos). Note that you must export /usr
with root access and read-only to the client.

Note that I don't take any responsibility for crashes and 888's :-)
Hope this helps...

Fred Hucht, Institute of Theoretical Physics, University of Duisburg, Germany
EMail: fred@hal6000.Uni-Duisburg.DE
======================================================================
>92393. Underlining in xterm, FYI

Out of comp.unix.aix:
From: mycroft@hal.gnu.ai.mit.edu (Charles Hannum)
Organization: MIT Laboratory for Computer Science

Both MIT's R5 xterm and IBM's R4 xterm and aixterm appear to support
underlining, but the appropriate terminfo codes are not defined.

To enable underlining (as well as fix a bug), apply the following patch
to /usr/lib/terminfo/dec.ti and recompile it.

-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----
*** dec.ti.orig Thu Jan  9 14:24:04 1992
--- dec.ti      Thu Oct 15 09:33:52 1992
***************
*** 94,101 ****
        cuf1=\E[C, cuu1=\E[A, el=\E[K, ed=\E[J,
        cud=\E[%p1%dB, cuu=\E[%p1%dA, cub=\E[%p1%dD,
        cuf=\E[%p1%dC, km,
!       smso=\E[7m, rmso=\E[m, smul@, rmul@,
!       bold=\E[1m, rev=\E[7m, blink=@, sgr0=\E[m,
        rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H, rs2=@,
        kf1=\E[11\176, kf2=\E[12\176, kf3=\E[13\176, kf4=\E[14\176,
        ht=^I, ri=\EM,
--- 94,101 ----
        cuf1=\E[C, cuu1=\E[A, el=\E[K, ed=\E[J,
        cud=\E[%p1%dB, cuu=\E[%p1%dA, cub=\E[%p1%dD,
        cuf=\E[%p1%dC, km,
!       smso=\E[7m, rmso=\E[m, smul=\E[4m, rmul=\E[m,
!       bold=\E[1m, rev=\E[7m, blink=@, sgr0=\E[m\E(B,
        rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H, rs2=@,
        kf1=\E[11\176, kf2=\E[12\176, kf3=\E[13\176, kf4=\E[14\176,
        ht=^I, ri=\EM,
-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----
For those of us that have problems with EBCDIC -> ASCII ...

#----------------------------------------------------------
# Name                     Symbol            ASCII Hex code
#----------------------------------------------------------
# Parentheses                ()              0x29 0x29
# Square brackets            []              0x5b 0x5d
# Curly  brackets            {}              0x7b 0x7d
# Double quote               "               0x22
# Single quote               '               0x27
# Back single quote          `               0x60
# Forward slash              /               0x2f
# Back slash                 \               0x5c
# Exclaimation mark (bang)   !               0x21
# Unix pipe symbol           |               0x7c
# Tilde                      ~               0x7e
# US Dollar                  $               0x24
# Percent                    %               0x25
# Ampersand                  &               0x26

======================================================================
>92394. HOTW: What is the size of a memory page?  Use:  PAGESIZE

 Shell script programmers sometimes wanna know the size of a
 memory page.  The PAGESIZE command returns the size in bytes.

 Example 1:  From the command line

                  $pagesize
                  4096

 Example 2:  Assigning it to an environment variable

                  MEMPGSZ=`pagesize`

======================================================================


-- 
Andreas Siegert / Postmaster   IBM Deutschland GmbH   |   Never grep a yacc
AIX Field Support Center       Pocci Strasse 11       |   by the i-node!
Internet: afx@ibm.de           D-8000 Muenchen 2      |   Opinions are my own,
VNET: SIEGERT@MUNIVM4          Voice: (49)-(89)-7670-509  not IBM's.
Newsgroups: comp.unix.aix