home *** CD-ROM | disk | FTP | other *** search
/ ftp.pasteur.org/FAQ/ / ftp-pasteur-org-FAQ.zip / FAQ / aix-faq / part3 < prev    next >
Encoding:
Internet Message Format  |  2000-11-03  |  76.6 KB

  1. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!newsfeed.utk.edu!news-hog.berkeley.edu!ucberkeley!newsfeed.stanford.edu!xfer10.netnews.com!netnews.com!newsfeed.skycache.com!Cidera!nntp-out.teleweb.pt!news.teleweb.pt!not-for-mail
  2. From: bofh@mail.teleweb.pt
  3. Newsgroups: comp.unix.aix,comp.answers,news.answers
  4. Subject: comp.unix.aix Frequently Asked Questions (Part 3 of 5)
  5. Supersedes: <aix-faq-3-973024721@mail.teleweb.pt>
  6. Followup-To: comp.unix.aix
  7. Date: 2 Nov 2000 15:43:58 +0100
  8. Organization: What ?
  9. Lines: 1907
  10. Approved: news-answers-request@mit.edu
  11. Distribution: world
  12. Expires: 07 Dec 2000 15:25:21
  13. Message-ID: <aix-faq-3-973175121@mail.teleweb.pt>
  14. References: <aix-faq-1-973175121@mail.teleweb.pt>
  15. Reply-To: bofh@mail.teleweb.pt (Jose Pina Coelho)
  16. NNTP-Posting-Host: p140a55.teleweb.pt
  17. X-Trace: srvlis16.teleweb.pt 973176789 1289 212.16.140.55 (2 Nov 2000 14:53:09 GMT)
  18. X-Complaints-To: abuse@teleweb.pt
  19. NNTP-Posting-Date: 2 Nov 2000 14:53:09 GMT
  20. Summary: This posting contains AIX Frequently Asked Questions
  21.          and their answers.  AIX is IBM's version of Unix.
  22. Keywords: AIX RS/6000 questions answers
  23. Xref: senator-bedfellow.mit.edu comp.unix.aix:191690 comp.answers:42948 news.answers:195010
  24.  
  25. Posted-By: auto-faq 3.3 (Perl 5.005)
  26. Archive-name: aix-faq/part3
  27. Revision: 1.12 2000/10/10 21:01:28
  28. Posting-Frequency: monthly
  29.  
  30. ------------------------------
  31.  
  32. Subject: 1.606: How to configure dialup SLIP
  33.  
  34. IBM's WWW page <http://www.ibm.com/> can lead you to a helpful document
  35. <http://www.austin.ibm.com/pub/www/services/aix_service/faxes/SLIP.DOC.zap>
  36.  
  37. From: marvin@tornado.oche.de (Christian Bode)
  38.  
  39. If you don't have problems with slattach you should have PTF 
  40. bos.obj 3.2.0.0.U411505 installed.  I assume that you did the right
  41. ifconfig commands to setup your slip-device (for example sl0).
  42.  
  43. 1. Create a group called slip.
  44.  
  45. 2. Create a user slip with smit like this:
  46.                                                      [Entry Fields]
  47. * User NAME                                          [slip]
  48.   ADMINISTRATIVE User?                                true
  49.   User ID                                            []
  50.   LOGIN user?                                         true
  51.   PRIMARY group                                      [slip]
  52.   Group SET                                          [slip]
  53.   ADMINISTRATIVE groups                              [system]
  54.   SU groups                                          [slip]
  55.   HOME directory                                     [/home/slip]
  56.   Initial PROGRAM                                    [/bin/sh]
  57.   User INFORMATION                                   [SLIP-Dialup]
  58.   Another user can SU to user?                        false
  59.   User can RLOGIN?                                    true
  60.   TRUSTED PATH?                                       nosak
  61.   Valid TTYs                                         [/dev/tty1]
  62.   AUDIT classes                                      []
  63.   PRIMARY authentication method                      [SYSTEM]
  64.   SECONDARY authentication method                    [NONE]
  65.   Max FILE size                                      [2097151]
  66.   Max CPU time                                       [-1]
  67.   Max DATA segment                                   [262144]
  68.   Max STACK size                                     [65536]
  69.   Max CORE file size                                 [2048]
  70.   Max physical MEMORY                                [65536]
  71.   File creation UMASK                                [022]
  72.   EXPIRATION date (MMDDhhmmyy)                       [0]
  73.  
  74. 3. Create a tty with getty on it:
  75.                                    Add a TTY
  76.                                                [Entry Fields]
  77.   TTY type                                     tty
  78.   TTY interface                                rs232
  79.   Description                                  Asynchronous Terminal
  80.   Parent adapter                               sa0
  81. * PORT number                                  [s1]
  82.   BAUD rate                                    [38400]
  83.   PARITY                                       [none]
  84.   BITS per character                           [8]
  85.   Number of STOP BITS                          [1]
  86.   TERMINAL type                                [dumb]
  87.   STATE to be configured at boot time          [available]
  88.   DMA                                          on
  89.   Read Trigger                                 0,1,2,3
  90.   Transmit buffer count                        [16]
  91.   Name of initial program to run               [/etc/getty]
  92.  
  93.   Note: The following attributes are only applicable if /etc/getty is
  94.         specified as the initial program to run.
  95.  
  96.   Enable program?                              respawn
  97.   Run level                                    2
  98.   Enable LOGIN                                 share
  99.   TIME before advancing to next port setting   [0]
  100.   STTY attributes for RUN TIME                 [hupcl,cread,brkint>
  101.   STTY attributes for LOGIN                    [hupcl,cread,echoe,>
  102.   RUN shell activity manager                   no
  103.   Optional LOGGER name                         []
  104.  
  105. 4. Change the hardware characteristics so that it uses NO XON/XOFF handshake
  106.    section 1.613 also talks about tty flow control.
  107.  
  108. 5. A (new) .profile template for slip accounts is provided in section
  109.    8.07.  The author, David Migliavacca, writes, "I would also like to
  110.    assert that, to my experience, it is NOT required that the SLIP user
  111.    be made "administrative" or member of "system" as other parts of the
  112.    FAQ (and the original script) say.  At least on my machine 8-).  I now
  113.    create SLIP users as members of group slip, it being the ONLY group;
  114.    allowed ttys are set to the available modem lines only; their home
  115.    directory is owned by root and the .profile is only readable by group
  116.    slip.
  117.  
  118. Here's another scenario:
  119. From: oosten@angelo.ee.ualberta.ca (Brian Oostenbrink)
  120.  
  121. Operating System: IBM AIX 3.2.1 and 3.2.3
  122.  
  123. Configuring two RS6000s via a Serial Line Interface Protocol (SLIP) 
  124. connection over two US Robotics Sportster 14,400 modems.
  125.  
  126. The AIX implementation of SLIP is slightly different from most others. 
  127. The ifconfig command is used to bring up a serial interface, and the
  128. slattach command is used to connect the interface to the serial port
  129. used for the connection.  Dialer device commands can also be issued when
  130. invoking the slattach command, using UUCP chat syntax.
  131.  
  132. The following describes a connection between two machines:
  133.  
  134.      local.j.k.l
  135.          ethernet IP address 129.128.127.21
  136.          slip interface IP address 129.1.2.1
  137.  
  138.      remote.a.b.c
  139.          ethernet IP address 129.11.22.44
  140.          slip interface address 129.11.22.1
  141.  
  142. 1. Interface configuration
  143.  
  144. Each machine must have a separate IP address dedicated to the SLIP
  145. interface. On remote.j.k.l, start the SLIP interface with:
  146.  
  147.          ifconfig sl0 129.11.22.1 129.128.127.1  up
  148.  
  149. and on local.a.b.c:
  150.  
  151.          ifconfig sl0 129.128.127.1 129.11.22.1  up
  152.  
  153. It is important in later versions of AIX 3.2.3+ to use the same SLIP
  154. interface # as the ptty port #, ie. if you use tty12, use ifconfig sl12
  155. instead of sl0.
  156.  
  157. At this point the interfaces are ready to be connected.
  158.  
  159. 2. tty configuration
  160.    The tty ports on both machines were configured in an identical manner
  161.    using smit.
  162.                                                  [Entry Fields]
  163.  TTY type                                           tty
  164.  TTY interface                                      rs232
  165.  Description                                        Asynchronous Terminal
  166.  Parent adapter                                     sa0
  167.  PORT number                                        []                       +
  168.  BAUD rate                                          [38400]                  +
  169.  PARITY                                             [none]                   +
  170.  BITS per character                                 [8]                      +
  171.  Number of STOP BITS                                [1]                      +
  172.  TERMINAL type                                      [dumb]
  173.  STATE to be configured at boot time                [available]              +
  174.  DMA                                                on                       +
  175.  Read Trigger                                       0,1,2,3
  176.  Transmit buffer count                              [16]                      #
  177.  Name of initial program to run                     [etc/getty]
  178.  
  179.  Note: The following attributes are only applicable if /etc/getty is specified
  180.  as the initial program to run.
  181.  
  182.  Enable program?                                    respawn
  183.  Run level                                          2
  184.  Enable LOGIN                                       disable                  +
  185.  TIME before advancing to next port setting         [0]                      +#
  186.  STTY attributes for RUN TIME                       [hupcl,cread,brkint,icr>
  187.  STTY attributes for LOGIN                          [hupcl,cread,echoe,cs8,>
  188.  RUN shell activity manager                         no                       +
  189.  Optional LOGGER name                               []
  190.  
  191. On older versions of AIX, we encountered some problems disabling getty, and
  192. resorted to changing the /etc/inittab file directly. For example, change
  193.  
  194.    tty0:2:respawn:/etc/getty /dev/tty0
  195. to
  196.    tty0:2:off:/etc/getty /dev/tty0
  197.  
  198. This will disable getty from running. After creating the SLIP tty device,
  199. you will need to change its hardware configuration to disable Xon/Xoff
  200. flow control. Software flow control should not be used for SLIP. Type
  201. 'smit chtty', and then select sub item 2: Hardware settings.
  202.  
  203. Most of the parameters in the tty configuration are the defaults.
  204.  
  205. 3. Modem Configuration
  206.  
  207.    The modems were configured as follows:
  208.  
  209.    RTS/CTS flow control enabled.
  210.    Xon/Xoff software flow control disabled. Usually this is automatic if
  211.       RTS/CTS is enabled.
  212.    Data rate, terminal to modem = fixed.
  213.       This is the baud rate from the tty port to the modem. We used a
  214.       fixed modem-port transfer rate, set to the fastest speed supported
  215.       by both the tty port and the modem. Newer modems can use a higher
  216.       transfer rate between the modem and serial port than the modem to
  217.       modem rate, which is necessary to use data compression effectively.  
  218.       In our setup, we used 14.4 kBaud modems with a port speed of 38.4
  219.       kBaud. If your modem supports this feature, use it, otherwise set
  220.       the port speed equal to the modem connection rate. On the USR
  221.       Sportster at&b1 fixes the serial port rate to that of the last
  222.       AT command. The speed parameter of the slattach command can be
  223.       used to ensure that this rate is that set in the tty configuration.
  224.    Error Correction enabled - not mandatory, but a good idea
  225.    Data Compression - not required, but it helps, especially for text
  226.       transfers.
  227.    Auto Answer - If the SLIP connection is to be initiated from either
  228.       machine, both modems should be set to auto answer, otherwise, just
  229.       the answering modem.
  230.  
  231.    It is a good idea to configure the modem and then save the settings
  232.    to NVRAM, so that the correct settings can always be restored by the
  233.    slattach command.
  234.  
  235. 4. UUCP configuration files
  236.  
  237.    /usr/lib/uucp/Devices
  238.    /usr/lib/uucp/Dialers
  239.  
  240.    The Devices file must contain an entry with the tty and serial port
  241.    speed used for the interface. In our example,
  242.       Direct tty0 38400 slipdialer
  243.  
  244.    The keyword 'slipdialer' is merely an index into the Dialers file.
  245.    For our purposes, the slipdialer entry in the Dialers file is simply:
  246.  
  247.       slipdialer
  248.  
  249.    This entry can also contain UUCP chat commands, or the chat commands
  250.    can be included in the slattach command.
  251.  
  252. 5. slattach invocation
  253.  
  254.    slattach connects the device on the tty port to the SLIP interface
  255.    created by ifconfig, and sends any commands to the tty device if
  256.    needed. For our example, remote.j.k.l would never initiate a call,
  257.    only answer incoming calls. Therefore we execute:
  258.  
  259.          slattach tty0 38400 '"" ATZ OK ""'
  260.  
  261.    which connects the tty at 38400 baud. We could also simply run
  262.  
  263.          slattach tty0
  264.  
  265.    ie. without any modem commands, but the modem to port speed may not
  266.    be correctly set this way. In addition, the ATZ command ensures the
  267.    modem is set to the NVRAM settings.
  268.  
  269.    On local.a.b.c type:
  270.  
  271.          slattach tty0 38400 '"" ATZ OK \pATDT4925871 BIS ""' 4
  272.  
  273.    This establishes the link at 38400 baud, and executes the dial string
  274.    as shown. The dial string is a UUCP chat string and are configured
  275.    in an expect send expect send ... format. The string:
  276.  
  277.          '"" ATZ OK \pATDT4925871 BIS ""'
  278.  
  279.    is interpreted as:
  280.    expect "" (null string) from modem
  281.    send   ATZ              to modem
  282.    expect OK               from modem
  283.    send   \pATDT4925871    to modem
  284.    expect BIS              from modem
  285.  
  286.    BIS is the end of the CONNECT STRING. You could use any portion of
  287.    the string returned by the modem upon a connection as the expect
  288.    string. It may be wiser to simply expect CONNECT since all
  289.    connections should return this string.
  290.    The null strings are necessary because the first parameter of the
  291.    UUCP is an expected string from the modem, which can only be a null
  292.    string until the modem has been given a command.
  293.  
  294.    The last parameter (4) of the slattach command is the debug level. 
  295.    A debug level of 4 displays the UUCP chat strings, which is useful
  296.    for checking the modem status.
  297.  
  298. 6. Routing
  299.    ifconfig is sufficient if all you want to do is talk between the
  300.    two hosts.  If you are running SLIP so that you can talk to more
  301.    than just that one other host you have to advertise your address.
  302.    
  303.    1) arp -s 802.5 iago 10:00:5a:b1:49:d8 pub
  304.         where 802.5 is a token-ring network the hardware address can
  305.         be obtained with `netstat -v` and iago was the SLIP client (My
  306.         PC at home :)  pub is the important part it means "published"
  307.         You may want to run this at boot time. 
  308.  
  309.    Routing through the SLIP link is similiar to routing of any gateway. 
  310.    Invoking the ifconfig command automatically sets up a route between
  311.    the two SLIP machines. An entry in /etc/hosts or the named database
  312.    should be made, with the same machine name used for the SLIP address
  313.    as the ethernet address on each machine. For example, in /etc/hosts
  314.    on remote.a.b.c (and any other machine on remote.a.b.c ethernet):
  315.  
  316.      129.11.22.44 remote.a.b.c # ethernet address
  317.      129.11.22.1  remote.a.b.c # slip address
  318.  
  319.    It is preferable to place the ethernet address in the hosts file
  320.    before the SLIP address so remote.a.b.c will resolve to the
  321.    ethernet address. When using named, it is important to have both
  322.    addresses in the reverse file with the same name. We experienced
  323.    difficulties with NFS mounting over the slip link, owing to some
  324.    machine interpreting NFS requests from one of the two SLIP machines
  325.    as coming from the SLIP address, while the SLIP machine believed it
  326.    was sending the request from the ethernet address. This problem was
  327.    eliminated by having both addresses reverse resolve to the same name.
  328.  
  329. 7. Performance
  330.    At a modem speed of 14.4 kBaud and a port speed of 38.4 kBaud, we
  331.    realized a transfer rate through ftp of about 3.5 kB/s for text
  332.    files, and 1.3 kB/s for compressed files.
  333.  
  334. ------------------------------
  335.  
  336. Subject: 1.607: Where is DCE discussed?
  337.  
  338. DCE is the Distributed Computing Environment, which is roughly a
  339. flexible client-server architecture for heterogenous platforms.
  340. For more information, take a look in comp.soft-sys.dce.
  341.  
  342. ------------------------------
  343.  
  344. Subject: 1.608: How do I make /var/spool/mail mountable?
  345. From: petersen@pi1.physik.uni-stuttgart.de (Joerg Petersen)
  346.  
  347. In our cluster we share a /usr/local disk. We have a directory
  348. /usr/local/spool/mail and /var/spool/mail is soft-linked to it.
  349.  
  350. From: fred@hal6000.thp.Uni-Duisburg.DE (Fred Hucht)
  351.  
  352. Several problems has been reported on sharing the mail directory via
  353. NFS. The problems may occur when two or more sendmail daemons and/or
  354. mail readers access a user's mail file simultanously, because of NFS'
  355. file locking mechanism.
  356.  
  357. We use another method here: Every user has one line in his/her
  358. $HOME/.forward file that reads
  359.  
  360. xxx@mainserver.domain.name
  361.  
  362. where xxx is the user node and mainserver.domain.name is the full
  363. hostname of one of the machines. Then all incoming mail to all machines
  364. is forwarded to mainserver, while mainserver ignores this line.
  365.  
  366. ------------------------------
  367.  
  368. Subject: 1.609: getty spawning too rapidly 
  369. From: aslam@abaseen.lums.edu.pk (Sohail Aslam)
  370.  
  371. The problem can occur due a number of modem settings. The most
  372. frequent is that the echo is not disabled on modems that are to
  373. accept incoming calls. In hayes language, ATE0 disables echo.
  374. If echo is enabled, the login prompt sent by the DTE (computer)
  375. is echoed back to it. It then issues "password:" prompt which
  376. the modem conveniently echoes back again. And the cycle goes on.
  377.  
  378. Another setting to check is the Q registers which controls the
  379. modem's response to the DTE. The hayes command ATQ0 enables
  380. results codes. The Q register in conjunction with the X and
  381. the V registers, reports back to the DTE the status of the incoming
  382. or outgoing call, and the type of connection established. For
  383. outgoing calls, one would want to enable result codes but not
  384. for incoming calls. If codes are enabled (via ATQ0), when a
  385. call comes in, the modem will send strings (if ATV1 and ATX4 set)
  386. "RINGING", "CONNECTED" etc. to the local DTE. The getty will think
  387. some one is trying to login. It will send password prompt. Trouble
  388. again. Telebit and other intelligent modems has ATQ2 setting
  389. which says "reports codes only when calling out." For others,
  390. you will need to disable it (ATQ1) and enable when calling out.
  391.  
  392. The DSR setting can be a source of problem. Ideally, modem should
  393. raise DSR only when CD is detected and modem raises CTS. Computer,
  394. such as the VAX, wait 30 seconds after the modem raises DSR. If
  395. CD is not on by that time, the computer will drop DTR causing the
  396. modem to reset. The DSR should be set to be raised only when
  397. carrier has been detected. The hayes setting is AT&S1.
  398.  
  399. The DCD setting should be such that it reflects the true nature of
  400. the carrier. The CD can be forced on at all times (AT&C0). This
  401. is not good. Set it to AT&C1.
  402.  
  403. Most modems can reload saved settings from non-volatile memory
  404. on a DTR transition. This is useful for resetting the modem
  405. when a call drops. Use AT&D3 to get this effect. 
  406.  
  407. For dial in, thus, set AT E0 Q1 &C1 &D3 &S1 &W. The &W stores the
  408. settings in memory. They will be reloaded due to &D3.
  409.  
  410.  
  411. ------------------------------
  412.  
  413. Subject: 1.610: Does AIX support Compressed SLIP (CSLIP)?
  414.  
  415. No.  That means no VJ compression either :)  See PPP in section 5.07 
  416. if you want more than standard SLIP.
  417.  
  418.  
  419. ------------------------------
  420. Subject: 1.611: How do I setup anonymous ftp on my AIX system?
  421.  
  422. (stolen from Peter Klee <klee@dhdibm1.bitnet> posting)
  423.  
  424. Have a look at '/usr/lpp/tcpip/samples/anon.ftp'. It is a shell script
  425. and will set up a anonymous ftp site on your local RS/6000.  Note: the
  426. ftpd that comes with AIX does not support the display messages every
  427. time a user changes a directory or even when they login.
  428.  
  429. ------------------------------
  430.  
  431. Subject: 1.612: Talk, getting notification.
  432.  
  433. If you are not getting notification (that someone wants to talk to
  434. you), use (swcons `tty` && mesg y) in one window.
  435.  
  436. There are many variations of 'talk' and finding compatible versions
  437. for multiple operating systems can be tricky.
  438.  
  439.  
  440. ------------------------------
  441.  
  442. Subject: 1.613: Disabling software flow control; using RTS/CTS.
  443.  
  444. Different versions of AIX 3.2.5 respond differently to attempts to
  445. enable flow control (RTS/CTS signals).  This section is an attempt to
  446. compile a list of different approaches.
  447.  
  448. The most straight forward is:
  449.    chdev -l ttyxx -a rts=yes
  450.    [ Note: ix40410 for AIX 3.2.5 should give you this functionality.  
  451.    PTF U426113 and numerous other superceding ptfs should provide this.]
  452.  
  453. If carrier signal is high (its connected) you can try
  454.    stty add rts </dev/ttyxx 
  455.  
  456. There is also a program that I first saw on the 800-IBM-4FAX number,
  457. also found in INFO that will remedy the situation in some cases.  Note
  458. that this code ignores the return code from ioctl (which on my machine
  459. is <0 :)
  460.  
  461. ------------------------------
  462.  
  463. Subject: 1.614: NIS security
  464. Ole.H.Nielsen@fysik.dtu.dk (Ole Holm Nielsen)
  465.  
  466. SUMMARY: AIX 3.2.4 and above includes support for a more secure setup
  467. of the ypserv NIS daemon.  You can prevent any random host on the
  468. entire Internet from reading your NIS maps, as is possible with the
  469. default AIX setup.
  470.  
  471. The details:
  472. ------------
  473. After starting the ypserv daemon, I noticed in the syslog the following line:
  474. Jan 17 12:01:18 zeise syslog: /usr/etc/ypserv: no /var/yp/securenets file 
  475. This indicates that ypserv is looking for the mentioned configuration
  476. file, but did not find it, and hence will deliver the NIS maps to
  477. anyone on the net who can guess the NIS domainname.  I installed the
  478. /var/yp/securenets file and restarted ypserv, and it works !  Any
  479. illegal attempt to read NIS maps will result in the following getting
  480. logged to syslog (example):
  481. Jan 18 13:37:27 zeise syslog: ypserv: access denied for 129.142.6.79 
  482.  
  483. How to enable this NIS security option:  
  484. Install the /var/yp/securenets file, for example:
  485.  
  486. # /var/yp/securenets file
  487. #
  488. # The format of this file is one of more lines of
  489. # netmask netaddr
  490. # Both netmask and netaddr must be dotted quads.
  491. #
  492. # Note that for a machine with two Ethernet interfaces (i.e. a gateway
  493. # machine), the IP addresses of both have to be in /var/yp/securenets.
  494. #
  495. # for example:
  496. #255.255.255.0 128.185.124.00
  497. # Loopback interface
  498. 255.255.255.255 127.0.0.1
  499.  
  500. Uncommenting the last line would limit access to hosts on the
  501. 128.185.124.*  net, only.  The loopback interface must be included, as
  502. shown above.
  503.  
  504. To log violations, have a /etc/syslog.conf file containing the proper
  505. events.  We use this line:
  506.  
  507. *.err;kern.debug;auth.notice;user.none          /var/adm/messages
  508.  
  509. Caveat emptor:  This works for us, and you will have to verify it at
  510. your own installation.  Don't complain to us if you have troubles.  
  511. I do not know what PTF level our AIX 3.2.4 is at.  Our ypserv daemon 
  512. looks like this:
  513.  
  514. zeise> strings /usr/lib/netsvc/yp/ypserv | head -2
  515. @(#)16
  516. 1.12  com/cmd/usr.etc/yp/ypserv.c, cmdnfs, nfs325, 9334325a 5/4/93 19:44:41
  517.  
  518. If your AIX doesn't have securenets support, ask your support centre
  519. for the PTF which includes APAR IX32328.  That seems to have included
  520. the securenets support.
  521.  
  522.  
  523. ------------------------------
  524.  
  525. Subject: 1.615: Why can't non-anonymous users login using WU-FTP?
  526. From: swcxt@boco.co.gov (Shane Castle)
  527.  
  528. You must create a file named /etc/shells (this is the real /etc not a
  529. subdirectory of your false root), that contains all the shells that
  530. are defined on your system.  Get the list from
  531. /etc/security/login.cfg.  Also, if having proper group authentication
  532. is important to you, apply the following patch:
  533.  
  534. --- ftpd.c.dist    Wed Apr 13 15:17:18 1994
  535. +++ ftpd.c    Tue Jan 17 13:29:58 1995
  536. @@ -1153,7 +1153,13 @@
  537.         setgroups(NULL, NULL);
  538.         if (setpriv(PRIV_SET|PRIV_INHERITED|PRIV_EFFECTIVE|PRIV_BEQUEATH,
  539.                     &priv, sizeof(priv_t)) < 0 ||
  540. -           setuidx(ID_REAL|ID_EFFECTIVE, (uid_t)pw->pw_uid) < 0 ||
  541. +           initgroups(pw->pw_name, (gid_t)pw->pw_gid) < 0 ||
  542. +           setgidx(ID_REAL|ID_EFFECTIVE, (gid_t)pw->pw_gid) < 0 ||
  543. +           setegid((gid_t)pw->pw_gid) < 0) {
  544. +               reply(550, "Can't set gid (AIX3).");
  545. +               goto bad;
  546. +       }
  547. +       if (setuidx(ID_REAL|ID_EFFECTIVE, (uid_t)pw->pw_uid) < 0 ||
  548.             seteuid((uid_t)pw->pw_uid) < 0) {
  549.                 reply(550, "Can't set uid (AIX3).");
  550.                 goto bad;
  551.  
  552. ------------------------------
  553.  
  554. Subject: 1.616: NIS users can't login, do I need '*' in /etc/passwd?
  555. From: ohnielse@fysik.dtu.dk (Ole Holm Nielsen)
  556.  
  557. Aparently at least one version of AIX InfoExplorer suggests
  558. administrators use "+:*:0:0:::" as the last entry in the /etc/passwd
  559. file of NIS clients for security reasons.  If the configuration SMIT
  560. is done using SMIT it will actually append "+::0:0:::" which works and
  561. does not compromise security.  Using the '*' in the passwd field
  562. actaully prevents NIS users from logging in.
  563.  
  564. "+::0:0:::" should not allow you to login as user "+" and without a
  565. password even when NIS is disabled, but it never hurts to double
  566. check.
  567.  
  568. ------------------------------
  569. Subject: 1.617: HP JetDirect cards and virtual printers?  mkvirprt problems?
  570.  
  571. (stolen from many)
  572.  
  573. Since the release of AIX 3.2.5 adding a queue for JetDirect cards is as
  574. easy as creating a virtual printer using "smit mkvirprt" or mkvirprt.
  575. If the command hangs make sure you are using an HFT, aixterm or vt100
  576. terminal.  The entire procedure is available from the IBM FAX
  577. "Information Line" (800 IBM-4-FAX).
  578.  
  579. From: Mark Bergman <mark.bergman@syseca.co.uk>
  580.  
  581. SMIT complains that some required software is not present on the system.
  582. It turns out that this software, "printers.hpJetDirect.attach (4.1.3.0)"
  583. is on the installation CD.
  584.  
  585. HOWEVER, there is some bug somewhere, whereby the software may actually
  586. be already installed, but the system cannot see it.  (Or maybe the bug
  587. is that the software is actually NOT installed, but the system in one
  588. place thinks it is! - I'm not sure).  Therefore, use smit to look at
  589. Installed Software ("Software Installation and Maintenance", "Maintain
  590. Installed Software", "List Installed Software" and look at all software,
  591. then search through for "jet".  If it finds it (i.e. it thinks that it
  592. is installed) - you must remove it (under smit's "Maintain Installed
  593. Software" level), and then reinstall from the CD!
  594.  
  595. ------------------------------
  596.  
  597. Subject: 1.618: How can I hack libc.a to alter how hostnames are resolved?
  598. From: <mlarsen@ptdcs2.intel.com> "L. Mark Larsen"
  599.  
  600.   Editors note:  The implications of corrupting libc.a should not be
  601.   understated.  While recovering from a corrupt libc.a should be a
  602.   matter of booting from floppy I wouldn't wish that on anyone with a 
  603.   supervisor or users to support :)
  604.  
  605.   Before you attempt this,  you might want to read 2.07 first for
  606.   advice on recovering from a destroyed or corrupted libc.a.
  607.   Remember:  backups are a VERY GOOD IDEA.
  608.  
  609.   enough of the weak kneed quivering...
  610. ]
  611.  
  612. Nate Itkin (a colleague) is the individual who did the initial work.
  613. I suspect he would rather not be troubled with any questions you may
  614. have in this area and I can probably answer them just as easily.  The
  615. motivation for this was to use DNS for MX records (we are using IDA
  616. sendmail) but NIS for most hostname lookups.
  617.  
  618. Secondly, warnings:  IBM has not given any sort of stamp of approval on what
  619. we have done (though they appear to have integrated resolv+ into AIX 4 based
  620. on some release notes I saw).  While we have been using it successfully for
  621. about one year and have seen no problems, we can't and won't promise the same
  622. for you.  This procedure plays around with libc.a which, as you probably know,
  623. is an XCOFF shared library under AIX and hence a critical part of the running
  624. system.  You assume all the risk if you try to install this.  All the usual
  625. disclaimers about liability, etc. apply - there is no warranty associated with
  626. any of this.
  627.  
  628. Furthermore, know that any PTF you subsequently install that updates/replaces
  629. libc.a implies that you have to execute most of these procedures again.
  630.  
  631. The details on how to use resolv+ under AIX 3 (it's only tested under
  632. 3.2.5 but should work for all point releases), have been moved to
  633. section 8.09.
  634.  
  635. ------------------------------
  636.  
  637. Subject: 1.619: What modem settings do I need?
  638.  
  639. ATQ2  - result codes in originate only
  640. AT&C1 - CD follows state of carrier 
  641. AT&D2 - hangup on DTR drop
  642.  
  643.  
  644. ------------------------------
  645. Subject: 1.620: NIS slave server config with master on different subnet?
  646. From: msidler@metronet.com (Mike Sidler)
  647.  
  648. Assuming AIX 3.2.5,the master server up and running and the hosts file
  649. has the master name defined. On slave do:
  650.  
  651.     1) domainname <domain_name that matches master>
  652.     2) startsrv -s ypserv
  653.     3) startsrv -s ypbind (ypwhich should return "loopback")
  654.     4) (/usr/sbin/)ypset -d <domainname> <master_server_name>
  655.        (ypwhich should return "<master_server_name>"
  656.     5) (/usr/sbin/)ypinit -s <master_server_name>
  657.     6) Put "+::0:0:::" in /etc/passwd after last local login. 
  658.        Note: InfoExplorer has this entry INCORRECT in some versions.
  659.     7) Other cfg files (group, etc) may need configuring but this will
  660.        get ypserv and ypbind running on the slave looking at the right stuff.
  661.  
  662.  
  663. ------------------------------
  664.  
  665. Subject: 1.621: Why does my 64 port concentrator loose data and drop the queue?
  666. [From: as@mynet.no (Arild Sletvold)]
  667.  
  668. This problem has been associated with upgrading machines to 3.2.5.
  669. Try changing the values for the "Transmit buffer count" parameter in
  670. the printer/plotter setup in smit. You need to experiment with this
  671. parameter, to see which value that makes the printer print as fast as
  672. possible.  If the value is too high, the printers will loose some of
  673. the data, and the queue will be disabled.  If the value is too low,
  674. the printers will print very slowly.
  675.  
  676. ------------------------------
  677.  
  678. Subject: 1.622: Netscape FastTrack server won't install on AIX 3.2.5 or 4.1.
  679. From: Cameron Ferstat <cferstat@austin.ibm.com>
  680.  
  681. Before installing FastTrack on an AIX 3.2.5 or 4.1 system, you must 
  682. first install the AIX Shared Library Hookable Symbols/6000 Version 
  683. 1.1.5.0, Reference RPQ No. P91153.  (Note:  This software should *not*
  684. be installed on an AIX 4.2 system!)
  685.  
  686. If you try to install FastTrack on an AIX 3.2.5 or 4.1 system, without 
  687. first installing the Hookable Symbols PRPQ, you will get the following 
  688. error:
  689.  
  690.    > ./ns-setup
  691.      0509-037 System error - error data is: ./ns-setup
  692.      0509-022 Cannot load library libsvld.a[shr.o].
  693.      0509-026 System error: A file or directory in the path name does not exist.
  694.  
  695. You can download the installp image by anonymous ftp from
  696. <ftp://ftp.software.ibm.com/aix/products/netscape/tools/slhs.rte.inst_image>.
  697.  
  698. There is also an associated README.slhs file in that directory.
  699.  
  700. ------------------------------
  701.  
  702. Subject: 1.623: How can I share files/printers with Windows 95?
  703.  
  704. The freeware solution is Samba,  available from <http://www-frec.bull.com/>.
  705.  
  706. Commercial solutions include Fusion95 from Performance Technology
  707. <http://www.perftech.com/> and Syntax <http://www.syntax.com/>.
  708.  
  709. ------------------------------
  710.  
  711. Subject: 1.624: Printing from AIX to WinNT/95/3.1
  712. From: Charles J. Fisher <charles_fisher@bigfoot.com>
  713.  
  714. 1. On your Windows system, share the printer. Assuming that you are
  715.    running NT, make a user "root" with some password.
  716.  
  717. 2. Get the Samba distribution from http://www.samba.org
  718.    If you have a C compiler, get the source and compile it.
  719.    If you don't have a C compiler, get a binary distribution for AIX.
  720.  
  721. 3. Install Samba on AIX under /usr/local/samba. Specifically, make sure
  722.    that /usr/local/samba/bin/smbclient is installed with execute rights
  723.    for everyone.
  724.  
  725. 4. You must also install a Samba configuration file under
  726.    /usr/local/samba/lib/smb.conf
  727.  
  728.    If you intend to use your AIX as a file server for windows clients,
  729.    you should modify smb.conf to accomplish this (see the Samba
  730.    documentation).
  731.  
  732.    If you will be printing only, just use the sample smb.conf.
  733.  
  734. 5. Make the directory /usr/local/samba/lib/printers
  735.  
  736. 6. In that directory, install the following shell script as
  737.    file "winprint":
  738.  
  739. #!/bin/sh
  740.  
  741. # This is a modification of the samba provided smbprint script
  742. # changed to work under AIX as the backend for a queue. It does
  743. # not read a config file.
  744. #
  745. # Variables below define the server and service. They are
  746. # the content of the .config file when printing from
  747. # /etc/printcap.
  748. #
  749. server="winserver"
  750. service="winprinter"
  751. user="root"
  752. password="root"
  753. #
  754. # Debugging log file, change to /dev/null if you like.
  755. #
  756. #logfile=/tmp/${USER}-print.log
  757. #
  758. # Some debugging help, change the >> to > if you want to save space.
  759. #
  760. #echo "server $server, service $service" >> $logfile
  761. #cat $1 | /usr/local/samba/bin/smbclient "\\\\$server\\$service" 
  762. $password \
  763. #       -N -P -c 'print -' >> $logfile
  764.  
  765. (
  766. # NOTE You may wish to add the line `echo translate' if you want automatic
  767. # CR/LF translation when printing.
  768.         echo translate
  769.         echo "print -"
  770.         cat $*
  771. ) | /usr/local/samba/bin/smbclient "\\\\$server\\$service" $password \
  772.     -U "$user" -N -P  > /dev/null
  773.  
  774. 7. The above file assumes that you are using \\winserver\winprinter
  775.    as the printer share, and that the user is "root" and the password
  776.    is "root". If this is not the case, modify the shell variable
  777.    declarations.
  778.  
  779. 8. Mark the file with execute permissions with "chmod 755 winprint"
  780.  
  781. 9. Test the script with the command: "./winprint /etc/passwd"
  782.    If everything is ok, your password file should be spooled to your
  783.    windows printer.
  784.  
  785.    If it doesn't work, remove the "> /dev/null" from the last line of
  786.    the script and rerun it. Examine the output of smbclient for clues.
  787.  
  788.    Clue #1: The Windows printer server is on the other side of a router.
  789.             AIX is sending broadcast packets to find the Windows machine,
  790.             which the router will not forward. You must find the Windows
  791.             server's IP address and specify it with the "-I" parameter
  792.             to smbclient, i.e. "-I 1.2.3.4". DHCP makes this situation
  793.             even more complex.
  794.  
  795.    Clue #2: You username or password is wrong. smbclient will tell you
  796.             about this if you free its output from > /dev/null.
  797.  
  798.    Clue #3: You might be violating shell quoting rules if you use
  799.             special characters in the server or share name, password,
  800.             etc. Don't use $, ", ', etc., or escape them properly.
  801.             A password of ";rm -rf /" could be catastrophic.
  802.  
  803. 10. Once the script can print files, it must be defined as a printer in
  804.     the /etc/qconfig file. Add the following lines to the end of your
  805.     /etc/qconfig:
  806.  
  807. winprint:
  808.         device = dwinprint
  809.         up = TRUE
  810.         discipline = sjn
  811. dwinprint:
  812.         backend = /usr/local/samba/lib/printers/winprint
  813.  
  814. 11. Test the printer with the following command:
  815.     "lp -d winprint /etc/passwd"
  816.     (Your password file should be printed again.)
  817.  
  818. 12. You might examine the queue with the command "lpq -P winprint"
  819.     or "lpstat -t"
  820.  
  821. ------------------------------
  822.  
  823. Subject: 1.625: How do I get NFS mounting with Linux to work?
  824.  
  825. Linux by default requires any NFS mount to use a so called reserved port
  826. below 1024 and AIX 4.3 does by default use ports above 1024. You can use
  827. the nfso command to restrict AIX to the reserved port range as follows:
  828.  
  829.     nfso -o nfs_use_reserved_ports=1
  830.  
  831. ------------------------------
  832.  
  833. Subject: 1.626: Telnet takes a 45 seconds to produce a prompt.
  834.  
  835. This is in nearly all cases a DNS configuration problem, the AIX machine
  836. can not resolve the IP address of the node initiating the telnet
  837. connection. You can check the DNS reverse mapping by using the nslookup
  838. command on the IP number in question, this will probably timeout as
  839. well. Make sure that the nameserver lines in the /etc/resolv.conf file
  840. point to valid name servers. Some folks have reported that putting the
  841. following in /etc/netsvc.conf can help as well (see also Subject:
  842. 1.800):
  843.  
  844.     hosts=local,bind4
  845.  
  846. Getting a correct DNS Server configuration is the real answer.
  847.  
  848. ------------------------------
  849.  
  850. Subject: 1.627: Ethernet frame type - en0 vs. et0
  851. From: Michael Wojcik <michael.wojcik@merant.com>
  852.  
  853. The "en" and "et" prefixes for AIX Ethernet network interfaces
  854. indicate the type of "framing" that surrounds higher-level protocol
  855. data on the Ethernet medium ("wire").  The Ethernet frame is the
  856. envelope that surrounds IP packets and equivalent messages in other
  857. protocols.
  858.  
  859. There are two kinds of Ethernet framing in common use today.  The
  860. "official" standard is IEEE 802.3 framing, but TCP/IP traffic on
  861. Ethernet is usually carried in DIX (Digital / Intel / Xerox) type
  862. II (usually written "DIX II" or just "DIX") frames.  Other
  863. transport-independent protocols, may use 802.3.  On AIX, SNA is
  864. probably the most common 802.3-framed protocol.
  865.  
  866. The two frame types can coexist on the wire.
  867.  
  868. Most TCP/IP stacks only support DIX framing.  AIX is unusual in
  869. supporting both DIX and 802.3 framing for TCP/IP, but there's little
  870. point in using 802.3 for TCP/IP.  The en0 interface uses DIX; the
  871. et0 interface uses 802.3 (and so on for en1/et1, etc., if you have
  872. multiple NICs).
  873.  
  874. You can configure TCP/IP for both en0 (DIX) and et0 (802.3), in
  875. which case you're creating a multihomed host with only one physical
  876. network connection.  Unless you know you need TCP/IP over 802.3,
  877. don't bother.
  878.  
  879. You don't need to configure TCP/IP on 802.3 to use other protocols
  880. (eg. SNA) on 802.3.
  881.  
  882. ------------------------------
  883.  
  884. Subject: 1.700: Free LVM lecture slides.
  885. From: shieh@austin.ibm.com
  886.  
  887. If you want free LVM documentation (lecture notes) from the
  888. SHARE conference in San Franciso where I presented last March
  889. just:
  890.  
  891.  mail -s "S_basics.ps" shieh@austin.ibm.com < /dev/null
  892.  mail -s "S_limits.ps" shieh@austin.ibm.com < /dev/null
  893.  mail -s "S_lvm_extra.ps" shieh@austin.ibm.com < /dev/null
  894.  
  895. [Editor's note: Jens-Uwe Mager converted the slides to PDF format.  They
  896. are available as <http://www.han.de/~jum/aix/lvm.pdf>.]
  897.  
  898. ------------------------------
  899.  
  900. Subject: 1.701: How do I shrink /usr?
  901. From: mike@bria.UUCP (Michael Stefanik) and Richard Hasting
  902.  
  903. FOR AIX 3.1
  904. -----------
  905.  
  906.  1) Make a backup of /usr
  907.  
  908.         find /usr -print | backup -ivf /dev/rmt0 (or appropriate device)
  909.  
  910.  2) shutdown to maintenance mode
  911.  
  912.         shutdown -Fm
  913.  
  914.  3) export LANG=C
  915.  
  916.  4) remove the filesystem and the logical volume
  917.     ignore an error about the "dspmsg" command not found
  918.  
  919.         umount /usr
  920.         rmfs /usr
  921.  
  922.  5) make a new logical volume hd2 and place it on rootvg with desired size
  923.  
  924.         mklv -yhd2 -a'e' rootvg NNN 
  925.  
  926.    where NNN is the number of 4 meg partitions
  927.  
  928.  6) create a filesystem on /dev/hd2
  929.  
  930.         crfs -vjfs -dhd2 -m'/usr' -Ayes -p'rw'
  931.  
  932.  7) mount the new /usr filesystem and check it
  933.  
  934.         /etc/mount /usr
  935.         df -v
  936.  
  937.  8) restore from the tape; system won't reboot otherwise
  938.  
  939.         restore -xvf/dev/rmt0
  940.  
  941.  9) Sync and reboot the system; you now have a smaller /usr filesystem
  942.  
  943. FOR AIX 3.2
  944. -----------
  945.  
  946.  0)  Experiences posted to comp.unix.aix lead me to suggest that
  947.      many administrators find the following piece of information 
  948.      useful after completing this procedure.  I thought some of you
  949.      might like to read it BEFORE getting yourself into this
  950.      predicament.  
  951.  
  952.      Call 1-800-IBM-4FAX and request document 2503 dated 1/26/94.  
  953.      Title is "How to recover if all files are owned by root after
  954.      restoration from a mksysb tape".
  955.  
  956.  1) Remove any unneeded files from /usr.
  957.  
  958.  2) Make sure all filesystems in the root volume group are mounted. If
  959.     not, they will not be included in the re-installed system.
  960.  
  961.  3) Type mkszfile. This will create /.fs.size that contains a list of
  962.     the active filesystems in the root volume group that will be
  963.     included in the installation procedure.
  964.  
  965.  4) Edit .fs.size. Change the size of /usr to what you want.
  966.  
  967.     Example: This .fs.size file shows /usr to be 40MB.
  968.  
  969.     rootvg 4 hd2 /usr 10 40 jfs
  970.  
  971.     The 10 is the number of physical partitions for the filesystem and
  972.     the 40 is 40 MB. Most systems have a physical partition size of 4 MB.
  973.     Therefore, the second number (40) will always be 4 times the
  974.     previous number (10). Note, however, that a model 320 with a 120 MB
  975.     drive will have a physical partition size of only 2 MB, and the
  976.     total MB is twice the number of physical partitions. The first
  977.     number (4) in the .fs.size file represents the PP size.
  978.  
  979.     If you want to reduce the size of /usr from 40 MB to 32 MB, edit the
  980.     /usr entry to:
  981.  
  982.         rootvg 4 hd2 /usr 8 32 jfs
  983.  
  984.     IMPORTANT: Make sure that you DO NOT enter a value which is less
  985.     than the size of the filesystem required to contain the current
  986.     data. Doing so will cause the re-installation procedure to fail.
  987.  
  988.  5) chdev -l rmt0 -a block=512 -T
  989.  
  990.  6) Unmount all filesystems that are NOT in the root volume group.
  991.  
  992.  7) Varyoff all user-defined volume groups, if any
  993.  
  994.         varyoffvg VGname
  995.  
  996.  8) Export the user-defined volume groups, if any
  997.  
  998.         exportvg VGname
  999.  
  1000.  9) With a tape in the tape drive, type
  1001.  
  1002.         mksysb /dev/rmt0
  1003.  
  1004.      This will do a complete system backup, which will include
  1005.      information (in the .fs.size file) for the installation procedure
  1006.      on how large the filesystems are to be created.
  1007.  
  1008.  10) Follow the instructions in the Installation Kit under "How to
  1009.      Install and perform maintenance from Diskettes" (reportedly now 
  1010.      called "BOS Installation from a System Backup") using the
  1011.      diskettes and tape that you created in the previous steps.
  1012.  
  1013.      [ pre AIX 325: DO NOT select the option "Reinstall AIX with
  1014.      Current System Settings". Instead use "Install AIX with Current
  1015.      System Settings" for the logical volume size changes to take affect. ]
  1016.  
  1017.      [ w/ AIX 325: Select "Install from a mksysb image" ]
  1018.  
  1019.  11) When the installation is complete, you may then import any
  1020.      user-defined volume groups.
  1021.  
  1022.          importvg -y VGname PVname
  1023.  
  1024.      where "VGname" is the name of the volume group, and "PVname" is
  1025.      the name of any one of the physical volumes in the volume group.
  1026.  
  1027.  12) Varyon your user-defined volume groups
  1028.  
  1029.          varyonvg VGname
  1030.  
  1031.  The reduction of the filesystems is now complete.
  1032.  
  1033. COMMERCIAL OPTION
  1034. -----------------
  1035. There are also commercial tools availible to help you do this more
  1036. conviently.  I know of one vendor that can be reached at info@compunix.com
  1037.  
  1038. ------------------------------
  1039.  
  1040. Subject: 1.702: How do I make a filesystem larger than 2Gb?
  1041.  
  1042. AIX 3.2.5 and preceeding versions are limited to 2 Gigabytes per
  1043. filesystem.
  1044.  
  1045. With AIX 4.1 IBM allows filesystems up to 64Gb (reference:
  1046. Individual files are still limited to 2Gb.  AIX 4.2 allows 128Gb
  1047. filesystems and 64 Gb files.  (See also question 1.706.)
  1048.  
  1049. If you are having trouble creating a file greater than 1Mb it maybe
  1050. because that is the default limit for your account, see 'smit users'
  1051. or /etc/security/limit.
  1052.  
  1053. ------------------------------
  1054.  
  1055. Subject: 1.703: Chlv warning.  Is the first 4k of a LV safe?
  1056.  
  1057. The first 4k of a raw LV are used to store control block.
  1058. Applications that write to the raw disk can overwrite this section
  1059. (common applications that do this are Oracle and Sybase).  Commands
  1060. that call getlvcb will generate a warning but succeed (since the
  1061. control block exists in ODM.  Don't run synclvodm unless you really
  1062. want to erase the first 4k and replace it with the info from the ODM.
  1063.  
  1064. shieh@austin.ibm.com (Johnny Shieh) has kindly provided the following
  1065. explanation:
  1066.  
  1067. The logical volume control block (lvcb) is the first 512
  1068. bytes of a logical volume.  This area holds important
  1069. information such as the creation date of the logical volume,
  1070. information about mirrored copies, and possible mount points
  1071. in a journaled filesystem.  Certain LVM commands are required
  1072. to update the lvcb, as part of completeness algorithms in
  1073. LVM.  The old lvcb area is first read and analyzed to see if
  1074. it is a valid lvcb.  If the information is verified as valid
  1075. lvcb information, then the lvcb is updated.  If the
  1076. information is not valid, then the lvcb update is not
  1077. performed and the user is given the warning message:
  1078.  
  1079.     Warning, cannot write lv control block data
  1080.  
  1081. Most of the time, this is a result of database programs
  1082. accessing the raw logical volumes (and thus bypassing the
  1083. journaled filesystem) as storage media.  When this occurs, the
  1084. information for the database is literally written over the lvcb.
  1085. Although this may seem fatal, it is not the case.  Once the
  1086. lvcb has been overwritten, the user can still:
  1087.  
  1088.     1) Extend a logical volume
  1089.     2) Create mirrored copies of a logical volume
  1090.     3) Remove the logical volume
  1091.     4) Create a journaled filesystem with which to mount
  1092.         the logical volume (note that this will destroy any
  1093.         data sitting in the lvcb area)
  1094.  
  1095. However, there is a limitation caused by this deletion of the
  1096. lvcb.  The logical volumes with deleted lvcb's face possible,
  1097. incomplete importation into other AIX systems.  During an
  1098. "importvg", the LVM command will scan the lvcb's of all defined
  1099. logical volumes in a volume group for information concerning the
  1100. logical volumes.  Surprisingly, if the lvcb is deleted, the
  1101. imported volume group will still define the logical volume to
  1102. the new AIX system which is accessing this volume group, and
  1103. the user can still access the raw logical volume.  However, any
  1104. journaled filesystem information is lost and the logical volume
  1105. and its associated mount point won't be imported into the new AIX
  1106. system.  The user must create new mount points and the availability
  1107. of previous data stored in the filesystem is NOT assured.  Also, during
  1108. this import of a logical volume with an erased LVCB, some non-jfs
  1109. information concerning the logical volume, which is displayed with
  1110. the "lslv" command, cannot be found.  When this occurs, the system uses
  1111. default logical volume information to populate the logical volume's
  1112. ODM information.  Thus, some output from the "lslv" will be inconsistent
  1113. with the real logical volume.  If logical volume copies still exist on
  1114. the original disks, this information will not be correctly reflected in
  1115. the ODM database.  The user should use "rmlvcopy" and "mklvcopy" to
  1116. rebuild any logical volume copies and synchronize the ODM.  Finally,
  1117. with an erased lvcb, the output from the "lslv" command might be
  1118. misleading or unreliable.
  1119.  
  1120.  
  1121. ------------------------------
  1122.  
  1123. Subject: 1.704: What's the limit on Physical Partitions Per Volume Group?
  1124. From: shieh@austin.ibm.com (Johnny Shieh)
  1125.  
  1126. 1016 Physical Partitions Per Disk in a Volume Group:
  1127.  
  1128.      In the design of LVM, each Logical Partition
  1129. maps to one Physical Partition.  And, each Physical
  1130. Partition maps to a number of disk sectors.  The design
  1131. of LVM limits the number of Physical Partitions that LVM
  1132. can track PER DISK in a volume group to 1016.  In most cases,
  1133. not all the possible 1016 tracking partitions are used by a disk.
  1134. The default size of each Physical Partition during a
  1135. "mkvg" command is 4 MB, which implies that individual
  1136. disks up to 4 GB can be included into a volume group.
  1137.  
  1138.      If a disk larger than 4 GB is added to a volume
  1139. group (based on usage of the default 4 MB size for
  1140. Physical Partition) the disk addition will fail with a
  1141. warning message that the Physical Partition size needs
  1142. to be increased.*  There are two instances where this
  1143. limitation will be enforced.  The first case is when the
  1144. user tries to use "mkvg" to create a volume group where
  1145. the number of physical partitions on one of the disks in
  1146. the volume group would exceed 1016.  In this case, the
  1147. user must pick from the available Physical Partition ranges of:
  1148.  
  1149. 1, 2, (4), 8, 16, 32, 64, 128, 256
  1150.  
  1151. Megabytes and use the "-s" option to "mkvg".  The second
  1152. case is where the disk which violates the 1016 limitation
  1153. is attempting to join a pre-existing volume group with
  1154. the "extendvg" command.  The user can either recreate the
  1155. volume group with a larger Physical Partition size (which
  1156. will allow the new disk to work with the 1016 limitation)
  1157. or the user can create a standalone volume group (consisting
  1158. of a larger Physical Partition size) for the new disk.
  1159.  
  1160.      In AIX 4.1 and 3.2.5, if the install code detects
  1161. that the rootvg drive is larger than 4 GB, it will change
  1162. the "mkvg -s" value until the entire disk capacity can be
  1163. mapped to the available 1016 tracks.**  This install change
  1164. also implies that all other disks added to rootvg, regardless
  1165. of size, will also be defined at that new Physical Partitions size.
  1166.  
  1167. For RAID systems, the /dev/hdiskX name used by LVM in AIX may
  1168. really consist of many non-4GB disks.  In this case, the 1016
  1169. limitation still exists.  LVM is unaware of the size of the
  1170. individual disks that may really make up /dev/hdiskX.  LVM bases
  1171. the 1016 limitation on the AIX recognized size of /dev/hdiskX,
  1172. and not the real independent physical disks that make up /dev/hdiskX.
  1173.  
  1174. The questions asked of this issue are:
  1175. 1) What are the symptoms of this problem?
  1176. 2) How safe is my data?  What if I never use mirroring or migratepv?
  1177. 3) Can I move this volume group between RS/6000 systems and versions
  1178.    of AIX?
  1179.  
  1180. Here are the answers:
  1181. A) What are the symptoms of this problem?
  1182.      The 1016 VGSA is used to track the "staleness of mirrors".
  1183.      If you are in violation of 1016, you may possibly get a false
  1184.      report of a non-mirrored logical volume being "stale" (which
  1185.      is an oxymoron) or you may get a false indication that one of
  1186.      the your mirror copies has gone stale.  Next, migratepv may
  1187.      fail because migratepv briefly uses mirroring to move a logical
  1188.      volume from one disk to another.  If the target logical
  1189.      partition is incorrectly considered "stale", then the migratepv
  1190.      cannot remove the source logical partition and the migratepv
  1191.      command will fail in the middle of migration.
  1192.  
  1193. B) How safe is my data?  What if I never use mirroring or migratepv?
  1194.      The data is as safe (in your mind) as the day before you found
  1195.      out about 1016 violations.  The only case where data may be
  1196.      lost is if one is mirroring a logical volume and ALL copies go
  1197.      bad at the same time and LVM isn't aware of it because the
  1198.      copies that go bad are beyond the 1016 tracking range.  However,
  1199.      in this case, you would lose data even if you were within the
  1200.      1016 range.  If you never mirror or use migratepv, then this
  1201.      issue shouldn't concern you.  But, it might be unwise to state
  1202.      you'll NEVER use either of those options.
  1203.  
  1204. C) Can I move this volume group between RS/6000 systems and versions
  1205.    of AIX?
  1206.      Yes you can.  The enforcement of this 1016 limit is only
  1207.      during mkvg and extendvg.  The "safeness" of the data on the
  1208.      volume group on AIX 3.2 is the same as it is on AIX 4.1.
  1209.  
  1210.  
  1211. * This bug was fixed in apar ix48926.  Current AIX 3.2.5 and
  1212. 4.1.1, which do not have this fix on applied, will allow the
  1213. creation of volume groups with more than 1016 partitions.  The
  1214. implication of this bug allowing more than 1016 physical
  1215. partitions is that the user may access all portions of the logical
  1216. volume.  However during disk mirroring, the status of partitions
  1217. beyond the 1016 limit will not be tracked correctly.  If mirrors
  1218. beyond the 1016 range become "stale", LVM will not be aware of
  1219. their condition and data consistency may become an issue for
  1220. those partitions.  Additionally, the "migratepv" command creates
  1221. mirrors and deletes them as a method for moving logical volumes
  1222. around within/between disks.  If the 1016 limit is violated,
  1223. then the "migratepv" command may not behave correctly.
  1224. The user should pick up apar ix51754, which clarifies the error
  1225. message when this condition is detected.  Additionally, the user
  1226. can read the non-ptf documentation apar ix50874 which is a companion
  1227. to ix48926 and ix51754.
  1228.  
  1229. ** This bug was fixed for AIX 3.2.5 rootvg install in apars
  1230. ix46862 and ix46863.  This bug does not exist in AIX 4.1.1.
  1231.  
  1232. ------------------------------
  1233.  
  1234. Subject: 1.705: Why am I having trouble adding another disk to my VG?
  1235. From: shieh@austin.ibm.com (Johnny Shieh)
  1236.  
  1237. In some instances, the user will experience a problem adding
  1238. a new disk to an existing volume group or in the creation of
  1239. a new volume group.  The warning message provided by LVM will
  1240. be:
  1241.  
  1242.     Not enough descriptor space left in this volume group.
  1243.     Either try adding a smaller PV or use another volume group.
  1244.  
  1245. On every disk in a volume group, there exists an area called the
  1246. Volume Group Descriptor Area (VGDA).  This space is what allows
  1247. the user to take a volume group to another AIX system and
  1248. "importvg" that volume group into that AIX system.  The VGDA
  1249. contains the names of disks that make up the volume group, their
  1250. physical sizes, partition mapping, logical volumes that exist in
  1251. the volume group, and other pertinent LVM management information.
  1252.  
  1253. When the user creates a volume group, the "mkvg" command
  1254. defaults to allowing the new volume group to have a maximum
  1255. of 32 disks in a volume group.  However, as bigger disks have
  1256. become more prevalent, this 32 disk limit is usually not
  1257. achieved because the space in the VGDA is used up faster, as
  1258. it accounts for the capacity on the bigger disks.  This
  1259. maximum VGDA space, for 32 disks, is a fixed size which is
  1260. part of the LVM design.  Large disks require more management
  1261. mapping space in the VGDA, which causes the number and size
  1262. of available disks to be added to the existing volume group
  1263. to shrink.  When a disk is added to a volume group, not only
  1264. does the new disk get a copy of the updated VGDA, but all
  1265. existing drives in the volume group must be able to accept
  1266. the new, updated VGDA.
  1267.  
  1268. The exception to this description of the maximum VGDA is
  1269. rootvg.  In order to provide AIX users more free space, when
  1270. rootvg is created, "mkvg" does not use the maximum limit of
  1271. 32 disks that are allowed into a volume group.  Instead in
  1272. AIX 3.2, the number of disks picked in the install menu of
  1273. AIX is used as the reference number by "mkvg -d" during the
  1274. creation of rootvg.  For AIX 4.1, this "-d" number is 7 for
  1275. one disk and one more for each additional disk
  1276. picked. i.e. you pick two disks, the number is 8.  you pick
  1277. three disks, the number is 9, and so on.....  This limit does
  1278. not mean the user cannot add more disks to rootvg in the
  1279. post-install phase.  The amount of free space left in a VGDA,
  1280. and thus the number of size of the disks added to a volume
  1281. group, depends on the size and number of disks already
  1282. defined for a volume group.  However, this smaller size
  1283. during rootvg creation implies that the user will be able to
  1284. add fewer disks to rootvg than compared to a non-rootvg
  1285. volume group.
  1286.  
  1287. If the customer requires more VGDA space in the rootvg, then
  1288. they should use the "mksysb" and "migratepv" commands to
  1289. reconstruct and reorganize their rootvg (the only way to
  1290. change the "-d" limitation is recreation of the rootvg).
  1291.  
  1292. Note:  It is always strongly recommended that users do not place
  1293. user data onto rootvg disks.  This separation provides an extra
  1294. degree of system integrity.
  1295.  
  1296. ------------------------------
  1297.  
  1298. Subject: 1.706: What are the limits on a file, filesystem?
  1299.  
  1300. There are other limits but these come up most often.  Logical Volumes
  1301. do not _have_ to contain Journaled File Systems and therefore can be
  1302. larger than 2GB even in 3.2.5.
  1303.  
  1304.     File    jfs-Filesystem
  1305. 3.2.5    2GB    2GB
  1306. 4.1.x    2GB    64GB
  1307. 4.2    64GB    128GB
  1308.  
  1309. While it *might* be possible to create larger file systems,  the limits
  1310. shown here represent values that IBM has supposedly tested.    
  1311.  
  1312. ------------------------------
  1313.  
  1314. Subject: 1.707:  Hints for Segate 9 GB and other disks larger than 4 GB? 
  1315.  
  1316. [read 1.704]
  1317.  
  1318. ------------------------------
  1319.  
  1320. Subject: 1.708: How do I fix Volume Group Locked?
  1321.  
  1322. >From /usr/lpp/bos/README (AIX 3.2.5) and 1.800.IBM.4FAX #2809
  1323.  
  1324. If you get '0516-266 publvodm: volume group rootvg is locked, try again'
  1325. or something similar, you can use (putlvodm -K `getlvodm -v <vgname>`)
  1326.  
  1327. ------------------------------
  1328.  
  1329. Subject: 1.709: How do I remove a volume group with no disks?
  1330. From: shieh@austin.ibm.com (Johnny Shieh)
  1331.  
  1332. This is a very common question about AIX LVM and I thought
  1333. I might take some time to explain what is going on.  Within
  1334. a volume group is the Volume Group Descriptor Area (VGDA) is
  1335. is kinda a "suitcase" of lvm information.  This is what allows
  1336. you to pick up your drives and take them to another machine,
  1337. importvg them, and get filesystems automatically defined.
  1338.  
  1339. What happens is that when you importvg the volume group,
  1340. the RS/6000 goes out and reads the VGDA and finds out about
  1341. all the logical volumes and filesystems that may exist on the
  1342. volume group.  It then checks for clashes (name conflicts, etc..)
  1343. on its own machine and then, here is the important part, populates
  1344. its own database with information about the new volume group and
  1345. its associated logical volumes.  In cases of filesystems, it will
  1346. go into the /etc/filesystems file and add the new filesystem entries
  1347. that came along with the imported volume group.
  1348.  
  1349. Okay, the key point is that you've got this independent volume group
  1350. that has "docked" at the new RS/6000.  What keeps the two tethered
  1351. to each other is the varyonvg command.  When this is started on the
  1352. volume group, a software link is created where you can't separate the
  1353. volume group from the AIX operating system unless the volume group
  1354. is no longer seen as active by the system.  In very rare cases, a
  1355. situation can occur where the VGDA thinks that someone has it (the
  1356. volume group) activated, but the operating system doesn't think it has the
  1357. volume group opened up.  This is pretty rare.
  1358.  
  1359. The main question I see is "I've taken away the disks, but how do
  1360. I get rid of the volume group".  The question should really say,
  1361. "How do I get rid of the volume group INFORMATION" since that's
  1362. all you have on the system.  You've got possible entries in
  1363. the /etc/filesystems and definitely entries in the ODM.  Just 
  1364. do:
  1365.     exportvg <vgname>
  1366.  
  1367. It does a reverse importvg, except it doesn't go off and read
  1368. the VGDA.  It nukes anything relating to the volume group in
  1369. the /etc/filesystems and ODM.  The only time this won't work is
  1370. if the system detects that the volume group is varied on.  Then,
  1371. it would be like trying to change tires on a moving car, we won't
  1372. let you do it!
  1373.  
  1374. Some people are concerned that doing an exportvg will somehow damage
  1375. the volume group and/or its VGDA. As I said, all it does is affect the
  1376. information about the volume group on the RS/6000 box, not on the actual
  1377. disk platter itself.  Thus, the volume group you exported is safe to
  1378. take to another system.  The only time the VGDA gets overwritten is when
  1379. you create a new volume on top of it.
  1380.  
  1381. The second most often asked question is "How do I get rid of a disk
  1382. that is no longer really in the volume group?"
  1383.  
  1384. In this case, you DON'T want to do an exportvg.  What you want to do
  1385. is tell the system you want to cut out the memory of the old, bad disk
  1386. from the RS/6000 AND from the VGDA of the volume group.  You simply
  1387. do:
  1388.  
  1389.         reducevg -d -f <vgname> <hdname>
  1390.  
  1391. or if the hdname can't be found:
  1392.  
  1393.         reducevg -d -f <vgname> <PVID>
  1394.  
  1395. Be careful with this command.  Unlike the exportvg command, actions done
  1396. with this command WILL affect the VGDA information on the platter.
  1397.  
  1398. Hope this clarifies some questions about volume groups.
  1399.  
  1400. ------------------------------
  1401.  
  1402. Subject: 1.710:  What are the theoritical limits within the LVM?
  1403. From: Gerry FitzGerald <G.FitzGerald@uk22p.bull.co.uk>
  1404.  
  1405.   -------------------------------------
  1406.   LVM Limits within AIX (my perception)
  1407.   -------------------------------------
  1408.   
  1409.   The system may have 1 to 255 Volumes Groups (VG's).
  1410.   Each VG may contain 1 to 32 Physical Volumes (PV's).
  1411.   Each PV may contain upto 1016 Physical Partitions (PP's).
  1412.   Each PP may have a size (square of 2) from 1 to 256MB (1024MB for AIX 4.3).
  1413.   
  1414.   Therefore, if you can get hold of a 260,096 MB disk (one PV with 1016 
  1415.   x 256MB PPs), you can install 32 of these in a single VG giving you 
  1416.   8,323,072MB per VG. You may have up to 255 VG's in one AIX system so 
  1417.   you could (in theory) create the maximum addressable AIX storage area 
  1418.   of 2,122,383,360 MB (2,072,640 GB or 2,024 TB or approx. 2 PB). This 
  1419.   is based on the current limitations of AIX V4.1.
  1420.   
  1421.   The limits for file and filesystem sizes are:
  1422.  
  1423. [Editor's note: the original values in this mail appeared to
  1424.  be slightly wrong, I have corrected that to the values as per
  1425.  my interpretation of the AIX manual.]
  1426.   
  1427.   AIX V3.2  Max filesystem size:  2,147,483,647 bytes (2 GB)
  1428.   Max single file size:  2,147,483,647 bytes (2 GB)
  1429.   
  1430.   AIX V4.1  Max filesystem size:  1,099,511,627,776 bytes (1 TB)
  1431.   Max single file size:  2,147,483,647 bytes (2 GB)
  1432.   
  1433.   AIX V4.2  Max filesystem size:  1,099,511,627,776 bytes (1 TB)
  1434.   Max single file size:  68,589,453,312 (~64 GB)
  1435.  
  1436.   AIX V4.3  Max filesystem size:  1,099,511,627,776 bytes (1 TB)
  1437.   Max single file size:  68,589,453,312 (~64 GB)
  1438.  
  1439. The 1TB maximum file system size is given by the rule that each
  1440. fragment must be addressable by an 28 bit number, with the largest
  1441. fragment size being 4096 bytes (4096*2^28).
  1442.  
  1443. ------------------------------
  1444.  
  1445. Subject: 1.800: How do I control how hostnames are resolved?
  1446. From: <kraem@ibm.de> Frank Kraemer
  1447.  
  1448. Information from AIX 4.1.2 Infoexplorer:
  1449.  
  1450. The default order can be overwritten by creating the configuration file,
  1451. /etc/netsvc.conf and specifying the desired order. Both the default and
  1452. /etc/netsvc.conf can be overwritten with the environment variable,
  1453. NSORDER. If either the /etc/netsvc.conf file or environment variable,
  1454. NSORDER are defined, then at least one value must be specified along with
  1455. the option.
  1456.  
  1457. examples: 
  1458.     echo hosts = local,nis,bind >/etc/netsvc.conf
  1459.     NSORDER=local,bind; export NSORDER
  1460.  
  1461. [Editor's notice: As of AIX 4.3 you also have bind4 & bind8 (for IPv4 & IPv6)]
  1462.  
  1463. ------------------------------
  1464.  
  1465. Subjet: 1.801: dtlogin ignores /etc/profile?
  1466. From: Trevor Bourget (trevor@thomsoft.com)
  1467.  
  1468. Read the /usr/dt/bin/Xsession script.  You can add a file to the
  1469. /etc/dt/config/Xsession.d and it will get sourced as part of the
  1470. startup.  The order is: $HOME/.dtprofile, /etc/dt/config/Xsession.d/*,
  1471. /usr/dt/config/Xsession.d/* (backwards, in my opinion, but CDE is a
  1472. committee result after all).
  1473.  
  1474. >From: Ed Ravin <eravin@panix.com>
  1475.  
  1476. If you want your terminal session to automatically read in
  1477. /etc/profile and your .profile when they start up, you need to either
  1478. invoke them with the "-ls" option (which I couldn't figure out how to
  1479. do, perhaps someone else can elaborate), or set up the default X
  1480. resources so that they set:
  1481.  
  1482. *Dtterm*loginShell:     true
  1483.  
  1484. You could always do this with the .Xresources file in your own account,
  1485. but that wouldn't fix any other users in the system.  To make this change
  1486. globally:
  1487.  
  1488. CDE configuration files are kept in /usr/dt/config
  1489.  
  1490. Those files warn you strenuously not to change them, since AIX upgrades
  1491. will overwrite them and lose your changes.  They recommend that you copy
  1492. the files to /etc/dt/config and change them there, so:
  1493.  
  1494. # cd /usr
  1495. # find dt/config -print | cpio -pdvum /etc
  1496. ... (files get copied)
  1497. # cd /etc/dt/config/C
  1498. # echo "*Dtterm*loginShell:     true" >> sys.resources
  1499. # cd ../en_US
  1500. # echo "*Dtterm*loginShell:     true" >> sys.resources
  1501.  
  1502. From: Olaf Meeuwissen <olaf@IMSL.shinshu-u.ac.jp>
  1503.  
  1504. The problem is in /usr/dt/bin/Xsession.  This script only recognizes
  1505. the following login shells: sh, ksh and csh (as of $Revision: 1.12 $).
  1506. All other shells are considered non-standard.
  1507.  
  1508. The fix is to have your sys-admin add any other login shells in the
  1509. right places in the script (twice in the "Start the session" part).
  1510. Look for "case ${SHELL##*/} in" and add shells in the patterns.
  1511.  
  1512. Note that this script will be overwritten unconditionally by system
  1513. updates :-( and, unlike much other stuff in /usr/dt/, copying it to
  1514. /etc/dt/ does not work.
  1515.  
  1516. For which shells to add, you may want to:
  1517.  
  1518.    $ grep shells /etc/security/login.cfg
  1519.  
  1520. ------------------------------
  1521.  
  1522. Subject: 1.802:  Where's the C compiler?
  1523.  
  1524. As of AIX 4.1,  the C compiler has been "unbundled."  It's a separate product,
  1525. and you must purchase a separate license for it.  IBM does offer free
  1526. time limited trial licenses if you want to "try before you buy."
  1527.  
  1528. The GNU C compiler is available from various sources.  The most convenient
  1529. is probably <http://www-frec.bull.com/>.  <ftp://aixpdslib.seas.ucla.edu/>
  1530. is another source.
  1531.  
  1532. ------------------------------
  1533.  
  1534. Subject: 1.803:  Why doesn't Netscape work?
  1535.  
  1536. See question 1.515.
  1537.  
  1538. ------------------------------
  1539.  
  1540. Subject: 1.900: SCSI-1 and SCSI-2 "interoperability" got you confused?  
  1541.  
  1542. A.  SCSI-1 devices are supported on a SCSI-2 adapter.  This
  1543.     config will provide SCSI-1 performance.
  1544.  
  1545. B.  SCSI-2 devices are supported on a SCSI-1 adapter.  This
  1546.     config will provide SCSI-1 performance.
  1547.  
  1548. C.  A mix of SCSI-2 and SCSI-1 devices are supported on a SCSI-1
  1549.     adapter.  All devices will have SCSI-1 performance.
  1550.  
  1551. D.  A mix of SCSI-2 and SCSI-1 devices are supported on a SCSI-2
  1552.     adapter.  SCSI-2 devices will have SCSI-2 performance (10 MB/sec)
  1553.     and SCSI-1 devices will have SCSI-1 performance (4-5 MB/sec).
  1554.  
  1555. ------------------------------
  1556.  
  1557. Subject: 1.901: How to get your keyboard back after unplugging it from the 6000
  1558. From: Mickey Coggins and Anne Serre and L. Mark Larsen
  1559.  
  1560. When you unplug your keyboard from a running system, and plug it back
  1561. in, the key mapping is wrong.  For example, keys like Caps Lock and Ctrl
  1562. don't work as designed.
  1563.  
  1564. Solution: Type at the command line
  1565.  
  1566.         /usr/lpp/diagnostics/da/dkbd
  1567.  
  1568. Your screen goes black, you hear a few beeps, and your keyboard is reset.
  1569. It works with any environment, Xwindows, hft, NLS...
  1570.  
  1571. For Models 220, 230 and M20, use the following commands:
  1572.  
  1573. /usr/lpp/diagnostics/da/dkbd
  1574. /usr/lpp/diagnostics/da/dkbdsal   (for the 220)
  1575.  
  1576. After running the keyboard diagnostics to reset keyboard mappings, the
  1577. repeat rate is also reset to some slow value (11, according to the man
  1578. page).  If the user is in X, you need to open an hft window.  Do this
  1579. with "xopen /bin/csh".  Once you have an hft window, run "chhwkbd -r30".
  1580.  
  1581. [Editor's note: By unplugging & plugging a keyboard/mouse on a live
  1582.  system you may/will damage/zap/fry/destroy the motherboard]
  1583.  
  1584. ------------------------------
  1585.  
  1586. Subject: 1.902: How do I set up pcsim, the DOS emulator?
  1587.  
  1588. [Editor's Note: this product does not exist in AIX 4.x.]
  1589.  
  1590. You must have a bootable DOS diskette to install pcsim. Either DOS 3.3, 
  1591. 4.x, or 5.0 will work. IBM do not officially support DOS 5.0 for pcsim
  1592. but I have no problems with it. Just don't try to be fancy with the UMB 
  1593. and memory manager stuff.
  1594.  
  1595. With a bootable DOS disk in the drive, do:
  1596. $touch /u/dosdrive (this is the AIX file for DOS emulation)
  1597. $pcsim -Adiskette 3 -Cdrive /u/dosdrive
  1598. You would now get an A prompt. Type:
  1599. A> fdisk
  1600. Create the virtual C drive of whatever size you choose. Make it large 
  1601. enough for your needs since you cannot enlarge it later.
  1602. A> format c: /s (to format the virtual C drive)
  1603. Now exit from pcsim with ESCpcsim (Esc key followed by pcsim).
  1604.  
  1605. Now create a simprof file. Following is a starter:
  1606.  
  1607. Adiskette   : 3
  1608. Cdrive      :/u/dosdrive
  1609. lpt1        : name of printer queue
  1610. refresh     : 50
  1611. dmode       : V
  1612. mouse       : com1
  1613.  
  1614. You can now start pcsim anytime by typing pcsim. Make sure no floppies
  1615. are in the drive. For further information, refer to publication
  1616. SC23-2452, Personal Computer Simulator/6000 Guide and Reference.
  1617.        
  1618. ------------------------------
  1619.  
  1620. Subject: 1.903: How do I transfer files between AIX and DOS disks?
  1621.  
  1622. In the AIX package bos.dosutils are commands for transferring files between
  1623. DOS diskettes and AIX. The commands are dosread, doswrite, dosdir, dosdel,
  1624. and dosformat. Many users have mentioned that the mtools package from
  1625. prep.ai.mit.edu is better than the native AIX programs.
  1626.  
  1627. ------------------------------
  1628.  
  1629. Subject: 1.904: Where is the crypt program?
  1630.  
  1631. The crypt *program* (as opposed to the crypt subroutine) has been
  1632. deleted to conform to U.S. law regarding export of missile,
  1633. ammunitions, nuclear and cryptographic technology.
  1634.  
  1635. Other programs such as PGP are available,  but their use and/or
  1636. possesion may be subject to local laws and regulations.
  1637.  
  1638. France is such a place.
  1639.  
  1640. If anyone has a better answer to this question (like places where crypto
  1641. devices are illegal/severely restricted),  feel free to contribute it.
  1642.  
  1643. ------------------------------
  1644.  
  1645. Subject: 1.905: How do I play audio CDs?
  1646. From: woan@austin.ibm.com (Ronald S. Woan)
  1647.  
  1648. Get xmcd by anonymous FTP from ftp.x.org in /contrib/applications/xmcd/
  1649. <URL:ftp://ftp.x.org/contrib/applications/xmcd/>
  1650.  
  1651. ------------------------------
  1652.  
  1653. Subject: 1.906: How can I get the mouse back after unplugging it?
  1654.  
  1655. /usr/lpp/diagnostics/da/dmousea
  1656.  
  1657. [Editor's note: By unplugging & plugging a keyboard/mouse on a live
  1658.  system you may/will damage/zap/fry/destroy the motherboard]
  1659.  
  1660. ------------------------------
  1661.  
  1662. Subject: 1.907: Where can I get source code to the operating
  1663.                 system binary xxxxx?
  1664.  
  1665. AIX source code is not generally available.  Two other UNIX OS' do
  1666. make their source available, Linux & freeBSD.  Check
  1667. <ftp://ftp.uu.net/systems/unix/bsd-sources/> and
  1668. <ftp://ftp.uu.net/systems/unix/linux/>
  1669.  
  1670. ------------------------------
  1671.  
  1672. Subject: 1.908: What's the difference between the POWER and
  1673.                 POWERPC architectures?
  1674.  
  1675. Read the POWERPC FAQ at
  1676. <http://www.mot.com/SPS/PowerPC/library/ppc_faq/ppc_faq.html>
  1677.  
  1678. ------------------------------
  1679.  
  1680. Subject: 1.909: Will there be date rollover problems in the year 2000?
  1681. From: mbrown@austin.ibm.com (Mark Brown)
  1682.  
  1683. IBM has a major corporate-wide push for *all* of its software products
  1684. to be "safe" in this regard by the end of 1996.
  1685.  
  1686. <http://www.software.ibm.com/year2000/paper.html> is the general-purpose
  1687. [Year 2000] URL for IBM.
  1688.  
  1689. As far as AIX is concerned, we had to fix three things in AIXv4.1.4
  1690. (some logging commands handled date ranges wrong) as PTFs, but other
  1691. than that, we are there.
  1692.  
  1693. ...and we handle the leap year issue correcly. also.
  1694.  
  1695. ------------------------------
  1696.  
  1697. Subject: 1.910: How can I build an "installp format" file?
  1698.  
  1699. Jim Abbey <jim@systelecom.com> has a tool called "lppbuild".
  1700. It is now available from "aixpdslib.seas.ucla.edu"
  1701. in either of
  1702.  
  1703. /pub/lppbuild/RISC/3.2/src/lppbuild.1.0.tar.Z
  1704. /pub/lppbuild/RISC/4.1/src/lppbuild.1.0.tar.Z
  1705.  
  1706. Both are identical and the procedures also work on 4.2.
  1707.  
  1708. Ciaran Diegnan <C.Diegnan@frec.bull.fr> has built a tool called
  1709. "mklpp".  You can retrieve a copy (along with many other
  1710. smit-installable freeware packages) from <http://www-frec.bull.com/>.
  1711.  
  1712. ------------------------------
  1713.  
  1714. Subject: 1.911: Is there a generic SCSI driver for AIX?
  1715. From: Rogan Dawes <rdawes@jhbelec.co.za>
  1716.  
  1717. Yes. Matthew Jacob (mjacob@feral.com) has written a generic SCSI driver
  1718. for AIX 4.1.  It can be found at <ftp://ftp.feral.com/pub/aix/gsc.tar.gz>.
  1719.  
  1720. ------------------------------
  1721.  
  1722. Subject: 1.912: Viruses or virus scanning on AIX?
  1723. From: mww@microfocus.com (Michael Wojcik)
  1724.  
  1725. FWIW, AIX comes with a virus-scanning utility (/usr/bin/virscan),
  1726. though IIRC the original version had an empty signature file (in
  1727. /usr/lib/security/scan/virsig.lst) and even the later populated
  1728. signature file only contains PC viruses.  Quoth the man page, "at
  1729. this time [virsig.lst] contains no known AIX virus signatures".
  1730. Apparently we are to infer that there *were* no known AIX virus
  1731. signatures.
  1732.  
  1733. I note that my 4.2.1 AIX system still has the 1991 signature file.
  1734.  
  1735. Even a DOS-only virus list could potentially be useful on a Unix
  1736. file server, though.  Provided, of course, that it had a recent
  1737. signature list (and preferably mutant-detection and similar
  1738. heuristics), which virscan probably does not.
  1739.  
  1740. And to be fair there are plenty of Unix vulnerabilities, and even
  1741. viruses potentially among them.  David Harley, keeper of the
  1742. alt.comp.virus FAQ, mentioned some "lab" Unix viruses when this
  1743. thread appeared in October '87, and I recall a discussion of using
  1744. crypto hashes to validate major system commands on some Unix group
  1745. not that long ago - which is essentially virus-scanning technology,
  1746. though not necessarily for the same purpose it generally serves
  1747. on PCs.
  1748.  
  1749. That said, viruses are not the problem for Unix systems that they
  1750. are for PCs.  Network security, guessable usernames and passwords,
  1751. and the like should generally be a higher priority.
  1752.  
  1753. ------------------------------
  1754.  
  1755. Subject: 1.913: How do I determine the clock frequency of a RS/6000 by
  1756.     software ?
  1757. From: Franz Pestenhofer <franz.pestenhofer@debis.com>
  1758.  
  1759. The answer seems to be "There is no way to find
  1760. out the clock frequency with a piece of software".
  1761.  
  1762. [Editor's notice: on CHRP machines there is information on the open firmware] 
  1763.  
  1764. ------------------------------
  1765.  
  1766. Subject: 1.914: How do I create a ramdisk ?
  1767. From: Mark Grubbs <mark@grubbs.austin.ibm.com>
  1768.  
  1769. # mkramdisk SIZE
  1770. /dev/rramdiskxx
  1771. # mkfs -V jfs /dev/ramdiskxx
  1772. # mount -V jfs -o nointegrity /dev/ramdiskxx /whatever
  1773.  
  1774. [Editor's notice: This function is new in 4.3.3 ]
  1775. [Editor's notice: This function is UNSUPPORTED  ]
  1776.  
  1777. ------------------------------
  1778.  
  1779. Subject: 1.915: Can I run Linux on an RS/6000 ?
  1780.  
  1781. Some distributions can be installed on some RS/6000's.
  1782. They only support a subset of the available cards.
  1783.  
  1784. For more information see:
  1785.  
  1786. http://www.rs6000.ibm.com/linux
  1787. http://oss.software.ibm.com/developerworks/opensource/linux/projects/p
  1788.  
  1789. http://www.linuxppc.com
  1790. http://www.linuxppc.org
  1791. http://www.yellowdog linux.com
  1792. http://www.suse.com/products/susesoft/PPC
  1793. http://www.debian.org
  1794.  
  1795. ------------------------------
  1796.  
  1797. Subject: 2.00: C/C++
  1798.  
  1799. Contrary to many people's belief, the C environment on the RS/6000 is
  1800. not very special.  The C compiler has quite a number of options that can
  1801. be used to control how it works, which "dialect" of C it compiles, how
  1802. it interprets certain language constructs, etc.  InfoExplorer includes a
  1803. Users Guide and a Reference Manual.
  1804.  
  1805. The compiler can be invoked with either xlc for strict ANSI mode and cc
  1806. for RT compatible mode (i.e. IBM 6150 with AIX 2).  The default options
  1807. for each mode are set in the /etc/xlc.cfg file, and you can actually add
  1808. another stanza and create a link to the /bin/xlc executable.
  1809.  
  1810. The file /usr/lpp/xlc/bin/README.xlc has information about the C
  1811. compiler, and the file /usr/lpp/bos/bsdport (AIX 3 only) contains useful
  1812. information, in particular for users from a BSD background.
  1813.  
  1814. The file /etc/xlc.cfg also shows the symbol _IBMR2 that is predefined,
  1815. and therefore can be used for #ifdef'ing RS/6000 specific code.
  1816.  
  1817. ------------------------------
  1818.  
  1819. Subject: 2.01: I cannot make alloca work
  1820.  
  1821. A famous routine, in particular in GNU context, is the allocation
  1822. routine alloca().  Alloca allocates memory in such a way that it is
  1823. automatically free'd when the block is exited.  Most implementations
  1824. does this by adjusting the stack pointer.  Since not all C environments
  1825. can support it, its use is discouraged, but it is included in the xlc
  1826. compiler.  In order to make the compiler aware that you intend to use
  1827. alloca, you must put the line
  1828.  
  1829. #pragma alloca
  1830.  
  1831. before any other statements in the C source module(s) where alloca is
  1832. called.  If you don't do this, xlc will not recognize alloca as anything
  1833. special, and you will get errors during linking.
  1834.  
  1835. For AIX 3.2, it may be easier to use the -ma flag.
  1836.  
  1837. ------------------------------
  1838.  
  1839. Subject: 2.02: How do I compile my BSD programs?
  1840.  
  1841. The file /usr/lpp/bos/bsdport contains information on how to port
  1842. programs written for BSD to AIX 3.  This file may be very useful for
  1843. others as well.
  1844.  
  1845. A quick cc command for most "standard" BSD programs is:
  1846.   
  1847.   $ cc -D_BSD -D_BSD_INCLUDES  -o [loadfile] [sourcefile.c] -lbsd
  1848.  
  1849. If your software has system calls predefined with no prototype
  1850. parameters, also use the -D_NO_PROTO flag.
  1851.  
  1852. ------------------------------
  1853.  
  1854. Subject: 2.03: Isn't the linker different from what I am used to?
  1855.  
  1856. Yes.  It is not at all like what you are used to:
  1857.  
  1858. - The order of objects and libraries is normally _not_ important.  The
  1859.   linker reads _all_ objects including those from libraries into memory
  1860.   and does the actual linking in one go.  Even if you need to put a
  1861.   library of your own twice on the ld command line on other systems, it
  1862.   is not needed on the RS/6000 - doing so will even make your linking slower.
  1863.  
  1864. - One of the features of the linker is that it will replace an object in
  1865.   an executable with a new version of the same object:
  1866.  
  1867.   $ cc -o prog prog1.o prog2.o prog3.o        # make prog
  1868.   $ cc -c prog2.c                # recompile prog2.c
  1869.   $ cc -o prog.new prog2.o prog            # make prog.new from prog
  1870.                         # by replacing prog2.o
  1871.   
  1872. - The standard C library /lib/libc.a is linked shared, which means that
  1873.   the actual code is not linked into your program, but is loaded only
  1874.   once and linked dynamically during loading of your program.
  1875.  
  1876. - The ld program actually calls the binder in /usr/lib/bind, and you can
  1877.   give ld special options to get details about the invocation of the
  1878.   binder.  These are found on the ld man page or in InfoExplorer.
  1879.  
  1880. - If your program normally links using a number of libraries (.a files),
  1881.   you can 'prelink' each of these into an object, which will make your
  1882.   final linking faster.  E.g. do:
  1883.  
  1884.   $ cc -c prog1.c prog2.c prog3.c
  1885.   $ ar cv libprog.a prog1.o prog2.o prog3.o
  1886.   $ ld -r -o libprog.o libprog.a
  1887.   $ cc -o someprog someprog.c libprog.o
  1888.  
  1889. This will solve all internal references between prog1.o, prog2.o and
  1890. prog3.o and save this in libprog.o Then using libprog.o to link your
  1891. program instead of libprog.a will increase linking speed, and even if
  1892. someprog.c only uses, say prog1.o and prog2.o, only those two modules
  1893. will be in your final program.  This is also due to the fact that the
  1894. binder can handle single objects inside one object module as noted above.
  1895.  
  1896. If you are using an -lprog option (for libprog.a) above, and still want
  1897. to be able to do so, you should name the prelinked object with a
  1898. standard library name, e.g. libprogP.a (P identifying a prelinked
  1899. object), that can be specified by -lprogP.  You cannot use the archiver
  1900. (ar) on such an object.
  1901.  
  1902. You should also have a look at section 3.01 of this article, in
  1903. particular if you have mixed Fortran/C programs.
  1904.  
  1905. Dave Dennerline (d.dennerline@bull.com) claims that his experiences
  1906. in prelinking on AIX does not save much time since most people have
  1907. separate libraries which do not have many dependencies between them,
  1908. thus not many symbols to resolve.
  1909.  
  1910. ------------------------------
  1911.  
  1912. Subject: 2.04: How do I statically link my program?
  1913.  
  1914.   cc -o prog -bnoso -bI:/lib/syscalls.exp obj1.o obj2.o obj3.o
  1915.  
  1916. will do that for a program consisting of the three objects obj1.o, etc.
  1917.  
  1918. [Editor's note: You should never link programs statically that are
  1919. supposed to leave your local environment, e.g. intended for
  1920. distribution. Statically linked programs may fail to work after
  1921. installing a new AIX version or even after installing a PTF.]
  1922.  
  1923. From: Marc Pawliger (marc@sti.com)
  1924.  
  1925. As of AIX 3.2.5, you can install a speedup for AIXwindows called
  1926. Shared Memory Transport.  To static link an X application after the
  1927. SMT PTF has been installed, you must link with
  1928. -bI:/usr/lpp/X11/bin/smt.exp and the executable will NOT run on a
  1929. machine where SMT is not installed.  See /usr/lpp/X11/README.SMT
  1930.