From: faq-rt@antimatr.hou.tx.us (Mark Whetzel) Newsgroups: comp.sys.ibm.pc.rt,comp.unix.aix,comp.answers,news.answers Subject: COMP.SYS.IBM.PC.RT: AIX V2 FAQ - Question/Answer, Part 2 of 2 Asked Questions (and their answers) and general information, hints and tips on issues related to using AIX V2.2.x on IBM RT (Model 615x) computers. Keywords: IBM RT PC software FAQ 6150 6151 6152 AIX VRM AOS MACH PICK Message-ID: Date: 5 Jul 94 03:57:37 GMT Expires: 17 Aug 94 03:56:49 GMT References: Sender: markw@antimatr.hou.tx.us Reply-To: aix-rt@antimatr.hou.tx.us Followup-To: comp.sys.ibm.pc.rt Lines: 999 Approved: news-answers-request@MIT.Edu Supersedes: Xref: news.lth.se comp.sys.ibm.pc.rt:2925 comp.unix.aix:41905 comp.answers:6165 news.answers:24718 Archive-name: ibm-rt-faq/aix-v2/misc/part2 Last-modified: Wed May 18 00:16:17 CDT 1994 Version: 1.2 Frequently Asked Questions for: AIX V2.2.1 on IBM RT systems Various subject Q & A topics for AIX/RT. Part 2 of 2 parts. The AIX V2 FAQ currently consists of EIGHT parts in 5 topic areas: AIX V2 FAQ Index and acknowledgements AIX V2 Hardware specific issues - in one part (currently). AIX V2 Software questions - in three parts. AIX V2 Problem Questions and answers - two parts. (This FAQ) AIX V2 Porting software notes - in one part (currently). See the AIX V2 FAQ Index posting for a complete index of the AIX FAQ postings. ================================================================================ 3.0 Problem Question and Answers (continued). Q.17 - What books comprise a full set of AIX/RT documentation? Manuals marked with an @ sign were shipped with every system that had ordered AIX/RT. Manuals marked with a % shipped with ALL systems regardlesss of the OS. NOTE: The "SBOF" (special bill of forms) manual numbers included the manual and a binder. Some SBOF numbers were used to group sets of related manuals into special ship groups as well. IBM RT Bibliography: General Information. - GC23-0783 IBM RT PC General Information - GC23-0784 IBM 6150 Concepts - GC23-2002 AIX Family Definition - GC23-2129 AIX/RT General Information - GH23-0150 AIX/RT Hardware/Software Catalog - SA23-1057 IBM RT PC Technology @- SBOF-1817 SC23-0788 Bibliography and master index AIX 2.2 Planning, Installation and Operation. - GA23-1058 Planning and Site Preparation Guide - GA23-1061 Software Planning Guide - GC23-0782 IBM RT Planning Guide @- SBOF-1816 SC23-2012 Installing VRM 2.2 @- SBOF-1817 SC23-2013-0 Installing and Customizing AIX 2.2 @- SBOF-1817 SC23-2013-1 Installing and Customizing AIX 2.2.1 P/N 27F4352. @- SBOF-1817 SC23-2023-1 Bibliography and Master Index %- SBOF-1828 SA23-2607 Guide to Operations P/N 22F9801 %- SBOF-1829 SA23-2608 User Setup Guide P/N 22F9802 % SA23-2609 Options Installation P/N 22F9802 Hardware. - SBOF-0126 Keyboard Description and Character Reference - SBOF-1826 SV21-8025 (old) 6150 Syst. Unit Hardware Maintenance and Service - SBOF-1826 SA23-2605 6150 Syst. Unit Hardware Maintenance and Service Also orderable as P/N 22F9803. - SBOF-1827 SV21-8026 6151 Syst. Unit Hardware Maintenance and Service - SBOF-1830 SV21-8024 (old) Hardware Technical Reference - SBOF-1830 SA23-2610 Hardware Technical Reference Vol 1 P/N 22F9805 - SA23-2611 Hardware Technical Reference Vol 2 - SA23-2612 Hardware Technical Reference Vol 3 Problem determination. - SBOF-1822 SC23-2018 AIX 2.2 System Messages Reference @- SBOF-1825 SA23-2604 Problem Determination Guide: Hardware P/N 22F9800. @ SA23-2603 Problem Determination Guide: AIX P/N 22F9815. Technical References. - SC23-2022 VRM 2.2 Quick Reference fold out card - SBOF-1517 AIX 2.2 Tech.Ref. + VRM 2.2 Tech.REF. - SBOF-1808 SC23-2006 AIX 2.2 Device Driver Development Guide P/N 08F3424 4 Samples diskettes included: P/N's 92X1326, 92X1328, 92X1329, 92X1337 - SBOF-1818 SC23-2014 VRM 2.2 Virtual Resource Manager Programming Reference (formerly VRM Technical Reference Vol.1) P/N 08F3410 SC23-2015 VRM 2.2 Virtual Resource Manager Device Support (formerly VRM Technical Reference Vol.2) - SBOF-1823 SC23-2019 AIX 2.2 Technical Reference Vol.1 SC23-2020 AIX 2.2 Technical Reference Vol.2 - SBOF-1823 SC23-2125 AIX 2.2.1 System calls and Subroutines P/N 27F4355 (formerly Technical Reference Vol.1) SC23-2126 AIX 2.2.1 Files and Extensions P/N 27F4355 (formerly Technical Reference Vol.2) AIX Operating System. - SX23-0713 AIX Quick Reference - SBOF-0157 AIX Text Formatting Guide @- SBOF-1809 SC23-2007 Using the AIX 2.2 Operating System P/N 08F3406 @- SBOF-1810 SC23-2008 Managing the AIX 2.2 Operating System P/N 22F4353 @- SBOF-1814 SC23-2011 AIX 2.2 Commands Reference Vol.1 P/N 27F4354 @ SC23-2081 AIX 2.2 Commands Reference Vol.2 - SBOF-1819 SC23-2016 AIX 2.2 Programming Tools and Interfaces AIX Shells. @- SBOF-0149 Usability Services Reference @ SX23-0714 Usability Services Quick Reference - SBOF-0158 AIX DOS Services Reference SX23-0717 DOS Services Quick Reference @- SBOF-0160 SC23-0799 INed (Editor) @ SV21-8081 Using INed Editor @ SX23-0715 INed Editor Quick Reference - SBOF-0276 X-Windows version 1.1 Guide and Reference - SBOF-1868 SC23-2017 X-Windows version 2.1 User's Guide SC23-2118 X-Windows version 2.1 Programmer's Guide Keyboard templates. (Packaged with Using the AIX Operating System) - SBOF-1809 SX23-0743 RT PC AIX Functions for the VT100 keyboard. - SX23-0744 RT PC AIX Functions for the VT220 keyboard. - SX23-0745 RT PC AIX Functions for the IBM3161, IBM3162 and IBM 3163 keyboards. - SX23-0746 RT PC AIX Functions for the ASYNC Terminal Emulation - SX23-0747 RT PC AIX Functions for the IBM RT PC Keyboard. Data Management. - SV21-8015 Data Management Services - SX23-0718 SQL/RT Quick Reference - SBOF-0139 Easy SQL/RT User's Guide - SBOF-0140 SQL/RT Interactive Command User's Guide - SBOF-0141 SQL/RT Programmer's Guide Programming languages. - SC23-2106 VS COBOL Language Reference - SC23-2107 VS COBOL User's Guide - SC23-2108 VS COBOL Runtime Guide - SC23-2124 AIX/RT Modula-2 Develop. Syst. User's Guide - SV21-8016 Pascal Compiler Fundamentals - SV21-8017 Pascal Compiler Language Reference - SV21-8018 Basic Language Reference - SV21-8019 Basic Language Handbook - SV21-8027 FORTRAN 77 Language Reference - SV21-8062 LISP Development System 1.0.1 Guide and Ref. - SX23-0716 C language Quick Reference - SBOF-0133 Assembler Language Reference Manual - SBOF-0134 C Language Guide and Reference - SBOF-0105 SH23-0127 VS PASCAL User's Guide SH23-0128 VS PASCAL Reference Manual SH23-0131 VS Language/Op. Syst. Interface Lib. Ref. Manual - SBOF-0106 SH23-0129 VS FORTRAN User's Guide SH23-0130 VS FORTRAN Reference Manual SH23-0131 VS Language/Op. Syst. Interface Lib. Ref. Manual Communications. - SC33-0630 X.25 Communications Support: User's Guide - SC33-0631 X.25 Communications Support: Programmer's Guide - SK2T-0291 IBM Token-Ring Network Adapter Tech. Ref. - SV21-8031 INmail/INnet/FTP - SV21-8032 3278/79 Emulation - SV21-8086 Using INmail/INnet/FTP/connect - SX23-0727 Communications Guide Quick Reference - SBOF-0107 SC23-2060 AIX/RT WHIP 1.1 Guide and Reference - SBOF-0131 Base PC Network Services - SBOF-0150 SNA Services Guide and Reference AIX 2.1 - SBOF-0151 Network-PLUS 3270 SNA User Guide - SBOF-0152 Network-PLUS 3270 BSC User Guide - SBOF-0153 Network-PLUS RJE SNA User Guide - SBOF-0154 Network-PLUS RJE BSC User Guide - SBOF-0155 Network-PLUS Programming Interface Manual - SBOF-0156 AIX Communications Guide - SBOF-1807 SC23-2005 Interface Program for use with TCP/IP AIX 2.2 - SBOF-1811 SC23-2009 SNA Services Guide and Reference AIX 2.2 - SBOF-1870 AIX/RT NFS User's Guide PC-AT Compatibility Services. - SC23-2042 AIX Access for DOS Users, Administrator's Guide - SC23-2041 AIX Access for DOS Users, User's Guide - SV21-8028 AT Coprocessor Services User's Guide - SV21-8029 AT Coprocessor Technical Reference - SBOF-0158 DOS Services Reference - SBOF-1813 SC23-2010 AT Simulator Guide and Reference P/N 27F4360 IBM 6192 Expansion Unit. - SA23-2600 Setup, Options Installation - SA23-2601 Hardware Maintenance and Services - SA23-2616 Technical Reference IBM 6156 Portable Disk. - SA23-2613 Hardware Maintenance and Services - SA23-2614 Setup, Options Installation, Tech Info Manual Plotters. - GA66-0500 IBM 6180 Color Plotter Guide to Operations - GA66-0501 IBM 6180 Color Plotter Programming Manual - SH23-0089 IBM 6184 Color Plotter Programming Manual - SH23-0090 IBM 6184 Color Plotter HW Maintenance & Service - SH23-0091 IBM 6184 Color Plotter Guide to Operations - SH23-0092 IBM 6186 Programming Manual - SH23-0093 IBM 6186 Guide to operations - SH23-0094 IBM 6186 Hardware, Maintenance and Service IBM 9332 Disks. - SA21-9532 Planning Manual - SA21-9533 Installation Manual - SA21-9534 Analyzing Problems Manual - SA21-9535 Reference Code Guide - SY31-0685 Service Guide Professional Graphics Series. - SV21-8058 Graphics Development Toolkit - SV21-8059 Plotting System Programmer's Guide - SV21-8060 Graphical File System Programmer/User's Guide - SV21-8061 Graphics Terminal Emulator User's Guide Personal graPHIGS. - SC33-8100 Introducing graPHIGS - SC33-8102 Understanding graPHIGS - SC33-8103 Writing Applications - SC33-8104 Subroutine Reference - SC33-8105 Messages and Error Codes - SC33-8106 Installing Personal graPHIGS - SC33-8107 Programmer's Pocket Reference - SC33-8109 Problem Diagnosis - SC33-8110 Technical Reference - SC33-8111 User's Guide for GKS Compatibility - SC33-8112 Subr. Ref. for GKS Compatibility - SC33-8113 Pocket Ref. for GKS Compatibility - SC33-8181 graPHIGS Systems - SC33-8182 graPHIGS User - SC33-8183 graPHIGS API Technical Reference - SC33-8184 Programmer Reference - SC33-8185 GKS Compatibility Opt. User - SC33-8186 GKS Compatibility Opt. Subr. Ref. IBM 5080/IBM 6150 Graphics System. - GA23-0132 Problem determination guide - GA23-0274 Operation - GA23-027? Information Reference Summary - GA23-2005 System operation - GA23-2007 Setup instructions - GA23-2012 Principles of Operation IBM 5081 Graphic Display. - GA23-1324 Problem determination - GA23-2001 Problem determination card - GA23-2007 Setup instructions - GA23-2008 Site planning and preparation - GA23-2009 Site planning and installation - GA23-2012 IBM 5080 Principles of operation - SY66-0103 IBM 5081-11 Maintenance Information ------------------------------ Q.18 - How to change the 4 Mb filesize limit in AIX/RT. Subject: File size limitation on AIX/RT I have seen LOTS of complaints that AIX/RT can't handle files over 4 Megabytes in size. The system install default standard ulimit on maximum user file size is 8192 blocks in 512 byte blocks, or 4194304 bytes. Changing the default ulimit is easily fixed by one of three methods: 1) Raise the indidual users account default ulimit by adding the filesize field to his password entry. The slash after the username is the size in BLOCKS to set the users ulimit. biguser:!:100:100:System Abuser/600000:/u/bigfilesys:/bin/sh This field is automatically added by the adduser command when the 'filesize' field is non-blank. This allows setting different filesize limits based on each users login environment. 2) Add the ulimit command to someplace in /etc/rc.include to increase the ulimit of all processes, including daemons. 3) Raise the entire default ulimit on a global basis. Edit /etc/environment file. Be careful, this is NOT a shell script. Only selected variable assignments are allowed here. Add the following: FILESIZE=#### Where #### is the maximum desired filesize in 512 byte blocks. Default value is 8192. NOTE: You must be at 2705 update level or later to be able to change the filesize limits via /etc/environment. Also for ulimit to work correctly for rsh, update 2705 must be installed. NFS 1.1 needs at least update 1110 or later to fix ulimit problems on remote machines. There is nothing that restricts a filesize on AIX/RT other than the max inode pointer (signed int (2 Gig)) OR the filesystem size. Since AIX/RT cannot create filesystems that span volumes (like AIX V3 for 6000's) that is your actual limit on filesize. However... Unfoortunately, there is a bug in VRM that will not let it address filesystems on SCSI disks larger than 1 Gig. Worse, due to the VRM bug, it will wrap the block pointer back to zero, destroying the minidisk partition table, *AND* the first filesystem on the drive. I have never had ESDI drives attached to an RT larger than the 310 Mb drive type so I am not sure if this limit is a problem for that driver. ------------------------------ Q.19 - How to install a system image from tape. Here is a 'quick' install setup I got from a IBM tip.. However, it does not seem complete to me... I guess that tape is restored from the install/maint diskette, without installing the initial set of 8 disks. Just VRM installed., and using the Install- maintence diskette, and selecting the tape drive as the install device. Note: This procedure assumes you have enough room in /tmp to hold the initial 8 diskette set. Use another temporary work filesystem of your choice for the step 1 area. HOWTO: Quick Install RT 6150 / 6151 1. Create an installable AIX 2.2.1 operating system tape. This is quicker to use than loading the 8 diskettes. cd /tmp restore -xvf /dev/fd0 >files.in .. load AIX 2.2.1 Base system program disks (PBEX8-PBEY5) sed 's/^Mx //' files.in > files.lst backup -ivf /dev/rmt0 -pY -C2000 -s4000 -d1000 Date: Mon, 25 Apr 94 15:23:44 BST This is useful if you are loading several systems; you can make an install tape, which is in backup format, from the installation diskettes. The commands are basically what bffcreate does; except that bffcreate cannot be used on the initial installation floppies. (In principle you could unpack backup format from floppy -> tape without using hard disk in the middle, but it's more than a 1/2 hour hack!) Note that the initial installation floppies or tape contain some configuration commands which are executed, and then deleted from the hard disk. I think these play with VRM. I've tried making a 'backup' format of a tailored system with extra software, and then using the above process. Some internal IBM notes seem to say it is possible, but it failed for me when I tried to clone a system. My guess is that since the extra configuration was not executed, the copy failed to work. It might work if you use the cvid command to make customised VRM disks, or if you copied the configuration commands from the base installation. It seems to work OK on a running system. So I have been cloning systems by loading VRM, loading base AIX 2.2.1 from tape, then restoring a copy of my fully configured system image. ==**==**==**==**==**==**==**==**==**==**==**==**==**==**==**==**==**== ------------------------------ Q.20 - How to control the "sound" of the keyboard. To control the speaker, use the command "sound": "sound -h" speaker volume high "sound -m" .. medium "sound -l" .. low "sound -o" all sound off (including clicking) To control the click, use the command "sound": "sound -c" keyclick on "sound -q" keyclick off ------------------------------ Q.21 - How to find the machine serial number. The serial number of the machine processor is unique and can be found with the command "uname -m". This number is kept in the ROS on the processor card. Changing the processor card, eg. upgrading to an APC, changes the serial number of your machine. This is NOT the serial number of the chassis. That serial number is located on the 6150 machines on the top of the case, as well as on the rating plate in the lower back inside next to the keyboard cable plug. ------------------------------ Q.22 - How to change which adapter will be the console device. If you have more than one display adapter installed, which display the system uses as the console is determined by the order in which the VRM lposts (loadable power on self test) are found. There is a file for each device. Most of them are in /vrm/ldlist/posts. The "mvmd" command (described under the command "installp"!) will allow you to specify which display comes up when you IPL your machine. The change will remain in effect until the VRM is reinstalled or modified by another mvmd command. Assume your goal is to have the IBM 5151 display come up as console, instead of the IBM 6155 display, do the following: - sign on as superuser - make sure you are NOT in the /vrm directory issue the following command: mvmd -m /vrm/ldlist/lpcmod.0000.00 -p /vrm/ldlist/posts When you IPL again, the IBM 5151 will come up as console. With a normal VRM installl, and both a 5154 (EGA) and a 6154 (advanced color) display in an RT, when AIX boots, the 5154 becomes the console. To cause the 6154 to be the default, do the following: (this is all one command line) mvmd -m /vrm/ldlist/posts/lapa8c.0000.00 \ -f /vrm/ldlist/posts/ldskt1.0000.00 Explanation: The RT PC looks at the /vrm/ldlist/posts directory to determine what display will be the console. Use: li -lSx /vrm/ldlist/posts | pg command to look at the directory. Somewhere in the list you will see the following entries: lapa8d.0000.00 (6153) llegam.0000.00 (5154) lapa8c.0000.00 (6154) lapa16.0000.00 (6155) The order of these entries determines the default display. The mvmd command changes this order. The -f(file) option of the mvmd command is used to specify the position in the directory list. The file specified with the -m option will be moved to a position following the file specified with the -f option. Use the "li -lSx /vrm/ldlist/posts | pg" command to view the order in which the displays will be chosen as the console display; then move the desired console display to the front of the list of displays. You can do this by finding the first display in the list, then noting which device is just above that display and using that device with the -f option of the mvmd command. For example, suppose the "li -lSx /vrm/ldlist/posts" command returned the following portion of the ldlist directory. lsound.0000.00 ldisk0.0000.00 ldisk1.0000.00 ldskt1.0000.00 lapa8d.0000.00 (6153) llegam.0000.00 (5154) lapa8c.0000.00 (6154) lapa16.0000.00 (6155) lmpel1.0000.00 (5081) : Then to make the megapel display the default console display, notice that the first display listed is lapa8d.0000.00 (6153). The device directly above that is ldskt1.0000.00, so the command would be: mvmd -m /vrm/ldlist/posts/lmpel1.0000.00 \ -f /vrm/ldlist/posts/ldskt1.0000.00 You must be a member of the system group or operating with superuser authority to run "mvmd". ------------------------------ Q.23 - How to find out which floating point unit is in use. An AIX command tells you which type of floating point card you have: fptype It returns 5 different values: software (0), FPA (1), 68881 (2), AFPA w/o DMA (4), and AFPA w/ DMA (12). In addition to the exit values, it prints a message to stdout. The information it returns is also available in Virtual Machine low memory location 0xcc. This byte of information is identical to the exit values of fptype. This program will print the value: main() { printf("0x%x\n", *(char *)0xcc); } ------------------------------ Q.24 - HFT virtual terminal tips and tricks. You must be at the console to be able to activate a new virtual terminal. Type "open xxx" and the system will open a new virtual terminal with the xxx Shell, where xxx stands for: sh ....... Bourne Shell csh ...... C Shell dos ...... DOS Shell actmngr .. Usability Shell xinit .... X-Windows To move forward from one virtual terminal to another, press the - keys together. To terminate a virtual terminal session, hit: -d, or exit that shell program. By default you can open up to 16 virtual terminals on the console. This can be changed by a kernel value in /etc/master: hftbuffers=16 at the expense of making the kernel larger. NOTE: If the user-profile contains /bin/sh as start-program, then you can log out from the /dev/console, even if you still have virtual terminals open. To avoid this, the program /bin/actman should be defined as start-program in the user-profile: the actman would then take over the control of the different opened virtual terminals. Example of such a user definition in the file /etc/passwd: "user::201:200::/u/user:/bin/actman". (The actman program is located on the Useability Services diskettes.) You can use a shell script to automate the opening of different virtual terminals on the console: PS1="shell#1 > "; export PS1 open sh PS1="shell#2 > "; export PS1 cd $HOME/dira open sh PS1="shell#3 > "; export PS1 cd $HOME/dirb open sh NOTE: You can use the 'display' command to change fonts on an individual virtual terminal with the -t flag. Each virtual terminal can have a different size font associated with it. This can also be done with colors as well, using the -f and -b flags to set the forground (text) and background colors on adapters with color capability. The IBM5151 (XT mono display), while it can be used as a console, and have virtual terminals like the other adapters, it cannot use different size fonts or colors due to the restrictions of the adapter. It CAN use blinking and underlined text, where the other adapters cannot. Note: The PF keys on the console keyboard can be pre-programmed. The 'defkey' command allows you to assign strings to the keys, save the definitions in a file and retrieve them. ------------------------------ Q.25 - How to determine how much real memory AIX has available. To find out the real memory size, use the crash command: $ crash > od meminbox this should give the real memory size in hex > q to quit The following C program detects which real memory cards are installed in the RT. It will give how much memory you have in the Slots C and D, and the value of the memory configuration register. #include #define EIGHT 0x4 #define FOUR 0x0 #define ONE 0x1 #define TWO 0x5 #define NONE 0x7 #define SLOTC 0x7 #define SLOTD 0x70 main() { char size, megsc, megsd; int busfd; if ( (busfd = open("/dev/bus",O_RDONLY)) < 0) { printf(" bus access failed.\n"); return 8; } size= (* (char *) 0xf0008c80); switch(size & SLOTC) { case EIGHT : megsc = 8; break; case FOUR : megsc = 4; break; case ONE : megsc = 1; break; case TWO : megsc = 2; break; case NONE : megsc = 0; break; } switch((size & SLOTD)>>4) { case EIGHT : megsd = 8; break; case FOUR : megsd = 4; break; case ONE : megsd = 1; break; case TWO : megsd = 2; break; case NONE : megsd = 0; break; } printf("Slot C has %d MB, slot D has %d MB\n", megsc, megsd); printf("Value of memory configuration register is 0x%x.\n", size); close (busfd); } ------------------------------ Q.26 - How to get reverse video on the 6153 display. You can get a 'temporary' video reverse (white characters on a black background) by issuing the command: echo "\033[7m". You can put this command into the user's .profile, the system's profile, or create a shell script (new command) to invoke it. Putting it in the user's profile means it will be video reversed for that user only; putting it in the system's profile means it will be video reversed for everyone. There is no way to change the whole screen since black on white is hard coded into the software. ------------------------------ Q.27 - /tmp is too small. If /tmp is temporarily too small, if you have space in another filesystem (/u for example) and use AIX version 2.1.1 or more recent, just create a directory in the other filesystem called "tmp" and issue: mount /u/tmp /tmp When you are through, issue: umount /tmp You have to be root for the mount and the umount. To enlarge the /tmp minidisk permently, use the following procedure: - Find the IODN of the /tmp minidisk (should be hd3 16388) - Boot with the installation/maintenance diskette. - select the maintenance option - Use option x to delete the minidisk specifying the IODN. - create a new, larger minidisk using the same IODN - make a filesystem on the new minidisk - exit and reboot normally ------------------------------ Q.28 - How to change the cursor type/shape. * On the IBM 3161 display, hit: - * On a native display, you can use the following shell script: echo "\033[x\000\000\000\014\002\010\004\000\000\000\000\00$1" Name it "kursor" and invoke it as kursor 0 - no cursor kursor 1 - single underline. kursor 2 - double underline (normal cursor). kursor 3 - lower half block cursor. kursor 4 - single line above the position. kursor 5 - Solid block. kursor 6 - Double line above cursor position Note: This script also works in aixterm X-windows. ------------------------------ Q.29 - How to copy diskettes with a single diskette drive. To copy a diskette on another diskette, use the following shell script: echo 'Looping single copy of a source diskette,' again="y" while expr "$again" = "y" >/dev/null do echo 'insert source diskette and press ctl-d to proceed' cat >/dev/null echo 'Reading...' dd if=/dev/rfd0 of=/tmp/diskcopy bs=122880 if expr "$?" |= 0 >/dev/null then echo "Input failed $?" exit fi echo 'Remove source diskette,' echo 'insert a new target diskette and press ctl-d to proceed' cat >/dev/null echo 'Writing...' dd if=/tmp/diskcopy of=/dev/rfd0 bs=122880 if expr "$?" |= 0 >/dev/null then echo "Output failed $?" continue fi echo 'Done!' echo 'Another copy (y/n)?' read again done rm /tmp/diskcopy exit If you have two diskette drives, this command will copy a 1.2 Meg diskette, regardless of its format, DOS or AIX. dd if=/dev/rfd0 of=/dev/rfd1 bs=122880 Note: The blocksize (bs) value is copying 8 double sided tracks at once: 8*15*2*512=122880. This is the maximum the floppy driver will handle at once, and is the most efficent for copy operations. Note: These copies will work, regardless of the format, DOS or AIX. NOTE: If the floppy is low density (360K) adjust the bs value and use the /dev/rfd0.9 device names. ------------------------------ Q.30 - How to copy a set of DOS files to a AIX filesystem. Note: A better set of DOS tools is the 'mtools' package. It is easily ported to AIX/RT. With mtools this becomes: "mcopy a:*.* ." Assuming you have a diskette containing DOS files to be read in an AIX filesystem, change to the target directory and use the following shell script (either interactively or from a stored script): #!/bin/sh for filename in `dosdir | fgrep -v "Free space"` do f=`echo $filename | tr '[A-Z]' '[a-z]'` echo "$filename \c" dosread -a $f $f done echo "\n\ndone!\.n" exit 0 Note: Capital letters in the filenames are converted to small. ------------------------------ Q.31 - How to run AIX/RT AIXwindows v2.1 and other X11 notes. *** IBM AIX/RT AIXwindows V2.1 is a X11R2 base, and if upgraded by the maintence update 1723 or later, is X11R3. *** Starting X-WINDOWS - Login as user (not root) - Open a shell and type: xinit or type directly: open xinit *** Using the mouse X-Windows was written to support a three button mouse. The IBM RT mouse is a two button mouse. The RT mouse buttons are defined as follows: LEFT = LEFT RIGHT = RIGHT CENTER = BOTH *** Stopping X-WINDOWS Press: -- This takes you back to the shell you opened. *** Remote execution You can run "aixterm" remotely: First type: "xhost +remote" Or... "xhost +" where: remote is the name of the remote machine The remote machine can now access your X server. A simple "+" allows all network hosts to attach X programs to your server. Then Start the remote shell with: "rexec remote aixterm local:0" where: local is the name of the local machine running this X server. If you want to enable this for the first instance of the X server on a default basis, create and edit the folowing file: /etc/X0.hosts This file is a simple ascii file with one line per host name allowed to contact this server on this host, or a plus (+) by itself allowing ALL hosts. This file will allow access to listed hosts for the "0"th instance of the X server. Other X programs on remote machines will know this server as "machinename:0". If you run another X server, at the same time on another virtual HFT terminal, it will be known as "machinename:1", ect.. This will require a /etc/X1.hosts file.. ect for the number of servers you have running. *** Running on a multi-display RT Use the "display" command to set the default device, for example, to the megapel; the virtual terminal that "xinit" opens will then appear on the megapel. Alternatively, use from the /dev/console: xinit -dd 5081 (to start on the megapel) xinit -dd 6155 (to start on the 6155) This avoids having the bother with the "display" default. You can edit this specification into your own copy of "xinit". You can have independent X servers running on each display adapter you have attached. Assume you have two displays, a megapel, and a 6155 display, and the megapel is your default console. login user open sh (to get a second virtual term on megapel) display -d advmono (the 6155 display) xinit (x server :0 starts on 6155) (input moves to the just started X server on the 6155) - (moves input back to /dev/console) - (moves input to /dev/hft/0 on megapel) display -d megapel (to point default back to megapel) xinit (new X server :1 starts on megepel) This procedure leaves /dev/console available for console error messages. ==**==**==**==**==**==**==**==**==**==**==**==**==**==**==**==**==**== Submitter: John F Carr (jfc@athena.mit.edu) Date: 18 Sep 89 06:21:54 GMT The X server on the IBM RT supports multiple screens (in fact, I have 3 in front of me right now). They can be placed in any order, but only horizontally. I've never felt any desire to have vertical stacking, since I don't stack my hardware. There are runtime options to identify the top and bottom edges of the screen (so that the cursor appears at the bottom after moving off the top), or the right and left edges of the extreme screens. If both options are selected the display is like a torus. There certainly should be an option to choose the order of the screens (due to limitations of desk space and cable length, the physical order of my screens is restricted, and I want the logical order to match). With the RT X server, the screens are assigned in the order they are listed on the command line. The server lacks a method of assigning numbers to screens independently of right-to-left order; this would be a good addition. The Xibm multi-screen support is unlikely to change much for R4; I haven't paid attention to any other servers. ==**==**==**==**==**==**==**==**==**==**==**==**==**==**==**==**==**== *** Mouse or Tablet AIXwindows can use a tablet connected to the pointing device port, instead of a mouse. However, the mouse and the tablet are not interchangeable without consequences: - the mouse is a RELATIVE input device - the tablet is an ABSOLUTE input device Applications that expect to 'warp' the pointer to a window, and have the user operate from that window, will not operate quite like expected. The pointer will 'snap' back to the tablet physical position of the puck on the tablet surface, when moved again. The physical position of the puck on the tablet surface will match the relative position of the cursor on the screen. If you use the stylus with the tablet, you will only have access to button one, by pressing on the pen point. If you have the four button puck for the tablet, all three buttons are available, and button four is ignored. *** NOTE: X-Windows does not run on an IBM 5081 display attached to an IBM 5085 control unit. You must attach the IBM 5081 display to the RT via a megapel adapter. The 5085 control unit CAN be used by the CADAM and CATIA software packages. ------------------------------ Q.32 - How to recreate a lost+found directory. In order for the fsck command to be able to rescue lost inodes and files, there must be a "lost+found" directory in the filesystem. You should be superuser, with the filesystem mounted, and issue a cd command to the mount point of the filesystem where you want to make lost+found. After it is created the directory must have permissions 755 and be owned by root, group system. Here is a shell script to re-create a lost "lost+found" directory: #!/bin/sh mkdir lost+found chmod 755 lost+found cd lost+found for i in a b c d e f g...x y z #fill in the letters do for j in a b c d e f g...x y z #ditto do echo > $i$j done done rm * Note: The files are created and then deleted in this directory to cause the directory to grow in size. This is necessary as the fsck command cannot expand this directory while working on a damaged filesystem. Files will from time to time be created here with the filename the same as the inode number when fsck detects a filesystem problem. If you are running out of space in a filesystem and cannot find out where the space is going, check out this directory and clean out the old files. ------------------------------ Q.33 - Minidisk tricks and traps. * Restore minidisks names To restore the names of the user minidisks after a reinstall or when moving a disk drive from one system to another, or somehow 'lost' a minidisk, use the command: mdrc -h hdisk# This command will read the minidisk partition tables on the specified drive and alter the /etc/system and /etc/filesystems to resolve conflicts. WARNING: This command will permanently alter the minidisk information on the referenced drive. Executing this command on a drive that has system minidisks on it (from another system) will render it unusable as a boot device again, as the minidisk names and IODN numbers will now no longer be correct. ------------------------------ Q.34 - How to make the backup command default to a longer tape. The parameter "backuplen" in the first stanza of /etc/filesystems is initialized for 300 feet tapes. Different cartridges have different lengths and number of available tracks. The value assigned to "backuplen" should be the length of the tape (in feet) times the number of tracks. Note: This value does NOT change the length when using tar or cpio. Recommendations for 6157-001: TAPE CARTRIDGE LENGTH TRACKS backuplen CAPACITY 3M DC 300A 300 feet 9 2700 29 MB 3M DC 300XLP 450 feet 9 4050 44 MB 3M DC 600A 600 feet 9 5400 59 MB Recommendations for 6157-002: TAPE CARTRIDGE LENGTH TRACKS backuplen CAPACITY 3M DC 600A 600 feet 15 9000 118 MB 3M DC 600XTD 600 feet 18 10800 142 MB 3M DC 6150 600 feet 18 10800 142 MB =============================================================================== *** FAQ Continued in AIX Porting notes Part 1 *** ===================== end of ibm-rt-faq/aix-v2/misc/part2 ===================== -- Posted around the first of each month to comp.sys.ibm.pc.rt, and to comp.unix.aix. This FAQ is dedicated to use of the AIX Version 2 operating system, running on the IBM RISC processor known as the RT. The RT is known also as an IBM model 6150 or 6151 machine. For AIX RT submissions E-mail to: aix-rt@antimatr.hou.tx.us For AOS RT submissions E-mail to: aos-rt@antimatr.hou.tx.us For MACH RT submissions E-mail to: mach-rt@antimatr.hou.tx.us For general Q&A submissions (hardware and other stuff) E-mail to: faq-rt@antimatr.hou.tx.us Other comments and correctons should be sent to the author: Mark Whetzel DOMAIN addr: markw@antimatr.hou.tx.us BANG address: ..!uhnix1!lobster!antimatr!markw Daytime work number 8AM-5PM M-F CST VOICE: (713) 963-2544 -- AIX..... NOT just another UNIX. (tm) Mark Whetzel | My own RT system.. My own thoughts.. DOMAIN: markw@antimatr.hou.tx.us | IBM RT/135 running AIX 2.2.1 UUCP ..!menudo!lobster!antimatr!markw | comp.sys.ibm.pc.rt FAQ maintainer.