Home

QNX 4.0 Administrator`s Guide

image

Contents

1. al SPSSSSSSSSSSSSSSSSSSSSsSsssgesgsssgseggsggggggsggggs Administrators Guide PPPDPIPDIIIIIIIIDIIIIIIIDIIIIIIINIIIIIIIIIIIDI EE QNX 4 0 Operating System Administrator s Guide Quantum Software Systems Ltd 175 Terrence Matthews Crescent Kanata Ontario K2M 1W8 Canada i 613 591 0931 Quantum Software Systems Ltd 1991 All rights reserved No part of this publication may be reproduced stored in a retrieval system or transmitted in any form or by any means electronic mechanical photocopying recording or otherwise without the prior written permission of Quantum Software Systems Ltd Although every precaution has been taken in the preparation of this book we assume no responsibility for any errors or omissions nor do we assume liability for damages resulting from the use of the information contained in this book This edition April 1991 QNX is a registered trademark of Quantum Software Systems Ltd UNIX is a registered trademark of AT amp T UNIX Software Acknowledgments and Copyrights The following utilities have been placed in the public domain by an individual or organization We have enhanced these utilities and hope you will find them helpful The full source code for these utilities along with additional notes and credits are available from our on line update and conferencing system QUICS cpio pax and tar developed by Mark H Colburn and sponsored by The USENIX Association f
2. E AO 31 3 313 3 3 3 3 3 31 3 3 3 Arcnet Arcnet network manager QNX Buildfile syntax Options Examples Description Administrator s Guide Arcnet i irg m mem i irq The interrupt line to use IRQ This option overrides automatic IRO detection m mem The memory segment to use This option overrides automatic memory detection Use automatic IRO and memory detection Arcnet Set the ONX Arcnet board to use IRO 3 Arcnet i 3 Set the ONX Arcnet board to use IRO 3 set its memory segment to be located at CEO0 hex Arcnet i 3 m CE00 The Arcnet network manager communicates directly with the ONX Arcnet network board It provides the low level services the Process Manager and Kernel reguire to support transparent networking If you want to use the network the Arcnet manager must be built into the operating system image You cannot start Arcnet in your sysinit file or at the command line The ONX Arcnet board uses an interrupt line IRO and 8K of memory The Arcnet manager should automatically determine these values as configured on the ONX Arcnet board The command line options are meant for cases where Arcnet is unable to automatically detect the interrupt or the memory segment Automatic IRO detection does not work on IRO 2 To use IRO 2 you must specify the i irg option If you experience any problems with the ONX Arcnet network remember to run the netinfo utility thi
3. a normal boot etc config sysinit node Tf this fails it tries etc config sysinit an alternate boot etc config altsysinit Tf this fails it tries etc config sysinit For any given node in the network a total of three potential files may be executed by sinit e sysinit node e altsysinit sysinit Each of these files serves a particular purpose This file contains the custom commands needed to set up the environment and services for your machine allowing every node in the network to have its own custom setup The node after the dot is replaced at runtime by sinit with the logical node number of your machine This is a value between 1 and the number of nodes in your network If your machine doesn t contain a network card node will be 1 This file is executed only if you boot from the local disk and specify an alternate boot by pressing lt Esc gt when you are prompted to do so just before the QNX loader loads the operating system image The altsysinit file should contain a backup of the last working copy of the sysinit node file for this machine It s there as a safety net in case you make a modification to your sysinit node file that leaves the system in a state where you can t log in Since many services are started in the system initialization file we recommend that you update this file after all successful changes to your node specific file Chapter 1 Installation 9 The system initialization file
4. netpoll N node i idle time n num polls p poll period N node i idle time n num polls p poll period The node on which to change the poll parameters The default is the node from which the utility is invoked The length of time in seconds that the system will allow a virtual circuit VC to remain idle before checking the VC s integrity default is 10 The integrity check consists of transmitting a network poll packet to the remote node The number of times that the system will transmit a network poll packet to a remote node before it concludes that the remote node is permanently unreachable default is 6 The length of time in seconds between checks for idle VCs default is 10 The following example 1 reduces to an average of 10 seconds the time allowed to detect a node disappearing poll period x num polls at the expense of increased CPU consumption 2 increases the freguency of the VC polling 3 decreases the maximum number of allowed polls netpoll p 2 i 2 n 5 The following example 1 increases to an average of 200 seconds the time allowed to detect a node disappearing poll period x num polls 2 decreases the freguency of the VC polling 3 increases the maximum number of allowed polls netpoll p 20 i 20 n 10 netpoll 177 netpoll display or change default polling parameters of a node QNX Description See also In QNX virtual circuits
5. e uses the PS 2 SCSI DMA controller to transfer data between the Adapter and the system memory e allocates maxsize x 512 bytes for a DMA buffer The Fsys ps2s driver makes its code and data available to the local Filesystem Manager Fsys which then invokes that code and data via direct calls Once Fsys has adopted this code and data Fsys ps2s terminates as a process This driver works only with the IBM PS 2 SCSI and not with the Adaptec SCSI controllers or any other SCSI controllers for the IBM PS 2 Fsysps2s 159 CLECCECELCECOCCOCOECECCOECCOEOCCOEECOCCOCOCOCOCOCCOCCCOECOCCOLOECE Fsys qic02 QIC 02 tape driver QNX Syntax Fsys gic02 L type a address d dma i interrupt m max_buffers n name E gt X type The type of QIC 02 unit where type can be one of archive tecmar internal tecmar external The default is archive a address The base address in hex of the controller default is 200 d dma The DMA channel to use default is 3 i Interrupt The interrupt level to use default is 5 m max _ buffers The maximum number of blocks that can be transferred to or from the tape controller default is 32 n name The name to associate with the device The default is tp which yields a device name of dev tpo Description Fsys qic02 is the driver for tape controllers conforming to the QIC 02 specification The Fsys qic02 driver makes its code and data available to the loc
6. sysinit Base level services Note that the altsysinit file is never used by a node that boots over the network In this case you can correct any problems in a modified sysinit node on the up and running boot server node This file is executed if a custom node specific system initialization file isn t present It should contain services that will work on any machine Quantum ships such a generic file we recommend that you make few or no modifications to this file For testing purposes you can boot a new machine over the network without creating a custom sysinit node file When the node boots it will use the default sysinit file Once you re satisfied that the machine is functional you can then create a node specific initialization file If you remove a network card or change the logical node number of a machine the machine won t find its old system initialization file which is keyed off its old node number In this case the machine will look for a new node specific file node 1 if the card was removed or if a new node number is to be used If the file is missing the machine will use the default sysinit file The contents of each machine s system initialization file reflects the hardware on that machine and the services you wish to provide The following describes a base set of services that will be in most initialization files The following lines define the time zone EST in this case and get the time from the realt
7. You may now treat the floppy as a QNX filesystem mounted as d0 QNX provides a driver for the QIC 02 interface standard This is a standard V4 inch cartridge tape that can hold from 60 to over 300 megabytes of data on a single tape To back up restore from a tape you must make sure the tape driver has been started This is described in Part II of this guide under Fsys gic02 For most people the following command line will start the driver which will then create a block special file for the tape Command line Created block special files Fsys gic02 dev tp0 The archive utilities will read and write directly to the tape s block special file You can t mount a filesystem on this type of block special file When the QIC 02 driver receives a request to read or write it does so by starting at the current tape position If you re starting a new backup you ll need to erase and rewind the tape A number of tape position and control functions are provided by the tape utility Chapter 6 Making Backups 73 Compression Removable disk Fixed disk 74 described in Part II of this guide For example the following command would erase then rewind the tape in preparation for an archiving procedure tape erase Removable hard disks are popular in both magnetic and optical formats The optical formats hold more data but they re slower Most units use a SCSI interface to the computer so you may want to consider making your
8. 9 2100 9 2100 3 1500 7 1900 2 1400 4 0800 Hours GMT 2 3 3 3 Daylight SavingTime Effective Period first and last day Apr 7 Oct 26 1991 Mar 31 Sep 28 1991 Mar 31 Oct 28 1991 Mar 24 Aug 31 1991 Mar 31 Sep 28 1991 Apr 19 Sep 26 1991 May 1 Oct 15 1991 A Arizona and parts of indiana do nat observe DST Province of Saskatchewan and certain Canadian cities remain on Standard Time all year Except Broken Hill N SW follows South Australia times Amapa Amazonas Para Rondania Roraima States of Brazil do not observe DST E Estimated Date Based On Previous Year Country Turks and Caicos Is Tuvalu Uganda United Arab Erratas Abu Dhabi Dubai Sharjah Ras A Khgiman Umed Kingdom U 5 A Eastern Timea Central Time usta except Aleutian Islands W 169 30 Aleutian Islands 169 30long W to Western rizonaa Hound ana U S Virgn Islas Mt US R Mogct time to 172 warm i Vanuatu Venezuela Vietnam Socialist Rep of Wake Is Wallis and Futuna Is Windward Islands Grenada St Lucia Yemen Republic of Yugoslavia Zaire Kinshasa Mbandaka Kasai K ivu Haut Zaire Shaba Zambia Zimbabwe Standard Time Hours Time at from 1200 hours GMT GMT 5 07 00 12 2359 3 1500 4 1600 GMT 12 00 5 07 00 6 06 00 7 0500 8 0400 9 0300 10 0200 7 05 00 10 02 00 5 07 00 4 08 00 3 0900 2 1500 4 1600
9. For example all of steve s jobs can be cancelled with the command lprm steve Chapter 4 Print Spooling 47 Configuring the spooler Controlling the print queues The 1pc utility is a system administration tool for managing the system spoolers It lets you perform many control functions such as shutting down and starting up a queue or a printer The following basic functions are provided e suspend resume enqueueing of jobs e suspend resume dequeueing of jobs e suspend resume the currently printing job e delete the current job e rearrange the jobs in a queue e move jobs to a different queue e display the status of queues Note that 1pc s functionality overlaps that of 1prm and 1pg This is for convenience since lpe may be used in an interactive mode Configuring the spooler Before any print spooling can occurin a QNX system you must run lpsrvr the print spool server lpsrvr When started the 1psrvr utility reads the usr spool 1p setup file to determine what resources it has available and how it is expected to manage them Note that you must create this file You can specify a different configuration file via lpsrvr s c command line option lpsrvr c usr spool lp custom The 1psrvr utility manages two primary objects queues and dequeues Queues are internal lists of data files that need to be printed Dequeues are the processes that actually print the data 48 Part Installation amp
10. The emu87 process traps 80287 and 80387 floating point instructions and emulates them through software By default the emulator will guietly terminate if you attempt to start it on a machine eguipped with floating point hardware You can force the emulator to remain active by using the option Note that the emu87 process is required if you wish to run programs that need floating point support on a computer that doesn t have an 80X87 floating point coprocessor To remove the emulator you use the slay utility slay emu87 Never attempt to start or stop the emulator while processes are actively using floating point emu87 137 M A CEES SES ES ES ES Bu Bu ES ESES ES ESES ER Eu Eu Eu ES DIDI PIII I En Eu En Eu 3333333339 DIY Syntax Description Administrator s Guide feat filename See the freeze utility fcat display compressed files QNX feat 139 ELECECEGTECGCECGGCICECEGECGCCGLGEELCELCCECCELECCE PIIIIIIIIIIIGIIIIIIIIIIIVIIIIIIIIIIIIIIIIIIVIIA Syntax Options Examples Description Administrator s Guide fdisk create QNX disk partition QNX fdisk p drive cmd p Pause before starting drive Disk drive to partition cmd An optional installation command which is one of e add slot QNX type ALL HALF QUARTER TENTH size e boot ONX ONX2 DOS 0S2 type slot e loader e show e query ONX ONX2 DOS 0S2 FREE TOTAL type slot where type i
11. Your goal now is to run the chkfsys utility on the disk to determine and possibly fix the filesystem But first you ll Chapter 8 Disk File Recovery 99 What to do if your system will no longer boot 100 If the mount fails need to create a mount point for a QNX filesystem Since the root already exists on a floppy or on a remote disk on the network you can mount the local hard disk partition with the name hd mount dev hd0t77 hd r Depending on the state of the QNX partition the mount may or may not fail If the mount fails the first portion of the QNX partition is probably damaged since Fsys will refuse to mount what it considers to be a corrupted filesystem In this case you can use the dinit utility to overlay sufficient good information onto the disk to satisfy Fsys dinit hr dev hd0t77 The r option tells dinit to rewrite e the root block e the bitmap with all blocks allocated e the constant portions of the root directory After doing this you will need to rebuild the bitmap with chkfsys even on a good partition You should now be able to reissue the mount command and once again try to create a mount point for a QNX filesystem called hd Step 6 Run chkfsys At least a portion of your QNX filesystem should now be accessible You can use chkfsys to examine the filesystem and recover as much data as possible If you booted you enter this command from floppy hd bin chkfsys d
12. completed mail username ab echo job on na aborted mail username 1p3 dv 3 dev serl ok echo file fname printed ok mail username ab echo file fname aborted mail username 54 Partl Installation amp Configuration ONX Operating System IE ee 2804802 23333 3 333332333333 3 3 3 3 III I III II 33 III II Configuring the spooler Administrator s Guide The above configuration uses the same three logical printers described earlier txt ps and gif These logical printers however now feed three physical printers The server selects a free printer from the set of degueues 1p1 1p2 1p3 The job will be dispatched on the first available printer and the printers will be examined for availability in the order they are specified in the configuration In this example when a job completes normally a mail message indicating success is sent to the submitter When a job completes abnormally a mail message indicating failure is sent to the submitter Chapter 4 Print Spooling 55 CEEECCOCECOCOCCECCECECOCOCCECOCOCCOCCCECECCCECEOCOCOLCECOCCEL 33333 3333333I33 3 3 3 3 3 33 3 333 3 333333 3 3 3 333 3 Chapter 5 Setting up a Second Filesystem In this Chapter Partitioning the pathname space Setting up a DOS filesystem Administrators Guide Chapter 5 Setting up a Second Filesystem 57 Partitioning the pathname space 58 A hard disk and a floppy Intr
13. dev hd0t77 Part I Installation amp Configuration QNX Operating System 3333 333 3333 3 3 331 33 3311 331113 33 1133131 31 3 33331 1J3333333333J3 3 3 3 33 3 3333 33 3 3333333 3 33 33333 When to run chkfsys Using chk sys in a live system Administrator s Guide Disk recovery procedures The utility will scan the entire disk partition from the root down building an internal copy of the bitmap and verifying the consistency of all files and directories it finds in the process When it has finished processing all files chkfsys will compare the internal bitmap to the bitmap on the disk If they match chk sys is finished If any discrepancies are found chkfsys will upon your approval rewrite the bitmap with data consistent with the files it was able to find and verify In addition to verifying block allocation bitmap chk sys attempts to fix any problems it finds during the scan For example chkfsys can e unbusy files that were written during a crash e fix the file size in a directory entry to match the real data It s a good idea to run chkfsys as part of your regularly scheduled maintenance procedures this lets you verify that the data on your disk is intact It s especially important to run chkfsys after a system crash so that you can identify those files if any that have been damaged If you zap any files for any reason possibly because chkfsys suggested you do so you ll need to run ch
14. etc config sysinit It s usually a good idea to keep the sysinit file generic and create custom sysinit node files for each node as required The altsysinit file is usually a backup of the sysinit node file for the node that boots from its own hard disk sinit 189 sinit system initialization ONX Whenever you wish to get your files from another node remote file server you use the r root option If you boot from hard disk and you get your files from your local hard disk you don t need to specify this option You can override the default search for sysinit node or altsysinit by specifying an explicit filename with the i initfile option The default shell invoked by sinit is bin sh To override this default you use the s shell option You should specify a complete pathname for the shell starting with a slash You can cause sinit to create an environment variable using the var value operand These environment variables will be inherited by the system initialization shell The time zone variable TZ is often set here The sinit utility always terminates it doesn t stay resident in the system If you wish to start up user sessions you should use the terminal initialization utility tinit and place it in the appropriate sysinit file See also buildgnx Utilities Reference tinit 190 Part II Managers Drivers amp Utilities QNX Operating System 33333 9399393939939 139 39 3 3 I 3 I 1 I I I I 2 I 3
15. from the QNX boot floppy that was used to install your system onto the hard disk The filesystem will already be running in this case If you have a network to boot over try booting your machine over the network Once the machine is booted you ll need to start up a local filesystem Fsys amp Start the hard disk driver You now have to start the appropriate hard disk driver For example to start a disk connected to a standard Western Digital compatible controller you would type Fsys wd This should create a block special file called dev hdo that represents the entire hard disk Run fdisk Running the fdisk utility will immediately give you useful information about the state of your hard disk The fdisk utility might report one of several types of problems Error reading block 1 Probable cause If fdisk reports an error trying to read the partition block which is the first physical block on the disk then chances are that either the disk controller has failed or the hard disk has failed Remedy If the disk is good replacing the controller card might allow you to continue using the disk Otherwise you have little option but to replace the hard drive reinstall QNX and restore your files from backup 98 Parti Installation amp Configuration QNX Operating System 1333 1333333 3313 333333 3333 3333 3 33313 13 3313 3333333333033 3 33 03 3333333333 303 3 33 III III I Step 4 Step 5 Administrato
16. no new open requests will be accepted and the server will terminate once all active files i e files that are still open are closed If you don t specify i or x Dosfsys will start up and try to adopt the specified drives 134 Part Il Managers Drivers 8 Utilities QNX Operating System 1J313 33333313 33333 23133333 331313 3 3313133 3 1 3 313 3 3 3333 133 133 II 3 I I 3 3 I 1 I II 3 3 13 3 3 3 31 3 3 3 3 3 313 3 3 3 Dosfsys DOS filesystem manager QNX Exit status See also Administrator s Guide If an error occurs at startup Dosfsys displays an appropriate error message then exits with one of the following exit codes NO ON OA U PWN gt 11 Fsys Exit due to signal Can t register name Can t create proxy Can t register drive prefix Can t set up timer Invalid command line option s Error mounting drive Not enough memory for buffers Invalid drive specifier No drive specified on the command line Dosfsys must start up in background Utilities Reference textto Dosfsys 135 LEELCELELCELECELELOEECEECOCOECCEEELCELLCLEL EL ELE EEE Ce I33 3 3 3 3 3 I I BB EI DB II BI I VIII DIDDY Syntax Options Examples Description Administrator s Guide emu87 80x87 floating point emulator QNX emu87 f Force the emulator to remain even if floating point hardware is present Start the floating point emulator emu87
17. see also serial devices privileges giving to another user 20 non privileged users performing privileged functions 22 processes group ID changing 21 Q Quantum update system see QUICS Quantum phoning see QUICS querying printjobs 47 queues 48 feeding a single dequeue 49 52 file where defined 50 see also print spooling QUICS conferencing system 107 email 106 free software 106 hardware 107 logging in 109 phoning Quantum 108 refresh policy 106 reporting bugs 106 using 110 R Rambo mode chkfsys 95 raw disks browsing 94 QNX Operating System 133333333333 13333333 33213 3313 333333 3 3 333 33 gt 23 LED Bu ES EB ES E5 55 ES ES Eu aS IIa 1 EE 3 Jai LES ES ES ES ES E AE J realtime clock getting time from 10 see also time zones recovering deleted files 96 disks 85 103 files 85 103 lost file and directories 101 103 lost found directory 102 see also file maintenance utilities refresh policy 106 removable disks backing up to or restoring from 74 see also disks resources accessing 20 controlling access to 21 distributing throughout LAN 46 restricting access toagroup 22 root block 87 root directory contents 88 RS 232 cabling assignments 33 flow control between terminal andmodem 35 serial protocol 34 session control 34 signalnames 33 transmitted characters 34 see also serial devices S security 20 24 serial adapters multi port 32 single port 32 typical installati
18. use null modem if necessary Check hardware settings and verify correct parameters to Dev ser Change interrupt on adapter card Check hardware interrupts and Dev ser startup parameters make sure that two serial adapters are not using the same IRQ Determine the type of flow control supported by the device and enable with stty ihflow ohflow isflow and osflow Reduce baud rates and or increase stop bits if only received data is lost specify larger input buffer to Dev ser I option Make sure cable is well grounded and not too long also verify that all RS 232 wires in the cable are connected Chapter 3 Connecting Terminals Printers 8 Modems 43 FEECEELELCELCECEEEC LEE CECCECECLE CECIL BE En ER Eu Bu Bu En Bu En Eu Bu a Eu En Eu Eu Eu Eu En Eu Eu Bu Eu En En Bu Eu Zu Eu En Bu En Eu Eu Eu Eu Administrator s Guide Chapter 4 Print Spooling In this Chapter Sharing devices in a network Print spooling Configuring the spooler Chapter 4 Print Spooling 45 Print spooling Sharing devices in a network QNX encourages the distribution of resources throughout a local area network with few artificial boundaries Every device disk modem or printer connected to any computer is by default a shared resource Any program running on any computer has equal access to all of these devices whether they are connected to the same computer local or not remote This transparent sharing of resources is a mi
19. username Login name of user haspw If empty user has no password otherwise a password exists in the etc shadow file userid Numeric user ID group Numeric group ID comment Free form comment field must not contain homedir Home directory of this user default is shell Initial shell and arguments to start from login default is bin sh Chapter 2 Setting up User Accounts 23 Security 24 etc group etc shadow The etc group file contains lines in the following format groupname reserved group member member where groupname The name of the group reserved Reserved for later use group Numeric ID of the group member A list of usernames that belong to this group The etc shadow file contains lines in the following format userid password reserved reserved reserved where userid The name of this user password The encrypted password of this user reserved The first three numeric fields are reserved for password aging for now they are always 0 You may notice from the above permission list that etc passwd is readable by anyone This is to provide standard utilities with a simple mechanism to find information about users Since this file is readable the encrypted password isn t stored within it The encrypted password is stored in the etc shadow file which is readable only by the superuser This is to inhibit unauthorized attempts to decrypt the passwords by malevolent us
20. utilities let you span media your only concern will be having to feed several floppy diskettes into the drive If you have to deal with more than four or five floppies this will make the procedure unpleasant enough that backups may occur less frequently You might want to consider compressing your data as described below In order to back up restore from a floppy diskette you must make sure the floppy driver has been started This is described in Part II Managers Drivers amp Utilities under Fsys floppy For most people the following command line will start the driver assuming that Fsys is already running which will then create a block special file for each floppy Part Installation amp Configuration QNX Operating System 3333793933 3 93 03 3 33 IVI VIIIVFIV III 1 33 9 I II 93 93 93 939 3 3 93 33 3 33 3 3 33 93 DI I BI I I 33 3 3 3 3 1333 Tape Administrator s Guide Backup media Command line Block special files Fsys floppy dev d0 floppy drive A dev fd1 floppy drive B If you use an archive utility for your backups it will read and write directly to the floppy block special file If you elect to use the cp utility you ll have to mount a filesystem on the block special device For example mount dev fd0 d0 Remember to format and initialize new floppies The following example would initialize a high density 51 4 floppy diskette fdformat dev fd0 s 1 2m dinit dev fd0
21. 3 1500 Saudi Arabia 3 1500 Faikland Islands Senegal GMT 1200 Port 4 0800 3 Sep 9 1990E Apr 20 1991 Seychelles 4 16 00 Faroe Island GMT 1200 1 Mar 31 Sep 28 1991 Sierra Leone GMT 1200 Fij 12 2359 Singapore 8 20 00 Finland 2 1400 3 Mar 31 Sep 28 1991 Solomon Istands Excluding Bougainville Is 11 2300 France 1 1300 2 Mar 31 Sep 28 1991 3 1500 French Guiana 3 09 00 oui Arica 2 1400 French Potynesia Spain Is 9 0300 Canary Is GMT 12 00 1 Mar 31 Sep 28 1991 Is 912 0230 Continental Balearic and Mallorca Islands 1 1300 2 Mar 31 Sep 28 1991 Society Is Tubuai Is Tuamotu Is Tahiti 10 02 00 Melilla 1 1300 2 Mar 31 Sep 28 1991 1 1300 Sri Lanka 512 1730 GMT 1200 St Helena GMT 1200 Germany Federal Rep Of 1 1300 2 Mar 31 Sep 28 1991 Sudan 2 1400 Ghana GMT 1200 Suriname Republic Of 3 0900 Gibraltar 1 1300 2 Mar 31 Sep 28 1991 Swaziland 2 1400 Greece 2 1400 3 Mar 31 Sep 28 1991 Sweden 1 1300 2 Mar 31 Sep 28 1991 arca and W Coast 3 0900 2 Mar 30 Sep 28 1991 pena 2 1300 V Meese ia iD Angmagssalik lar 28 ria 1 1 Sep 29 1991 Eastoreeniand GMT 1200 1 Mar 30 Sep 28 1991 Taiwan 8 2000 ea s Seo psbysund 1 1100 GMT Mar 30 Sep 28 1991 Tanzania 3 1500 Gusdetupe incl Si Bahao z ow 3 Mar 30 Sep 28 1991 Trend PSR 1900 Y 1200 Northern St Martin Tonga 13 0100 Guam 10 2200 Trinidad and Tobago 4 0800 Guatemala 6 06 00 5 M
22. 3 3 3 3 3 3 3 3 3 3 3 3 3 VIB L PUPP VIVID IY Serial devices Terminals Configuring terminals for users Simple example Administrators Guide Terminals operate with or without flow control and at a fixed baud rate Unlike printers terminals can usually keep up with the host computer at a supported baud rate Thus a simple three wire cable is usually sufficient although you can still use a nine wire cable Like the host computer terminals are normally configured as DTE devices so a null modem cable is usually required Null modem cable Terminal Cabling assignments for linking a computer to a terminal QNX can be used as a full function time sharing system Many users can be connected to some or all of the computers in a QNX network via hardwired terminals or through modem links to terminals at remote sites Assuming that the terminal modem is properly configured you ll also need to provide a mechanism for users to log in to the system Assume a terminal properly connected and configured on the serial port dev ser1 The simplest way of allowing a user sitting at that terminal to log in is to use this command ontty dev serl login Chapter 3 Connecting Terminals Printers amp Modems 39 Serial devices Automated login Launching custom applications Dial up access The user will be able to log in and execute commands However once logged off i e once the us
23. 3 3 3 1 9 3 3 3 9 31 r 33 9 9 93 33331 3 333 3 3 3 3 3 33 3 3 3 3 33 3 3 3 3333 Administrator s Guide Configuring the spooler ab string Executed when dequeue abandons command for any reason af string accounting file that the queue uses ci string copy in command to place the job on the queue co string copy out command used by the dequeue de string despooler associated with this queue or name of device dv string device that the dequeue uses mn numeric minimum number of jobs for queue before flushing mxitnumeric maximum number of jobs the queue will hold na string name a string that describes the queue or dequeue ok string Command executed when degueue completes normally pr numeric priority to run this queue at 1 100 100 is the highest sp string spooler registered name for this queue waf numeric wait this number of seconds before despooling each job qn string After despooling enqueue job on this queue The following defaults are used if their corresponding attributes aren t specified ab af ci co de dv mn mx na pr ok sp wa qn nil no command is executed accounting isn t performed note that lpsrvr logging is unaffected binary copy in of file no transformation applied binary copy out of file no transformation applied output is sent to standard output of lpsrvr output is sent to standard output of lpsrvr 0 jobs are despooled as soon as possible no limit queue limits are based
24. 50 serving the same queue 49 see also print spooling device drivers Dev con 30 Dev par 30 Dev ser 30 31 starting 30 see also system initialization file QNX Operating System 3333330313330 PF TEEPE TEPPER T PT Peeves ysis 3333 I II I I III I IIINIH 3331 irene 3139393 3 t I PVP Device Manager starting 10 30 devices see parallel devices see also serial devices dinit utility 93 directories access fields 22 directory entries 89 links 90 lost found directory 102 recovering if lost 101 103 removing without returning used blocks 94 root directory 88 structure 89 structure checking 93 disk images 80 see also images disk partitions 87 see also partitions diskless workstations booting over the network 82 disks backing up to orrestoring from 72 74 bad blocks recovering 97 browsing 94 maintenance utilities 93 patching minor problems 94 recovering 85 103 recovery procedures 94 96 structure 86 92 DOS attribute bits 65 disks accessing via ONX programs and utilities 61 filesystems setting up 61 67 invalid filename characters 65 invalid filenames 65 partition types 64 Administrators Guide Index text files structure of 64 Dosfsys filesystem manager 61 actions performed when started 62 binary files 64 DOS to QNX permission bit translations 66 DOS version support 63 DOS QNX permission mapping 65 error codes 66 file ownership 66 invocation modes 61 name adoption 62 QNX to DOS attribute b
25. 73 backup utilities see archive utilities backups compressing data 74 when to back up 70 see also archives Index 207 Index baud rate specifying 36 bitmap blocks 88 blocks bad block recovering from middle of file 97 examining 97 extent blocks 91 booting boot server selecting 5 diskless workstation 5 82 from floppy 4 from hard disk 4 7 10 from hard disk processes required 80 initial boot 8 netboot configuration file 6 over a network 5 7 system doesn t boot 97 100 without creating a system initialization file 7 bugs reporting 106 build file constructing 78 83 buildanx utility 78 C cancelling print jobs 47 chkfsysutility 93 Rambo mode 96 using 94 using in a live system 95 whento run 95 clock starting 13 communication sessions 34 compressed data recovering 74 compression utilities 74 conferencing system 107 see QUICS 208 index connecting serial devices 36 see also serial devices console driver starting 10 30 consoles starting login 11 coordinated universal time see time zones UTC cpio utility 71 cron server selecting a machine as 12 current process changing group ID of 21 custom operating system images see images D data bits 35 compression 74 slowing down transmission of 35 date establishing 14 see also time zones daylight savings time changing to or from 201 202 time zone defining 202 see also time zones deleted files recovering 96 dequeues 48 file where defined
26. Administrator s Guide accompanies the QNX operating system release 4 0 and is intended to show system administrators how to install and configure a QNX system The Administrator s Guide contains two main parts e Installation amp Configuration a detailed look at installing configuring and maintaining your system e Managers Drivers amp Utilities a man page for each arranged alphabetically Throughout this guide we assume that as the system administrator you have superuser privileges which you acquire by logging in using the root login account About this Guide VW Conventions for technical terms vi About this Guide Conventions for technical terms Throughout this manual we use certain typographical conventions to distinguish technical terms In general the conventions we use conform to those found in IEEE POSIX publications The following table summarizes our conventions Reference command names data types environment variables error numbers filenames functions function arguments global externals headers options option arguments operands parameters symbolic constants Example ls long PATH EINTR dev tty system argl errno lt sys stat h gt C w width file name lt directory pathname gt POSIX VDISABLE QNX Operating System 3333333332303 2 313 9 3 III II II 1 1 3 1 1 1 1 III III 313 I 3 dB BJ II 3 DB 3 3 3 3 3 33 3 1 1 3 3 3 331 I II I
27. Chapter 6 Making Backups 69 Backup formats Introduction This section deals with making a copy of your data to guard against hardware software or human error that may destroy the original If your data is important to you you should regularly perform a set of backup procedures that would allow you to restore lost data with minimal cost to you in time and money Remember hard disks do fail and people do make mistakes It s too late to start a backup after your data is gone You can back up an entire filesystem or only portions of it Users may elect to back up their own files only usually to floppy diskette To back up large portions of the filesystem with files owned by many users you ll need to have read permissions on these files The superuser root login account has such privileges When to back up You should back up often enough so that you can recover data that is still current or can be made current with minimal work In a software development group this may range from a day to a week Each day of out of date backup will generally cost you a day of redevelopment If you re saving financial or point of sale data then daily or even twice daily backups are common Backup formats QNX supports a variety of backup formats that can be classified into two groups e archives e regular filesystems An archive consists of one or more files merged into a single unit with its own directory of contents This single unit
28. Configuration QNX Operating System 133 311133313 3 333 3 3 3333 3 33 331 31 331 1 331317333 3133 333 3 3 33 3 3 1 II dB 3 3 3 I 3 3 3 3 3 3 i J 3 3 3 I Administrator s Guide Configuring the spooler You can specify a program to run that will serve as a filter to control how data is copied in to a gueue and another filter to control how data is to be copied out of a queue and into a dequeue The following diagram illustrates the internal flow of data within the print spooler Queue Input Incoming Output Outgoing name filter queue filter process 2 CI Fitter name CI Fitter Queue ame CI Filter Jobs are submitted via 1p into one of the queues based on a symbolic name If the symbolic name isn t specified when a job is submitted the first entry in the configuration file will be used as the default gueue A degueue will process data from a gueue based upon priority then upon time of job submission Multiple gueues may feed a single degueue in which case the degueue will select the appropriate job from all the jobs in those gueues Multiple degueues may serve the same gueue In this case the spooler will select a degueue based upon availability Chapter 4 Print Spooling 49 Configuring the spooler Spool configuration file 50 When started the spooler accesses a file to get its configuration information If no file is
29. II III II III Id Contents Part I Chapter 1 Chapter 2 Administrator s Guide Installation 8 Configuration Installation 3 Installing ONX on a hard disk 4 Booting ONX over a network 5 The system initialization file 8 Initial boot 8 Base level services 10 Optional services 12 Setting your time zone 13 Establishing the time zone 13 Getting the date and time from the realtime clock 14 Licensing 15 Operating system licensing 15 Application licensing 16 Expanding your license 17 Setting up User Accounts 19 Security 20 Access control utilities 20 User and group IDs 21 The password database 23 Default password files 25 Accounting file 25 Contents vii Contents Chapter 3 Chapter 4 Chapter 5 viii Contents Connecting Terminals Printers 8 Modems 29 Starting device drivers 30 Parallel devices 30 Single parallel port 30 Multiple parallel ports 30 Output buffers 31 Serial devices 31 Hardware adapters 31 The RS 232 serial protocol 33 Configuring serial ports 35 Connecting serial devices 36 Configuring terminals for users 39 Troubleshooting serial device problems 42 Print Spooling 45 Sharing devices in a network 46 Print spooling 46 Submitting print jobs 47 Querying print jobs 47 Cancelling print jobs 47 Controlling the print queues 48 Configuring the spooler 48 Spool configuration file 50 Setting up a Second Filesystem 57 Introduction 58 Partitioning the pathname space 58 A hard disk and a floppy 58
30. INTEL 8237 DMA controller and some extra control hardware defined by IBM for the PC Since these controllers use the 8237 DMA controller to transfer data between memory and the device the driver will attempt to allocate up to maxsize x 512 bytes upon startup Ideally maxsize should be the number of sectors in a cylinder allowing the driver to read an entire cylinder in a single reguest The default is 36 which is the number of sectors in a cylinder on a 1 44M drive The Fsys floppy driver makes its code and data available to the local Filesystem Manager Fsys which then invokes that code and data via direct calls Once Fsys has adopted this code and data Fsys floppy terminates as a process This driver is sensitive to the drive type specified in the non volatile setup information in AT and PS 2 computers Specifying the wrong type of drive during this setup might result in sporadic errors Fsys floppy 153 Fsys floppy floppy disk controller QNX gt The driver recognizes and mounts the proper parameters for diskettes from QNX 4 0 QNX 2 1 and several versions of DOS If you need to specify additional parameters to the driver you use the gnx_ioctl C function See also Fsys other Fsys drivers Caveats You can specify the controller address via option a but your floppy disk controller hardware must match the IBM specification which involves more than the NEC 765 FDC 154 Part Il Managers Drive
31. Setting the heap size Selecting processes for an image Administrator s Guide Constructing a build file bin Fsys 0 Fsys x 2 When an image is created for a process space is reserved in the image s data segment for local memory allocation If this space is set too small the system will have to dynamically grow the data segment at runtime which can result in minor memory fragmentation If the space is set too large you ll end up wasting memory For more information on setting appropriate heap sizes see the documentation on Proc in Part II Managers Drivers amp Utilities The processes you include in an operating system image are determined by several factors You can typically group images into three classifications e images that boot from disk e images that boot over the network e images for embedded systems For images that boot from disk or over the network you can start most processes after booting You do so by placing their command line in the system initialization file that ONX executes after boot see the section System initialization file in Chapter 1 This lets you keep the boot image small and simple When you re building an image remember that there are two reguired processes e the Process Manager Microkernel boot sys Proc e the system shared library boot sys Slib If you want to use the QNX network you ll also need to include the Network Manager bin Arcnet Chapter 7 Building
32. Two hard disks same node 59 Two or more QNX partitions 59 Local and remote hard disks 59 Setting up a DOS filesystem 61 Invocation modes 61 Starting Dosfsys 62 QNX Operating System VPUPIIIPVIPIDIP II III III ITI I DD III I I I I I a I I I 3 13 3 3 3 3 LES E ES DS SS FS ES I III I 11 I I III IB III BEI 3133131 Contents Chapter 6 Chapter 7 Administrator s Guide Dosfsys name adoption 62 DOS devices 62 DOS version support 63 DOS partition types 64 DOS text files 64 DOS binary files 64 ONX to DOS character and name mapping 65 DOS volume labels 65 DOS QNX permission mapping 65 File ownership 66 Error codes returned by Dosfsys 66 Making Backups 69 Introduction 70 When to backup 70 Backup formats 70 Archive backups 71 Filesystem backups 72 Backup media 72 Floppy 72 Tape 73 Removable disk 74 Fixed disk 74 Compression 74 Archive examples 75 Compressed floppy archive 75 UNIX compatible floppy archive 75 Tape archive 75 Cartridge optical 76 Building a Custom Operating System Image 77 Introduction 78 Constructing a build file 78 Setting the heap size 79 Contents ix Contents Chapter 8 x Contents Building a Custom Operating System Image cont d Selecting processes for animage 79 Disk images 80 The Makefile 80 Copying an image to boot 81 Network images 82 Embedded images 83 Disk amp File Recovery 85 Introduction 86 Overview of QNX 4 disk structure 86 Partition components 87 Di
33. VCs provide transparent detached interprocess communication between processes residing on two different nodes in a network If a node abruptly powers down or if it can no longer be communicated with the resources associated with the VCs to that node should be recovered Each node polls its own VCs checking their integrity The netpoll utility lets you view or change the default polling parameters of a specific node To display the polling parameters for a node don t specify any parameters if the node is remote specify only the N node option netboot netnode Utilities Reference netinfo 178 Part Il Managers Drivers 8 Utilities QNX Operating System aa BU BB BB Ba BD I I ID I DB BI DB BD ID I I DB I BB U 3 3 3 3 33 3 3 33 3 3 3 3 3 3 3 3 3 3 3 31 39 3 III IIIa baa Syntax Options Administrators Guide pax portable archive interchange POSIX List archive contents pax cimopuvy archive s replstr t device pattern Read an archive pax r cimnopuvy f archive s replstr t device pattern Write an archive pax w adimuvy b blocking archive s replstr t device x format pathname Copy files pax rw ilmopuvy s replstr pathname directory a Append the files specified by pathname to the specified archive b blocking Block the output at blocking bytes per write to the archive file A k suffix multiplies block
34. a keyboard But you can start it from the system initialization file You should start the Device Manager and console driver right after setting the date as the next two commands in the file You then execute the shell command reopen dev conl which causes the shell to reopen its standard input and standard output Note the last command tinit which starts up user logins on two consoles Let s say the above build file is in boot build test You could build an image with the make utility using the following buildgnx 119 buildqnx build a custom version of QNX QNX Exit status cd boot make b test An image called test is placed in the boot images file To make this image bootable from a hard disk copy it to the boot file in the root directory of the hard disk Before copying the file you may wish to make a copy of the existing boot image in case you made a mistake in your build file by copying the existing boot to altboot as follows ep boot altboot cp boot images test boot We have provided a Makefile and a few standard build files in the boot directory that you can use as models make b hard d driver_name hard disk image make b ws workstation image 0 Successful gt 0 An error occurred See also netboot sinit Utilities Reference tinit 120 Part Il Managers Drivers 8 Utilities ONX Operating System 32333 3933 9 33 33 3 33 3 3 3 3 3 3 3 3a 33 a Da 3 3 BB JB 3 3
35. application diskette contains a serial number license for one node or for one use The following example transfers the license from floppy drive 0 drive A in DOS terminology to your hard disk Note that the floppy driver Fsys floppy must be running license dev fd0 You can list the serial numbers you own by doing an 1s of the etc licenses directory After adding new serial numbers to your set of licenses you must reboot before they will take effect Any machines that boot over the network will inherit the serial numbers from the machine they boot from If you wish to boot networked machines from their local hard disk you must use the license utility to add serial numbers to each hard disk you wish to boot from Once you have done this on a single hard disk you can use license to install the serial numbers across the network from one hard disk to another and thus avoid having to re insert floppies For more information on the license utility see Part II Managers Drivers amp Utilities Chapter 1 Installation 17 M LE EEK 3 33 31 3 3 3 3 10 33 33 3 3 3 3 3 3 3 3 1 3 33 3333 3 3 3 I Chapter 2 Setting up User Accounts In this Chapter Security Accounting file Administrator s Guide Chapter 2 Setting up User Accounts 19 Security Access control utilities The login utility The su utility The passwd utility Security QNX provides mechanisms to control access
36. be available in this operating system image default is 300 Administrator s Guide Proc 185 Proc Process Manager QNX n P r t v num names The maximum number of names that can be registered locally by the gnx name attach function default is 30 num procs The total number of real processes virtual circuits and proxies that can exist at any time default is 150 prefix len The size of the system prefix space default is 400 characters num sessions The maximum number of sessions that will be supported default is 32 num timers The number of timers that will be supported default is 40 per system These timers are allocated to processes with the mktimer function and returned with the reltimer function level Set the verbosity level 0 to 2 default is 1 Messages are always displayed on the console in the form ONX level Message The messages should be interpreted as follows Level 0 An internal inconsistency was detected Contact Quantum Level 1 The Kernel was forced to take a planned but uncommon recovery action Level 2 Expected actions have occurred as a result of a misbehaving process or remote computer 186 Partll Managers Drivers amp Utilities QNX Operating System 3133 33 3 3333133 313 3 3 3131 33 3 31 1 3 33131 31331313 1333333333333 POPPER D32323 3333 J Proc Process Manager QNX Description Administr
37. by creating an empty etc acclog file To enable accounting you create an empty etc acclog file You can do this using the touch utility touch etc acclog chmod g 0 etc acclog Once this file is created accounting information will be logged here Note that only the superuser user ID root should create and modify this file Each record in this text file is of the form tttttttttt cc data where tttttttttt is the time in seconds in decimal This is always followed by a single space The time is followed by a two character code cc This code is then followed by a space and data specific to each code and terminated by a lt newline gt The following utilities write these accounting records Chapter 2 Setting up User Accounts 25 Accounting file Utility Purpose Record login userlogged in tttttttttt LO device uid gid uname login login failed tttttttttt LF device uname modem modem connect tttttttttt MO device baud su switch user tttttttttt SU device uid gid uname tinit start a command tttttttttt TS device command tinit arm a device tttttttttt TA device A typical logfile might look like this 670464500 TS 1 dev serl modem b 19200 L 670464545 MO 1 dev serl 2400 670464550 LO 1 dev serl 100 101 steve 670465824 TS 1 dev serl modem b 19200 L This record shows that tinit started a modem program to wait for calls A call was received and answered at 2400 baud and user ID steve logged in Note that the l
38. can be saved either to a regular QNX file or to a raw block device like a floppy or tape 70 Part I Installation amp Configuration QNX Operating System 3319333333331 OVI PPI III III III I III II II 33 III 3313 33 3 33 03 3 33 33 3333 DI I BEI I IB ID I I I I IB I I BI 13 331 Archive backups Administrator s Guide Backup formats Saving to a regular filesystem simply involves copying the files In this case the destination must be a device with a mounted QNX filesystem on it QNX supports three major archive utilities e cpio o tar e pax Both cpio and tar are implemented as links to pax which is capable of reading and writing both cpio and tar formats Both cpio and tar are common on UNIX systems The pax utility is a cover utility for cpio and tar so it doesn t support its own archive format By default pax will use the tar format when creating an archive The pax utility will detect when you ve reached the end of a media on a volume and will prompt you to insert the next volume to be used for the save The result is a backup spanning several media diskettes tapes etc Unfortunately the tar cpio format does not label the media with volume IDs If you mixed up your media or inserted the wrong one out of order you would end up restoring bad data To safeguard against this possibility ONX is shipped with the vol utility which labels each volume with its sequence number and therefore pr
39. changes If you re changing a partition entry you will be required to enter the partition type number and the start and end cylinders The other information will be calculated for you by the fdisk utility The disk utility can also be run as a non interactive utility using command line options This is useful for designing a custom installation procedure The command mode syntax is fdisk drive cmd The commands are add slot QNX type ALL HALF OUARTER TENTH size Add a new partition entry of the size and type specified If fdisk cannot locate sufficient un allocated disk space to satisfy your reguest it will allocate the largest available portion of the disk if any Using the force option deletes any existing partition in the specified partition number of the partition table All allocated blocks are freed for reuse before attempting to allocate the reguested space Also add will normally use the first available partition number but the option will force it to use slot the specified number l fdik 143 fdisk create QNX disk partition QNX boot ONX ONX2 DOS OS2 type slot Boot will turn on the boot flag for the indicated partition If another partition was already flagged as the primary boot partition the flag will be tumed off for it loader Write the QNX loader to the disk show Show the fdisk partition entries query ONX ONX2 DOS OS2 FREE TOTAL type slot Ex
40. data bits plus parity bit is odd even sum of data bits plus parity bit is even mark always 1 space always RS 232 uses the DTR and DSR lines to control communication sessions The terminal raises DTR when it is powered up and available Similarly the modem raises DSR when it is powered up and available but not necessarily connected to a remote modem No communication is expected to occur unless both DTR and DSR are raised A terminal indicates that it no longer wishes to communicate by dropping the DTR line which causes most modems to hang up the telephone line thus releasing the connection Part Installation 8 Configuration QNX Operating System 3332173303233 332 I II III IG III III II II III II III 3 313 3 3 3 3 3 3 3 3 1 4 I 33333 9 PDD 3 3 9 3 3 3 0 3 3 3 3 3 J 3 3 Flow control Configuring serial ports Data bits Stop bits Parity Administrator s Guide Serial devices A modem indicates that it has established a connection with another modem by raising CD Some modems will also indicate that they have detected but not yet answered an incoming call by raising RI The RTS and CTS lines control the flow of data between terminal and modem The terminal raises RTS when it is capable of receiving data on the Rx line Similarly the modem raises CTS when it can accept data on the Tx line You use the stty utility to set the four major parameters that define an RS 232 lin
41. dev hd0t 4 The drive or file can be local or it can reside on another node in the network 1 Scan the dev directory and mount the corresponding drives Dosfsys OR Dosfsys s This syntax is the norm for most environments Dosfsys 133 Dosfsys DOS filesystem manager QNX Description 2 Adopt drivea as dos a read only and 8 disks drivec as dos c Dosfsys a drivea R c 8 disks drivec amp 3 Adopt dev d0 as dos a and dev wd0t4 as dos c Dosfsys a dev fd0 c dev wd0t4 amp The Dosfsys filesystem manager provides transparent access to DOS files and directories that reside on a DOS disk Dosfsys can support up to eight drives a to h You can create files on DOS disks read them write to them and delete them with most QNX programs You can also create read and delete directories on DOS disks with standard ONX utilities such as mkdir 1s and rmdir Most standard QNX utilities will work with DOS files provided that the DOS file structure allows for the functionality required by the utility Your own programs will also be able to process DOS files just as they process QNX files by using the standard I O functions such as open read write close seek etc When you read DOS directories they I be presented to you in QNX format The i option lets you get information about the currently adopted DOS drives The x option terminates the Dosfsys server When this command is issued
42. for 42 N name server see global name server network sharing devices 46 network booting 5 7 netboot configuration file 6 network card removing effects of 10 network images 82 node numbers changing effects of 10 O operating system images see images output buffers specifying 31 P parallel devices 30 multiple parallel ports 30 output buffers specifying 31 single parallel port 30 parallel driver starting 11 30 parity bits 35 partitioning pathname space 58 60 partitions bitmap blocks 88 directory structure checking 93 Index 211 Index key components 87 loader block 87 multiple partitions on single drive 59 root block 87 root directory 88 passwd utility 20 password database 20 access to files 23 default password files 25 etc groupfile 24 etc passwd file 23 etc shadow file 24 list of files 23 users modifying their own entry 22 passwords changing 20 characters requiredin 20 entering 20 patching minor disk problems 94 pathname space partitioning 58 60 pax utility 12 71 permissions 22 phoning Quantum 108 print jobs cancelling 47 querying 47 submitting 47 print queues controlling 48 print spooling 46 47 configuration file 50 configuration file example 52 54 configuring spooler 48 55 flexibility 52 flow of data within spooler 49 lp utility 47 lpc utility 48 lpq utility 47 lprm utility 47 lpsrvr utility 48 55 212 Index server 46 printers serial printers connecting 37
43. hard and make an image boot images hard that contains a Western Digital driver and a mount command that mounts a QNX filesystem on dev hd0t 77 make b hard Use build file boot build hard and make an image boot images hard that contains a PS 2 SCSI driver instead of the Western Digital driver and amount command that mounts a QNX filesystem on SCSI ID 6 make b hard d Fsys ps2s h dev hd6 Use build file boot images hard and make an image boot images ps2s that contains a PS 2 SCSI driver instead of the Western Digital driver and a mount command that mounts a ONX filesystem on SCSI ID 6 The image is written to the image file ps2s rather than the default which is the name of the b option in this case hard make b hard d Fsys ps2s h dev hd6 i ps2s Once you ve built an image it won t become the new boot image until you copy it to the boot file However before you do this you should make a backup of the current boot file by copying it to the altboot file cp boot altboot If for any reason your new image doesn t work properly you can press lt Esc gt when prompted during the boot process and load the altboot file instead of the boot file When you select the alternate boot image the normal check for the etc config sysinit node file is replaced by a check for the etc config altsysinit file You should ensure that the altsysinit file contains the latest copy of your working sysinit file cp etc c
44. it uses interrupt IRO 3 If the scan shows that neither of COM1 nor COM2 is present Dev ser terminates Remember that you can start Dev ser only after the Device Manager Dev has been started Dev Dev con Dev par 132 Part Il Managers Drivers amp Utilities QNX Operating System 3333332233001 IU I III III III III III II II II III 33 3 313 33 33 33 33333333333 I 3 3 I I 3 III I IIIIII III I 2 Dosfsys DOS filesystem manager QNX Syntax Options Examples Administrator s Guide Dosfsys S s m dos drive qmx_drive R Dosfsys i n node dos drive path Dosfsys x n node R Mounts the DOS drive as a read only drive S Same as s except the drives are adopted as read only i Gets drive information from the Dosfsys manager on the specified node If no node number is specified the local Dosfsys manager is used m Suspends adoption of the indicated drives only displays the drives that would be adopted n node The node the Dosfsys manager resides on s Causes Dosfsys to scan the dev directory for drives to adopt x Causes the Dosfsys manager on the specified node to exit If no node is specified the local Dosfsys manager is used dos drive A DOS drive letter ranging from a to h dos_drive_path The full name of the adopted DOS drive defaults dos a for a drive dos b for b drive etc gnx drive The name of the ONX drive or file to open e g
45. jobs Querying print jobs Cancelling print jobs Administrator s Guide Print spooling Users submit jobs to the spooler using the 1p utility For example the following command will cause the file report to be inserted into the default print queue and ultimately printed lp report In systems where more than one print queue is available you can specify the symbolic name of a print queue lp n txt report The spooler for that symbolic printer will gueue the submitted jobs and will ship them to the actual printer one at a time A user may wish to examine the printer gueue using the 1pq utility A sample output from the 1pq utility might look like this 1 steve job 439 1400 bytes lalist doc 2 aboyd job 42 2312 bytes netdrvr c This utility lets the user determine when any jobs submitted have actually been printed It also provides the print job ID for use in other 1p utilities The 1prm utility lets the user remove jobs from a print queue Jobs may be removed by explicitly specifying the job ID number s If the state of the system print gueue was as shown above steve s job job 39 could be cancelled with the command lprm 39 If job 39 was currently being printed the printing would be abandoned The success of abandoning current print jobs may vary with the type of printer you re using since some printers have large internal buffers The superuser may also remove all jobs belonging to a particular user
46. network configuration file This file contains information on each node that can boot over the network The default is etc config netboot n netname The registered name of the Network Manager process to receive network boot requests The default is qnx arcnet v Be verbose Print each boot reguest to the standard output netboot amp The netboot utility accepts boot requests from machines attempting to boot over the network The netboot utility must be running as a background process on the boot machine before another booting machine can boot Upon receiving a boot request netboot opens the network configuration file and uses the node ID of the booting machine as a key to locate the boot information An operating system is then prepared and transmitted to the requesting machine The network configuration file is an editable text file containing one line for each node that may be booted Blank lines and lines that start with a double quote are ignored Lines must be in the following format node number F imagefile buildfile You may use spaces or tabs to separate each token Note that you may use instead of node number to match any requesting node If you do this make sure the line is last in the file since all nodes will match and look no further netboot 173 netboot service boot requests from the network QNX If an image file F is specified it must contain the path of an operating system image
47. not for general use The process types are as follows A B F Must be present in an image as the first two processes Needed if you want to use the network Can be started later in the sysinit file we recommend this method Needed if you want to use the network Usually included to execute a shell file of processes that you start dynamically Needed for low level system work You must include the Process Manager and Shared Library in the boot image If you want to use the network then you must also include the Arcnet Network Manager The Filesystem Manager and Device Manager typically require that you include one or more drivers with them if they are to be useful The list of programs to build into the image is kept in a build file under boot build Each program occupies two lines in this file empty lines are ignored The first line is the pathname of the program The second line starts with a followed by a number representing the size of the heap alloc space followed by a buildgnx 117 buildqnx build a custom version of QNX QNX command line Your program will start at priority 10 with a round robin scheduling algorithm The following is a simple build file for creating an image to boot from a hard disk with a Western Digital controller on a single node computer The sinit utility is used to execute the system initialization file sys Proc 38000 Proc sys Slib 1 Slib bin Fsys 16000
48. on them by the ONX filesystem Most files in ONX 4 have the following overall structure Signatures IWONX In dot entry of each directory lamXbik In header of each extent block 92 Partl Installation amp Configuration QNX Operating System 31331113333 33 337 133 3 33 3 3 313313 313313 313331331 313 PVIFIFTFIIIIDIIIIFIFIIIIIIIIIIFIIIIIIIIIIFIIIIS fdisk dinit chkfsys Administrator s Guide File maintenance utilities File maintenance utilities The following utilities let you create and maintain the disk file structure e fdisk e dinit e chkfsys e zap e spatch The fdisk utility creates and maintains the partition block on a hard disk This block is compatible with other operating systems and may be maintained by other OS versions of disk although ours has the advantage of recognizing QNX specific information If the partition loader is missing or damaged fdisk can create it We recommend you keep a hard copy of the partition table information for every disk in your network The dinit utility creates but Fsys maintains the following e boot block e root block e bitmap blocks e root directory e inode file inodes The chkfsys utility is your principal filesystem maintenance tool This utility Chapter 8 Disk amp File Recovery 93 Disk recovery procedures zap spatch Using chkfsys 94 e checks the directory structure of an entire disk
49. processes that provide these services into a custom built operating system image You create this image with the buildanx utility The image can be booted from disk by the QNX partition loader or booted over the network using the netboot utility Constructing a build file The buildanx utility takes a text file containing a list of process names as input and produces a binary image file containing these processes as output This is called a build file The build files are kept in the directory boot build and the image files are kept in the directory boot images You can create an image by invoking bui 1dqnx directly or by using the make utility and the Makefile in the boot directory For example you could use buildgnx build ws images ws OR make b ws Each program you want included in the created image occupies two lines in the build file Empty lines are ignored The first line is the pathname of the program you want included The second line starts with a followed by a number representing the size of the heap alloc space to be used followed by a command The following example would select the ONX Filesystem Manager Fsys and start it with its x option to specify that Y the cache is to be used to cache executables 78 Partl Installation amp Configuration QNX Operating System 313133333333 333 3333 13333 33 3131313 31331 31 3 333 1 3 333333 3339 3 3933332 3 3 33 31 3 3 3 3 3 3 3 33 I II 3 33 3 3 3 3 3993
50. running chkfsys you know that certain key files or directories were not recovered then you might be able to use spatch to recover some or all of this data Before attempting this you should first familiarize yourself with the details of a QNX filesystem as described in the section Overview of QNX 4 disk structure in this chapter You should also study the documentation forthe spatch utility see the Utilities Reference Chapter 8 Disk amp File Recovery 101 Recovering lost files and directories The lost found 102 directory Using spatch The spatch utility can take a range of disk blocks and link them into the filesystem as a real file or directory under the lost found directory A space for the lost found directory always exists and has room for at least 126 entries on a hard disk After you use spatch to link all such pieces of the disk into the lost found directory you should immediately run chkfsys to rebuild the bitmap and verify the integrity of the filesystem that now includes these new files Once chkfsys validates the disk you can safely move these files or directory trees to other directories on the disk It s a good idea to keep the 1ost ound directory empty so that there will be as much room as possible to recover files in any future disk recovery episodes The spatch utility has a special menu item called Mark that allows you to identify a range of disk blocks The first time you se
51. spooler This is the spool setup file First the plain text printer txt de dev par af usr spool lp log ci text2ps fname gt spfile pr 50 Second the postscript printer ps de dev par af usr spool ps log pr 60 Third the gif gif de dev par af usr spool gif log ci gif2ps fname gt spfile pr 5 end of the spool setup file First notice thatin the gif queue the ci key is used This is important because the imaginary program gif2ps may require substantial time to complete If the program were used as a copy out filter it would needlessly block the despooler while generating the image With this configuration other jobs may be despooled while the image is being generated Second notice that the de attribute specifies a device rather than a dequeue Since no dequeue was specified data is copied directly to the indicated device without further translation Anumber of names were introduced in the ci commands These are metavariables that the spooler will set as appropriate when it performs the action The following metavariables are available fname the original file name submitted in the job spname the name of the spool data file username the login name of the user who submitted the job userid the numeric userid of the user who submitted the job qname the name of the queue the job currently belongs to deqname the name of the dequeue the job currently belongs t
52. started bin Dev Device Manager process Once Dev has been started one or more of the following device drivers may be started bin Dev con amp console device driver process bin Dev par 8 parallel printer device driver process bin Dev ser amp serial device driver process Each of these drivers is described in more detail in Part II Managers Drivers amp Utilities Parallel devices Parallel ports are used to communicate with parallel printers Apart from starting up the driver there s little work for you to do other than connect the printer to the machine If only one parallel port is available on a machine then no parameters are required Dev par Started this way the parallel driver will create a device called dev par which corresponds to the first parallel port found by the BIOS LPT1 If your machine has more than one parallel port then you ll need to ports start an additional Dev par for each extra port You must provide a unique name for the extra devices For example Dev par Dev par b 2 N laser 6 30 Partl Installation amp Configuration QNX Operating System 3333331333213 2 I VIF PIII III III II II III B Output buffers Hardware adapters VO addresses Hardware interrupt Administrator s Guide Serial devices These commands will create a device called dev par on LPT1 and a second device called dev laser on LPT2 If you have the memory you might fin
53. the Unilities Reference If you boot over the network the booting machine will inherit the UTC time and time zone environment variable from the node it booted from Therefore you don t need to put this information in your system initialization file Licensing QNX must be licensed for each computer itruns on This is true whether you re using 10 standalone machines or 10 networked machines In a network each machine is referred to as a node and each node is assigned a logical node number Logical node numbers range from 1 to the number of nodes in the network For example a network licensed for three nodes would support logical node numbers 1 2 and 3 You set the size of the network by running the license utility see the section Expanding your license You can use the sin utility to query the number of nodes your network has been licensed for Chapter 1 Installation 15 Licensing Application licensing Per node licensing Concurrent use licensing Typing sin info will produce output similar to the following Node CPU Machine Speed Memory Ticksize Monitor Flags 2 386 0 AT 563 840k 2048k 10ms VGA Color P Heap Handlers Names Sessions Procs Timers Nodes Boot 13668 32 30 32 150 40 10 Hard Locators 1 4 The number under the Nodes heading in this case 10 indicates the number of nodes licensed within this network Applications are usually licensed per node or per concu
54. the device default is par O number The size of the output buffer default is 1000 p number The I O address in hex of the parallel port reguired only if you re using a non standard parallel port that the BIOS is unable to find Support LPT1 as dev par Dev par 6 Support LPT2 as dev prn Dev par b 2 N prn Support port at 278 hex as dev laser Dev par p 278 N laser 6 The Dev par driver manages all parallel devices in a QNX system You must start a copy of Dev par for each parallel device Dev par is to support If you start Dev par without specifying any I O ports Dev par uses the first parallel port found by the system BIOS LPT1 If there aren t any parallel ports Dev par terminates If you need to have more than one parallel port supported remember to assign a unique name to each of the ports Remember that you can start Dev par only after the Device Manager Dev has been started Dev Dev ser Dev con Devpar 129 FEELCELCCOCOCOCOCCECOECECOCCOECELCOCCOECEECECCOCECCOCOCOCOCOCCEOE 33 333 3 3 3 3 33 33 333333 3 3333 33 333 33 3 333 3 3 Dev ser serial device driver QNX Syntax Options Examples Administrator s Guide Dev ser options port irq h r number number name number number number number A serial I O port in hex and its corresponding interrupt in decimal The size of the canonical input buffer default is 256 Set initia
55. to resources and critical system functions These mechanisms are based on the ability of the system to identify a particular user The QNX access control utilities are login sign on to the system su temporarily become another user passwd maintain the user accounts change password newgrp switch to a different group The login utility should be started by tinit on all tty devices The login utility demands a username and password which it verifies in the password database If the user fails to enter a correct username password combination within three attempts the utility will exit updating appropriate accounting information If the user enters a correct combination login will start a login shell and will load the user s environment The su utility lets a user temporarily have the privileges of another user If the user is not the superuser root su will demand the appropriate password If a valid combination is entered su will do an exec to create a shell for the user with the effective group ID and user ID of the desired user Exiting from the shell will return you to where you were before running su The passwd utility may be used to change a password or to add a new user account to the system Only the superuser root may add a new account When changing or setting a password the passwd utility will insist that the password consist of at least six characters from at least two different character classes Examples of charact
56. upon memory and disk space nil string 50 is the default priority nil no action is performed qnx SPOOLER registered only if no queue specifies a name 0 jobs are despooled as soon as possible nil delete job after despooling Since the keys are case sensitive Quantum reserves all keys formed by two lowercase letters Any custom extensions may be safely implemented using uppercase or mixed case keys The spooler utilities will ignore any options they don t understand Chapter 4 Print Spooling 51 Configuring the spooler Example configuration The following example shows a set of queues that share a common file dequeue The three queues are named e txt text files e ps PostScript files e gif Graphic Interchange Format files The configuration is as follows ann va ee Lee Users send files with the 1p utility to the appropriate queue which converts the file appropriately then prints the converted data on the printer dev par Since GIF files tend to be large they are assigned a lower priority than the others The following example shows the flexibility of the spooler and demonstrates some important ideas 52 Partl Installation amp Configuration QNX Operating System x II3939 939399393993 993 3 3 3 3 3 3 3 3 3 3 3 3 3 1 33 33 3 3 3 3 J3 39 3 3 I 3 3323333933333 3933933 3 9333 33 333 3 3 13 3 3 3 3 1 3 3 3 3 BI I I 3 33 Administrator s Guide Configuring the
57. using integers in the buffer allocation schemes On many of these machines however it is not possible to allocate blocks of memory larger than 32K cpio tar 184 Part Il Managers Drivers amp Utilities QNX Operating System 331313033 3331 I 3 3 3 3 3 3 1 3 3 3 3 III 39 3 3 1 1 1 313 9 PUFPVIFIFVIIIPIIIIIIIIIIIIIAIIIIADIIIIIIDIIIFVIIIIS Proc Process Manager QNX Buildfile syntax Proc options Options a Disable time accounting This option saves 16 x num_procs bytes of memory and slightly reduces the work done in the timer interrupt handler d num_dev The number of major device numbers supported default is 32 min_fds max_fds extra_fds This option controls the availability of file descriptors FDs min fds The minimum number of FDs that must be available for a process This argument defaults to 16 and should be left at that value if POSIX compliance is a requirement POSIX requires that a process be capable of opening at least 16 files You can save some memory by reducing this number max fds The maximum number of FDs that can be available for a process default is 32 extra_fds The pool of extra FDs that can be allocated as needed to processes that exceed their minimum number of FDs i irq Make irq the highest priority hardware interrupt in the system default is 3 m num_shared_segs The number of shared segments managed by the qnx_segment family of functions that will
58. v Display acounter For each file being frozen display a kilobytes counter and after the file is frozen print a message giving the percentage of the input file s size that has been saved by compression z Ifthe output of a melt option d is to a tty allocate a larger output buffer so screen output is in full screen chunks n1 n8 A list of 8 numbers separated by commas specifying the values for the static Huffman table Freeze all files in the current directory freeze Extract all C source and header files melt ch F Expand files from a compressed pax archive on floppy vol r dev fd0 melt pax r View the concatenated contents of all compressed files in the current directory fcat F more freeze 145 freeze compress and uncompress files QNX Description The freeze utility compresses the specified files or the standard input If a file becomes smaller it s replaced by a file with the extension F you can use the option to force the creation of the F file even if the compressed file is larger If no files are specified the compression is applied to the standard input and is written to the standard output If you don t specify the option and you run freeze in the foreground you re prompted as to whether the file should be overwritten When a F file is created the original file is removed The following links to freeze are equivalent to using freeze with these
59. variable before launching login tinit c login TERM vt100 t dev serl amp Unless you restrict dial up access to only a particular type of terminal modem users will need to run a special program to query the user for his terminal type In QNX such a program is provided called termdef This program will display all terminal types supported on this system and will ask the user to select one Once a terminal type has been selected termdef will set the TERM environment variable appropriately then execinto login tinit c modem c termdef t dev serl The following table describes actions you can take if you encounter some of the common problems involved in connecting serial devices Part Installation 8 Configuration QNX Operating System PUP PTET PV CPP PEPE PETIT PPP TPE TV I TI I BB 1 3 1 I I 33 VRID AFI FI VIVA Ia Problem Probable Cause Serial devices Remedy Data characters are Wrong baud rate or parity unrecognizable Some characters are Wrong parity fine some aren t No data can be sent or Wrong cable received Wrong I O ports Interrupt conflict Data is received and Interrupt conflict transmitted only when another serial port is in use Data is lost occasionally Flow control supported but not enabled Flow control not supported Cabling problems Administrator s Guide Use stt y to set correct baud rate and or parity Try different parity using stty Check cables
60. which can be one of dev fdn A floppy drive that the serial number is transferred from n can be either 0 or 1 directory A directory that all serial number files are transferred from file A specific serial number file to transfer The default is dev d0 destination The pathname of the etc licenses directory that is to be updated default is the etc licenses directory in the current filesystem Copy the serial number from the floppy diskette in drive 0 to the etc licenses directory license dev fd0 Copy the serial number from the floppy diskette in drive 0 on node 10 to the etc licenses directory license 10 dev d0 Copy all serial numbers from the etc licenses directory on node 1 to the etc licenses directory on node 5 license 1 etc licenses 5 etc licenses The license utility transfers serial numbers to your hard disk These serial numbers are used by the operating system and some applications to verify the licensing of the software The serial numbers are placed in files under the etc licenses directory When you receive a new license for your network or for an application that is licensed to you you should place the diskette containing the license serial number in a floppy drive and run the license utility license 165 license license software for use QNX Before you run the license utility make sure the floppy driver has been started The utility will copy the serial numbe
61. 12 2359 11 2300 4 08 00 7 1900 12 2359 12 2359 4 0800 3 1500 1300 1300 2 1400 2 1400 2 1400 Hours 3 12 2 Daylight Saving Time Effective Period first and last day Apr 7 Oct 26 1991 Mar 31 Oct 26 1991 Apr 7 Oct 26 1991 Apr 7 Oct 26 1991 Apr 7 Oct 26 1991 Apr 7 Oct 26 1991 Apr 7 Oct 26 1991 Apr 7 Oct 26 1991 Mar 31 Sep 28 1991 Sep 29 1991 Mar 28 1992 Mar 31 Sep 28 1991 Peyo AUN PUOHLUIIUT E Ap 27 BODEM li II a3 III VIVID AVI Va aI Index A access control utilities login 20 newgrp 21 passwd 20 su 20 access fields 22 accessing resources 20 accounting file 25 27 clearing 27 compressing 27 creating 25 discarding information 25 format 25 interpreting 25 typicalexample 26 accounts adding 20 creating without password home directory shell or group 21 deleting 21 restriction on who can addto system 20 setting up 19 27 adapter cards 32 see also serial adapters altsysinit file 9 see also system initialization file Administrator s Guide archive utilities cpio 71 pax 71 tar 71 vol 71 archives 71 compressing data 74 examples 75 76 see also backups backup formats 70 71 archive backups 71 filesystem backups 72 backup media 72 73 fixed disks 74 floppies 72 removable disks 74 tape
62. 3 3 3 9 1993 9 33 J 3333 33 33 33 3 3333 33 3 33 3 3333333 33 cpio copy file archives in and out UNIX Syntax Options Administrator s Guide Read list an archive cpio i Bcdfmrtuv pattern Write an archive cpio o Bacv Copy files cpio p adlmruv directory B a C m r Cause input output to be blocked 5120 bytes to the record Can be used only with the o or i options for data directed to or from character special files Reset access times of input files after they ve been copied When the 1 option is also specified the access times of linked files aren t reset Can be used only with the o or i options Write header information in ASCII Can be used only with the i or o options Note you should always use this option to write portable files Create directories as needed Can be used only with the i or p options Copy in all files except those in patterns Can be used only with the i option the letter el Whenever possible link files rather than copy them Can be used only with the p option Retain previous modification times This option won t work on directories that are being copied Can be used only with the i or p options Interactively rename files The system will ask you whether to rename pattern each invocation Read and write permissions for the controlling terminal dev tty are reguired for this option If you type a null li
63. 3 3 33 3 33 3 33333 33 3 3 33 33 3 Two hard disks same node Two or more QNX partitions Local and remote hard disks Independent Primary secondary Administrator s Guide Partitioning the pathname space The first hard disk is mounted as slash and forms the root of the filesystem The second hard disk is mounted as usr2 mount dev hd0t77 mount dev hd1t77 usr2 Any reference to a pathname starting with usr2 will be directed to a ONX filesystem on the second hard drive For example ls aR usr2 Show all files on second hard drive You can have three ONX partitions on a single hard drive The primary partition should be type 77 see fdisk utility A second partition should be assigned type 78 and a third should be assigned type 79 For example mount dev hd0t77 mount dev hd0t78 usr2 In a local area network you might have disks with QNX filesystems on more than one machine You may configure these filesystems to be e independent e primary secondary e linked independent In this configuration you treat each machine as an independent self contained filesystem To access a file on a remote machine you would precede a pathname with the remote machine s node number For example etc motd file on local filesystem 10 etc motd file on remote filesystem node 10 The ability to specify a filesystem for a particular node will always work and is the most general mechanism for accessing remo
64. 3 I I 3 9 9 I I 9 3333J 333 333333 333 3 3 3 3 33 3 33 3 3 3333 3 3 3333 Syntax Options Examples Description Exit status See also Administrator s Guide tape control a tape driver QNX tape bot eod erase forward retension status bot Position the tape to the beginning eod Position the tape to the end of the data perhaps to continue writing after a previous archive erase Erase the contents of the tape forward Position the tape to just after the next file mark retension Position the tape to the beginning then to the end then back to the beginning status Print information concerning the current condition of the tape drive Position the currently mounted tape such that data may be appended after previously written archives tape eod Position the tape such that the third archive on the tape may be read tape bot forward forward Position the tape such that the first archive may be read tape bot The tape utility provides a mechanism for positioning a mounted tape to a specific location in anticipation of being read from or written to by another utility i e pax You can also use tape to examine the current status of the tape unit 0 The command s completed successfully gt 0 The utility aborted after encountering the first error cpio pax tar tape 191 ECCOCOCCOC OC COC COCO COC CE CEC COCO COECCOCOCCOCOCECEEL 13333 3 33333 3J 3 3 33 3 3 3 3
65. 33313 3333133 333 3333 333 333 1 31313313 113131 311 3133 13 33313 333333 3333333 3 3 333 33 3 33 33 33333 33 Step 1 Step 2 Administrator s Guide Booting ONX over a network Booting QNX over a network Once you ve installed ONX onto a hard disk that will be used as a network file server follow these steps to boot a computer over the network Note that the booting computer may be a diskless workstation or a file server Before you boot over the network you must first install ONX on at least one machine that boots from hard disk as described in the previous section If you haven t done this please do so now then return to this section Check your network license QNX must be licensed to run on each computer in a network Before you proceed make sure you are licensed to run the machine you wish to boot over the network This is described in the section Licensing in this chapter Select a boot server You must select which node in the network you wish to boot from For small networks we recommend you pick a single node typically node 1 This node should have a local QNX filesystem For larger networks you may want to select more than one boot server node For example let s assume you have three departments R amp D Marketing and Operations each with its own machine that acts as a major file server You may elect to have each department boot from its own major server This provides fault tolera
66. 3333 3 33 33 3 33333 3 3 Syntax Options Administrator s Guide tar tar tar tar tar c 1 m o r u tar read and write tape archive files UNIX c bfvw filename r bvw filename t fv filename u bvw filename x flmovw filename Use the next argument on the command line as the blocking factor for tape records The default is 1 the maximum is 20 This option should be used only with raw magnetic tape archives Normally the block size is determined automatically when reading tapes Create a new archive Writing begins at the beginning of the archive instead of after the last file Use the next argument on the command line as the name of the archive instead of the default which is usually a tape drive If the dash character is specified as a filename tar writes to the standard output or reads from the standard input whichever is appropriate for the options given Thus tar can be used as the head or tail of a pipeline lowercase letter el Report if all of the links to the files being archived cannot be resolved If this option isn t specified no error messages are written to the standard output This option is valid only with the c r and u options Don t restore modification times The modification time of the file will be the time of extraction This option is invalid with the t option Cause extracted files to take on the user and group identif
67. 3939233030 D3 DDD DD EB BE DD DD DDD DDD DD DDD IDDDDDD PRINTED IN CANADA
68. 4 root directory The first block of a QNX partition the loader block contains the bootstrap loader that loads the QNX OS into memory The second block of a QNX partition the root block contains the directory entry for the root the inode entries for the inode file and a label field Chapter 8 Disk amp File Recovery 87 Overview of QNX 4 disk structure Bitmap blocks Root directory 88 Several consecutive blocks follow the root block The bitmap blocks form the bitmap for the QNX partition One bit exists for each block on the partition thus one bitmap block will be used for every 4096 disk blocks corresponding to 2M of disk space If the value of a bit is zero its corresponding block is unused Unused bits at the end of the last bitmap block for which there are no corresponding disk blocks are turned on Bit assignments start with the least significant bit of byte O of the first bitmap block which corresponds to QNX block 1 The root directory follows the bitmap blocks The root directory is a normal directory see Directories below It is initially created by the dinit utility with enough room for 32 directory entries 4 blocks As the following illustration shows the root directory contains directory entries for several special files that always exist in a QNX filesystem The dinit utility creates these files when the filesystem is first initialized Part
69. 8 0400 7 Apr 7 Oct 26 1991 Kusaie Pingelap Marshall Is Excluding 12 2359 Cape Verde eee 1 1100 Kwajalein Cayman Island 5 07 00 Kwajalein 12 00 01 Central African F Republic 1 1300 Manana Island Excluding Guam 10 2200 1 1300 Palau Island 9 2100 Chile Island 11 2300 Continental 4 08 00 Pakistan 5 1700 hia People s Republic O1 78 2000 9 Apr 14 Sep 14 1991 Papua N do 20 ina s ic r 14 Papua New Guinea Cocos Keeling Islands 61 2 1830 i Bougainvile ts en Colombia 5 0700 Paraguay 4 0800 Comoros 3 1500 Peru 5 07 00 Longo 1 1300 Philippines Republic Of 8 2000 Islands 10 0200 Poland 1 1300 2 Mar 31 Sep 28 1991 Costa Rica 6 0600 Portugal Cote D Ivoire GMT 1200 Azores 1 1100 GMT Mar 31 Sep 28 1991 Cuba 5 07 00 4 hre 12 1991 Madeira GMT 1200 Mar se 28 1991 Cyprus d 2 1400 3 lar 31 Sep 28 1991 Mainland GMT 1200 1 Mar 31 Sep 28 1991 Czechoslovakia 1300 2 Mar 31 Sep 28 1991 Puerto Rico 4 0800 Denmark 1 1300 2 Mar 31 Sep 28 1991 Oatar 3 1500 3 1500 Reunion 4 1600 Dominican Republic 4 0800 Romania 1400 3 Mar 31 Sep 28 1991 ador Rwanda 2 1400 Continental 5 0700 Saint Pierre and Miguelon 3 0900 2 Apr 7 Oct 26 1991 Galapagos Is 6 0600 Saint Vincent and the Grenadines 4 08 00 Egypt 2 1400 3 May 1 Sep 30 1991 Samoa 1 0100 rador 6 0600 San Marino 1 1300 Equatorial Guinea 1 1300 Sao Tome Istand and Principe Is GMT 1200 Ethiopi
70. 89 Overview of QNX 4 disk structure The type of directory entry is determined by the bits in the d_status field as follows Bit 3 FILE LINK Bit 0 FILE USED Comment O O unused directory entry O 1 normal used directory entry 1 x link to an entry in inodes which may be used or unused 66 The first directory entry is always for the file and includes a directory signature Iv QNX This entry refers to the directory itself by pointing to the entry within the parent directory that describes this directory The second entry is always for the file This entry refers to the parent directory by pointing to the first block of the parent directory Every directory entry either defines a file or points to an entry within the inodes file Inode entries are used when the filename exceeds 16 characters or when two or more names are linked to a single file The first extent if any of a file is described in the directory inode entry Additional file extents require a linked list of extent blocks whose header is also in the directory inode entry Each extent block in the chain points to between 1 and 60 extents Links Files with names greater than 16 characters long and links to other files are implemented with a special form of directory entry These entries are identified with the _FILE_LINK bit 0x08 of the d_status field being set For these files a portion of the directory entry
71. ECCECECCECECCCCCCCECCCCE J3333 333 333333 33333 3 13 3 3 3 3 3 33 3 33 3 3 3 33 33333 Administrator s Guide Chapter 1 Installation In this Chapter Installing ONX on a hard disk Booting QNX over a network The system initialization file Setting your time zone Licensing Chapter 1 Installation 3 Installing QNX on a hard disk Step 1 Step 2 Step 3 Step 4 Installing QNX on a hard disk You use an automated install program to install QNX 4 0 onto a hard disk To install QNX 4 0 follow these steps Boot from floppy Place the QNX 4 0 boot diskette into the floppy drive and reboot the computer You should see a spinning arrow in the top left corner of your screen followed by the QNX logo a welcome message and a shell prompt Run the install program At the shell prompt 4 type install Simply follow the instructions on your screen to setup your hard disk so it will boot ONX 4 0 Reboot from hard disk Once installation is complete you should remove any floppy diskettes and reboot your computer from hard disk ONX 4 0 should now be up and running Read the User s Guide At this point it s a good idea to familiarize yourself with the basic philosophy and operation of QNX as described in the User s Guide For the remainder of this Administrator s Guide we ll assume that you have a basic level of familiarity with QNX 4 Part Installation 8 Configuration QNX Operating System 3
72. Fsys bin Fsys wd 1000 Fsys wd bin mount 4000 mount p dev hd0 dev hd0t77 bin Arcnet 1000 Arcnet bin sinit 2000 sinit Likewise the following build file will create an image to boot a workstation over the network Note the macro node which will be replaced by the current node ID sys Proc 38000 Proc sys Slib 1 Slib bin Arcnet 1000 Arcnet 118 Part Il Managers Drivers amp Utilities QNX Operating System 133 333131 3 33313 3 3 333 33 1333 33333 331311 313 3 3 313 3 313 3 3 I I II EI IIIIIIIIIIIIIIIIIIIIIIIII II II 1 i 33 Administrator s Guide buildqnx build a custom version of QNX QNX bin sinit 2000 sinit r node sys Debugger 1 Debugger You should start the processes that were omitted from the image in the system initialization file which is executed by the sinit process The sinit process will attempt to execute the etc config sysinit node file on the current node If the file doesn t exist sinit will attempt to execute the etc config sysinit file The following is an example of a simple system initialization file export TZ EST5DST4 M4 1 0 3 M10 5 0 3 rtc hw Dev Dev con n 3 reopen dev conl Dev ser Fsys floppy amp tinit t con2 conl Starting the Device Manager and console driver after boot presents a minor problem You can t start the console driver from the keyboard since your system doesn t yet recognize
73. Installation 8 Configuration QNX Operating System 1333 3111 1333333 3 33 13 33 333 3 33 3333 3 3 33 3343133331333 33233333 II III 39 3 3 I II I I I I I I II Directories Administrator s Guide s bitmap inodes boot altboot Overview of QNX 4 disk structure A link to the directory Also a link to the directory Represents a read only file consisting of the bitmap blocks A normal file of at least one block on a floppy RAM disk and 16 blocks on other disks inodes is a collection of inode entries The first entry is reserved and used as a signature info area The first bytes of the inode file are IamTHE inodeFILE Represents an OS image file that will be loaded into memory during the standard boot process This file will be of zero length if no boot file exists Represents an OS image file that will be loaded into memory during the alternate boot process This file will be of zero length if no alternate boot file exists A directory is simply a file that has special meaning to the filesystem A directory file contains a collection of directory entries as shown in the following illustration one physical block of a directory Offse t di fname 16 z k L m kon ee Am A f d_size z d xbk di mode 4 deme 3 ime i mtime A Came Tame n L xints ink BVRSSLRSSERSEBSRBBGO Normal directory entry Chapter 8 Disk amp File Recovery
74. NX Operating System 13 3333 33 331333 3 3 31 3 331 333 133 33 3 3 33 J3333 33 33 33 3 3 3 33 3 3 333 33 3 3 3 3 3 33 3 333 Compressed floppy archive UNIX compatible floppy archive Tape archive Administrator s Guide Archive examples one of the standard archivers via a pipe For example Quantum distributes its operating system in compressed form on floppies using pax freeze and vol Archive examples Collect files under usr into a tar format archive compress the archive and write it out to as many floppies as are needed adding sequence numbers to the diskettes pax w x ustar usr freeze vol w dev fd0 Read data off floppies uncompress it back into an archive and restore the files vol r dev fd0 melt pax r Save files under usr brianc in a tar format archive for restoration on a UNIX system pax w x ustar usr brianc gt dev fd0 Save files under usr brianc in a cpio format archive for restoration on a UNIX system pax w x cpio usr brianc gt dev fd0 Restore data in a tar or cpio format archive from another UNIX system and place all files under usr unix pax r s usr unix lt dev f d0 Start a new tape archive and save all files onto a OIC 02 tape tape erase pax w gt dev gic02 Append files that have changed since the date of the file lastsave to the end of an existing archive tape After the save update the time Of lastsave Chapter 6 Maki
75. PS 2 ESDI and not with the PC AT ESDI controllers Fsys ps2e 155 CEECELELELCECOCOCEECELCECECLOECOCCOECCECEEOCCEOCOCOCCOCEEE 3333339333333 2393933393933 93939393 3933393933333 39333933 93939399 Syntax Options Description Administrator s Guide Fsys ps2m driver for the IBM PS 2 MFM Disk Controller QNX Fsys ps2m a controller c drivespec d dma_channel i interrupt m maxsize n name a controller c drivespec d dma channel i interrupt m maxsize n name The controller address default is 320 hex The parameters of the drive You specify these in the following format heads cylinders sectors disknum If you specify this option you must include heads cylinders and sectors If you omit disknum unit 0 is assumed The DMA channel to use default is 3 The interrupt level used by the controller default is 14 The maximum numter of blocks that will be transferred from the disk to memory in one operation default is 34 The name of the block special device associated with the hard disk The default is hd which yields a device name of dev hdn where n is a unit number assigned by Fsys Fsys ps2m is the driver for the IBM PS 2 MFM Disk Controller The Fsys ps2m driver e transfers data between the drive and memory using the PS 2 DMA Controller e allocates maxsize x 512 bytes of memory as a DMA buffer In order to obtain drive parameters Fs
76. a Custom Operating System Image 79 Constructing a build file Disk images For hard disk booting you need to include e the two required system processes Proc and Slib e the Filesystem Manager Fsys e the driver required to access the drive Fsys driver e the Network Manager Arcnet if you want to use the network The Makefile The Makefile under the directory boot contains an entry for making a generic hard disk boot You can provide command line macros to change the defaults The following macros are defined Macro make argument Default if not Description specified b b buildfile no default build file d d driver Fsys wd disk driver h h hard disk dev hdo hard disk file i i imagefile images buildfile image file p p parameters none hard disk parameters This is the makefile FILES build b Define some defaults which may be overridden by h xx and d xx d Fsys wd h dev hd0 i b b images b Each OS image file is dependent on the core modules it is made from images b build b FILES buildgnx v d d h h p p build b images i The following examples will help clarify the Makefile usage 80 Partl Installation amp Configuration QNX Operating System 3333333233333 2322 I III 2330330230000 3333393333933 9333933393 3933333 9 33 393333939393 333939333993 Copying an image to boot Administrators Guide Constructing a build file Use build file boot build
77. a custom system initialization file Creating this file is described in the section The system initialization file below Note that you can still boot without creating a custom system initialization file If you boot without creating your own file the default file etc config sysinit will be used That file should contain generic commands suitable to start any machine Chapter 1 Installation 7 The system initialization file Initial boot The system initialization file When you boot QNX you are booting an image composed of several processes The first process in the image is always the Process Manager which contains the Microkernel The Process Manager performs processor initialization and then schedules each process included within the image for execution The last process is the sinit utility which starts the second phase of your system initialization This is done by starting a shell that executes commands from a system initialization file This is a standard shell file that runs in exactly the same manner as any other shell file except that breaks are disabled Starting system services after boot is one of the benefits of QNX s modular architecture The image that is booted typically contains only those few essential services needed to start all other desired services In order to run sinit needs access to a filesystem that contains a shell that can process the system initialization file This filesystem ca
78. a macro namely node which is the current node number When you boot over the network you have the option of loading a pre built image or building one on the fly If you build an image on the fly which is recommended then you won t need to build one manually as shown above This option is specified in the etc boot netboot file and documented with the netboot utility When the netboot utility invokes buildanx to build an image on the fly the image file is not written to disk 82 Partl Installation 8 Configuration QNX Operating System 339393393393 9339 93 3 39 3 3 3 3 3 1 1 I 3 3 3 3 3 3 3 3 3 a 3 I I I I I 1 I I I 3 3 333333333333 3393933339333 33 I 3339333 3 II 93393939393 Embedded images Administrator s Guide Constructing a build file An embedded system doesn t need to contain a filesystem or a network manager As such it might not be able to load a new process after booting If you wanted to load a new process you d have to build an image containing all the processes needed to run the system This image would then have to be transferred to the embedded system most likely inROM Chapter 7 Building a Custom Operating System Image 83 FELECEECE EEE CEE COEOCECOCOCCOCCECOCOCECEECCELOCEECOCOCOCCOEL 333 333 3 3 33737330333 I3 33 JIIIII3 III I 3393 III 3 III II 335 Chapter 8 Disk amp File Recovery In this Chapter Introduction Overview of QNX 4 disk structure File maintenance utili
79. a network containing a mix of nodes in which some are running ONX 4 0 and others aren t If an application on a ONX 4 0 node attempts to attach a virtual circuit to a node that isn t running ONX 4 0 the destination node would normally accept the low level control packet from the ONX 4 0 node but not recognizing the packet would discard it The application on the ONX 4 0 node patiently waiting for a response is eventually released by the ONX 4 0 self polling but this typically happens slowly The netnode utility can be used to avoid this situation By knowing which nodes do not exist the system can avoid sending packets to non ONX nodes in the first place netnode 175 netnode display or change the Arcnet node permit bitmap QNX The a option which re allows virtual circuits to the node or node range is added for completeness but will probably be rarely used The list of masked off nodes should not change often To see the current list of disallowed nodes invoke netnode with no arguments QNX 4 0 nodes that aren t on the node permit list cannot communicate with each other See also netboot Utilities Reference netinfo 176 Partll Managers Drivers amp Utilities QNX Operating System I33 9 3 3 3 9 3 1 1 E BB 1 3 1 13 3 3 3 3 33 3 EI 2 3 3 1 1 3 3 1 1 1 1 9 3 393 JV NNN Syntax Options Examples Administrators Guide netpoll display or change default polling parameters of a node QNX
80. aining just these blocks If you copy you should specify a file on another disk filesystem Remember to always run chkfsys after linking or copying a number of files or directories Chapter 8 Disk amp File Recovery 103 ELLEEELLTLELELLELLEELLELLELELELLELLEELELEEEEET III II 93 3 3 3 3 3 3 9 3 9 3 3 3 3 3 3 3 3 39 3 3 9 3 3 3 3 3 3 3 9 Chapter 9 The Quantum Update System In this Chapter Introduction Reporting bugs Free software Electronic mail Conferencing system About our hardware How to phone us Logging in Using QUICS Administrator s Guide Chapter 9 The Quantum Update System 105 Electronic mail 106 Introduction The Quantum update system called QUICS runs 24 hours per day on a computer that you may call via modem to e download fixes and changes to the operating system utilities and libraries e download a variety of free software from various sources e send electronic mail to Quantum e engage in a conference with other QNX users on a large variety of topics Reporting bugs Quantum s software refresh policy provides prompt response For example if you report a bug perhaps in a utility or library routine you can often download a revised version within hours of reporting the problem We maintain the most current versions of all programs including operating system modules for download Along with these we provide a list of all changes made to the system You may want to sig
81. al Filesystem Manager Fsys which then invokes that code and data via direct calls Once Fsys has adopted this code and data Fsys qic02 terminates as a process See also Fsys drivers Administrator s Guide Fsys gico2 161 LECCCCOCOCCEECCCOCOCCOECOECCOCOCOLCECOLEOCOCOCEECCOCCECEL 3331373333233 2323220 012 301 0 III II I Fsys wd driver for PC AT fixed disk interface QNX Syntax Options Description Administrator s Guide Fsys wd a controller c drivespec i interrupt m maxsize n name 7 8 s a controller The controller address default is 3f0 hex c drivespec The parameters of the drive You specify these in the following format heads cylinders sectors disknum If you specify this option you must include heads cylinders and sectors If you omit disknum unit 0 is assumed i interrupt The interrupt level used by the controller default is 14 m maxsize The maximum number of blocks that will be transferred from the disk to memory in one operation default is 34 n name The name of the block special device associated with the hard disk The default is hd which yields a device name of dev hdn where n is a unit number assigned by Fsys 7 Don t reprogram the Fixed Disk Control Register 8 Enable a bit in the Fixed Disk Control Register to allow drives with more than seven heads s Don t program the drive parameters into the wd controller Fsys
82. ar 23 Sep 6 1991 Tunisia 1 1300 Guinea GMT 1200 Turkey 2 1400 3 Mar 31 Sep 28 1991 3333333323333 3323333 BB 3 BJ 3 B 3 3 BJ 1 131 31 11 1 13 2 393 3 3 3 3 3 3 3 3 3 3 3 3 i 1 339 V3 3 30 J 3 3 j I 3 1 J I3 3 be oe be oe oe be ee ee Standard Time Legal time for each country fixed by law and based on the theoretical division of the world s surface into 24 zones each of 15 longitude with certain deviations due to frontiers or local option Daylight Saving Time DST Modified advanced legal time adopted by certain countries for part of year especially during local summer Country Guinea Bissau Guyana Haiti Honduras Hong Kong lun Iceland India inci Andaman Is Indonesia Central East West Jakarta Iran The Istamic Rep of Iraq Ireland Rep Of Israel Italy Jamaica Japan Johnston Is Jordan Kampuchea Dem see Cambodia Kenya Kiribati Rep Of Canton Enderbury Islands Christmas Is Korea Democratic People s Rep Of Korea Republic Of Kuwait Laos Lebanon Leeward Istands Antigua Dominica Montserrat St Christopher St Kitts Nevis Anguilla Standard Time Hours Time at from 1200 hrs GMT GMT GMT 1200 3 00 5 07 00 6 06 00 8 20 00 1 1300 GMT 1200 512 1730 8 2000 9 2100 7 1900 312 1530 3 15 00 GMT 1200 2 1400 41 1300 5 0700 9 21 00 10 02 00 2 14 00 3 1500 12 2359 A 0100 0 0200
83. ates of Brazil do not observe DST E Estimated Date Based On Previous Year Country Standard Time Daylight Saving Time Country Standard Time DaytightSaving Time Hours Time at Hours Effective Period Hours Time et Hours Effective Period from 1200 hra trom first and last day trom 1200 hours from first and last day GMT GMT GMT GMT GMT GMT Afghanistan 412 163 Lesotho 2 1400 Albania 1 1300 2 Mar 31 Sep 28 1991 Liberia GMT 1200 Algeria 1 1300 Libyan Arab Jamahiriya 2 1400 American Samoa 1 0100 Luxembourg 1 1300 2 Mar 31 Sep 28 1991 Andorra 1 1300 2 Mar 31 Sep 28 1991 Madagascar 3 1500 Angola 1 1300 Malawi 2 1400 Argentina 3 0900 Malaysia 8 2000 Aruba 4 0800 Maldives 5 1700 Australia Mati GMT 1200 Lord Howe Is 101 2 2230 Malta 1 1300 2 Mar 31 Sep 28 1991 New South Walesk 10 2200 Martinigue 4 0800 p nreo 9112 2130 Mauritania GMT 1200 10 2200 Mauritius 4 1600 South Au rae and Broken Hill 92 219 Mexico 10 2200 Baja California Sur and N Pacific Coast 7 0500 ve ua Cot Te A C 10 2200 States of Sinaloa and Sonora 8 2000 Baja California Norte Above Parallel 8 04 00 1 1300 2 Mar 31 Sep 28 1991 States of Durango Coahuila Leon 6 0600 Bananas excluding Turks and Caicos Islands 5 07 00 4 Apr 7 Oct 26 1991 Tamavipas Bahrain Island 3 1500 General Mexico States of Campeche 6 06 00 Bangladesh 6 1800 Quintana Roo and Yucatan Barbados 4 0800 Cities ol Ensenada Mex
84. ator s Guide The Process Manager Proc works closely with the Kernel to provide essential operating system services The Kernel is in fact bundled with the code for Proc and shares the same address space For these reasons Proc is a required system process in all operating images that are built You cannot start Proc after booting Most of the services provided by Proc reguire the use of memory within Proc The amount of memory used is controlled by tables whose sizes are set using command line options Some tables are fixed in size while others dynamically reguest more memory as needed Unlike other system processes Proc cannot grow its data segment at runtime This means that you must provide sufficient internal memory referred to as heap space when you build Proc into an OS image This heap space is provided as a number in a build file used by the buildanx utility The following formula may be used to approximate Proc s minimum heap space requirements heap num dev x 2 num shared segsx 1 num names X 8 total length of registered names num procs X 148 total length of unique command names each code or data segment x 12 prefix len num sessions X 20 num timers x 24 8000 4 The number of code and data segments will be determined by the programs you run A small model program reguires one code and one data segment While the system is running you may use the sin info utility to display the amount of free h
85. brary function An error isn t returned because a number of utilities make use of the chown library function which could result in many error messages being displayed All files under Dosfsys are owned by the superuser uid 0 group 0 with access to all If a request made to Dosfsys isn t supported the EOPNOTSUPP error code will be returned to the application making the request Examples of requests not supported by Dosfsys include 66 Partl Installation amp Configuration QNX Operating System 13313 3 3 3 33 3 33331 333313 3 3333331 3 3 3333313313 3313 33 IB DB II BI 3 3 3 BEI BIP III IDEE DEE III III II III III II III Setting up a DOS filesystem Administrator s Guide LINK BLOCK_READ BLOCK_WRITE MOUNT_PARTITION MOUNT_RAMDISK PIPE DISK_GET_ENTRY RECORD LOCKING If Dosfsys detects a corrupt filesystem it will return EBADFSYS at which point you may wish to run the CHKDSK utility under DOS to correct the problem The DOS filesystem structure is such that the root directory s size is fixed at format time and cannot be resized If it does become full an error will be returned ENOSPC Chapter 5 Setting up a Second Filesystem 67 CECCECELECECCCCECCECCGCGCECCCECCECECCECCECCCCCECCE 3 3 3 9 3 3 3 3 3 3 3 3 3 3 VDDD DD DDD DDT 3 1 9 3 J Chapter 6 Making Backups In this Chapter Introduction When to back up Backup formats Backup media Compression Archive examples Administrator s Guide
86. btain depends on the size of the input file and the distribution of character substrings and their probabilities Typically text files e g C programs are reduced by 60 to 75 while executable files are reduced by 50 Compression is generally much better than that achieved by LZW coding or by Huffman coding although it takes more time to compute An argument preceded by a defines the values to use for the Huffman table You may want to explicitly state these values in order to modify the compression algorithm 0 Normal exit 1 An error occurred 2 The last file grew after freezing cpio pax tar freeze 147 CLECCCECCECECEECECEECTCOCOCCOEEEOOCCCOECECEELCELCOCOEECOCCE 333 33 3 331133 3 331 3 33 3333 1313 333 33 3 3 331 33333 Syntax Options Examples Description Administrator s Guide Fsys Filesystem Manager QNX Fsys options 6 e cache size The size of the cache in units of 1K The default is Vg of the available free memory up to a maximum of 2048K ocb The maximum number of open control blocks that may be open at one time in the filesystem default is twice the number of processes i inode_table_size The maximum number of distinct files that may be open at any time default is of the number of processes 1 lock_table_size The number of locks that can be simultaneously outstanding default is 200 entries r ramdisk size The size of an optional ramdisk in units
87. cts files from the standard input which is assumed to be the product of a previous epio o Only files with names that match patterns are selected Multiple patterns may be 122 Part Il Managers Drivers amp Utilities QNX Operating System J3J333 3 3 333 31 3331131333 3313 3 3 3131 33 333 133133333 333339393933 33333 3 33 33 3 I 3 1 3 1 1 I I I III I III III Exit status See also Administrator s Guide cpio copy file archives in and out UNIX specified If no patterns are specified the default for patterns is to select all files The extracted files are conditionally created and copied into the current directory and possibly any levels below based on the options used The permissions of the files will be those of the previous cpio o invocation The owner and group of the files will be that of the current user unless the user has appropriate privileges which causes cpio to retain the owner and group of the files of the previous cpio o invocation The o option writes the archive to the standard output The p option pass reads the standard input to obtain a list of pathnames of files that are conditionally created and copied into the destination directory based upon the options used If an error is detected the cause is reported and the cpio utility will continue to copy other files The utility will skip over any unrecognized files encountered in the archive The following restrictions apply to the cpio
88. d a custom version of QNX QNX 115 copy file archives in and out UNIX 121 device manager QNX 125 console driver QNX 127 parallel device driver QNX 129 serial device driver QNX 131 DOS filesystem manager QNX 133 80x87 floating point emulator QNX 137 display compressed files QNX 139 create ONX disk partition QNX 141 compress and uncompress files QNX 145 Filesystem Manager QNX 149 Adaptec SCSI host adapter QNX 151 floppy disk controller QNX 153 driver for the PS 2 ESDI controller ONX 155 driver for the IBM PS 2 MFM Disk Controller QNX 157 driver for the PS 2 SCSI controller QNX 159 111 Fsys qic02 Fsys wd license lpsrvr melt Mouse netboot netnode netpoll pax Proc sinit tape tar termdef vol 112 Part Il Managers Drivers amp Utilities QIC 02 tape driver QNX 161 driver for PC AT fixed disk interface QNX 163 license software for use QNX 165 print server QNX 167 uncompress files QNX 169 mouse driver QNX 171 service boot requests from the network ONX 173 display or change the Arcnet node permit bitmap QNX 175 display or change default polling parameters of a node QNX 177 portable archive interchange POSIX 179 Process Manager QNX 185 system initialization QNX 189 control a tape driver QNX 191 read and write tape archive files UNIX 193 prompt for terminal type QNX 197 manage multi volume archives QNX 199 QNX Operating System P
89. d that specifying large output buffers significantly improves turnaround time when sending data to your printer Here s an example of a parallel device created with a 30K output buffer Dev par O 30000 Serial devices The Dev ser driver can support one or more serial ports The hardware interface to the computer consists of a UART Universal Asynchronous Receiver Transmitter for each serial port The driver will support any or all of the 8250 16450 or 16550 family of serial controllers Each UART exists in the I O address space of the computer at eight consecutive addresses The Dev ser driver is informed of the I O address range for each UART by command line arguments when it is started Just as important as the I O address is the hardware interrupt generated by each UART Most microcomputers provide several hardware interrupt signals on the bus labelled IRO2 through IRO15 except for interrupts 0 1 8 9 and 13 which are used internally by the system motherboard These interrupt signals are active high TTL logic signals on ISA buses which means that you can connect only one adapter card to any one interrupt signal Microchannel architectures MCA bus don t have this limitation Serial adapter cards come in various configurations Adapter cards with only one serial port typically offer only a limited set of choices for I O address and hardware interrupt The following table shows Chapter 3 Connecting Terminals Pr
90. e Dosfsys places an equal sign as the first character of the volume label name Dosfsys treats this directory entry as a zero length read only file whose permissions cannot be changed DOS doesn t support all of the permission bits that QNX does The DOS attribute bits are as follows READ_ONLY HIDDEN SYSTEM VOLUME_LABEL DIRECTORY ARCHIVE Chapter 5 Setting up a Second Filesystem 65 Setting up a DOS filesystem IS File ownership Error codes returned by Dosfsys Dosfsys uses the following mapping logic to handle the QNX to DOS attribute bit translations e if the entry is a directory set the DOS DIRECTORY file bit e ifthe entry is a file and if all of the QNX WRITE bits are off set the DOS READ ONLY bit The following mapping logic is used to handle the DOS to ONX permission bit translations e set the QNX READ permission bits for user group and other e ifthe entry isn t a volume label and if the entry isn t read only set the ONX WRITE permission bits for user group and other e if the entry is a directory set the QNX DIRECTORY and EXECUTE bits for user group and other e if the entry is a file set the QNX REGULAR FILE bit If a file is written to the DOS ARCHIVE bit is also set Although the DOS filesystem doesn t support user IDs and group IDs Dosfsys will not return an error code if an attempt is made to change the group ID or user ID with the chown utility or chown li
91. e detected on the SCSI BUS is labeled with its physical unit number Thus it s possible to have dev hd2 without having a dev hdl or a dev hd0 The current version of Fsys aha supports only PUNs Physical Unit Number later versions will support LUNs Logical Unit Number as well Since the x option may affect the operation of critical component functions you should use it with caution In particular you should ensure that your chosen values don t interfere with dynamic memory refresh cycles 152 Partili Managers Drivers amp Utilities QNX Operating System 1333333331 13 333313 313333 3 3333 23 3 323 33331 313 1 333333333393 933333939399 33939 3333 3 3 333 3 3 3 3 3 I 3 I I 3 3 9393 Fsys floppy floppy disk controller ANX Syntax Options Description Administrator s Guide Fsys floppy a controller i interrupt m maxsize n name a controller The controller address default is 1f0 hex i interrupt The interrupt level used by the controller default is 6 m maxsize The maximum number of blocks that will be transferred from the diskette to memory in one operation default is 36 n name The name of the block special device associated with the floppy The default is d which yields a device name of dev dn where n is a unit number assigned by Fsys Fsys floppy is the driver for IBM PC AT PS2 compatible floppy disk controllers These controllers are based on the NEC 765 FDC the
92. e total number of open files since files with links have only one entry and the same file opened by several processes at the same time has only one entry See also mount Fsys drivers e g Fsys wd 150 Part Il Managers Drivers amp Utilities QNX Operating System PIV III PDP D VDT III IDIIIIVIDPIITIIIIIIMIIIVIIDITIY 3333333323333 33 3 3 1 3 I I I II I III II I III 3 IIII Syntax Options Description Administrators Guide Fsys aha Adaptec SCSI host adapter QNX Fsys aha a controller i interrupt m maxsize n name x on off a i m n X controller interrupt maxsize name on off The controller address default is to scan for the AHA controller The interrupt level used by the controller default is 14 The maximum number of blocks that will be transferred from the SCSI controller to memory in one I O operation default is 36 The name of the block special device associated with the SCSI drives The default is ha which yields a device name of dev hdn where n is a unit number assigned by Fsys Specify the bus on time and bus off time The default values are 5 usec and 9 usec respectively These values control the amount of time the host adapter will own the bus The default values were chosen to prevent DMA overrun in Fsys floppy or any other DMA device If no other DMA device is used values of 11 and 4 respectively are appropriate for a
93. eap space available in Proc Proc 187 fECEECCECCOCECCOCECOCECOCCCOCCECECECOCOCCOCCOCCOCCCOCCOCOCE JIJI 3333333333333 Syntax Options Examples Description Administrator s Guide sinit system initialization QNX sinit i initfile r root s shell var value i initfile Open this system initialization file for defaults see the Description below r root Define an alias prefix for the filesystem root s shell Invoke this shell default is bin sh var value Define an environment variable Sinit r 1 sinit s bin myshell The sinit utility sets up the initial operating system environment immediately after boot It is usually bound to the operating system by means of the bui ldqnx utility The sinit utility attempts to find and open the system initialization file for your node This is a text file that contains a list of system initialization commands for which sinit invokes a shell to execute There are two types of boots a normal boot and an alternate boot All boots over the network are considered normal When you boot from disk you are prompted with the option of doing an alternate boot The type of boot you choose determines which system initialization file will be used If you choose sinit tries to find and open a normal boot etc config sysinit node Tf this fails it tries etc config sysinit an alternate boot etc config altsysinit If this fails it tries
94. er classes are alphabetic numeric and punctuation This is to lessen the chance of accidental discovery of another user s password and to discourage unsafe practices 20 Parti Installation amp Configuration QNX Operating System 33933939 39393933 33 3 DD 3 3 BI BI 3 JB 1 3 1 33 3 9 3 I 3 1 1 9 93 VPIIIPVIIPIIIIIIIIIIIIIIIIVIIIIIIIIIIIIIIIIIIIID The newgrp utility User and group IDs Administrator s Guide Security The passwd utility asks the user for the old password the new password then the new password again to verify it was entered correctly If the user is the superuser the old password isn t requested When the superuser adds a new account passwd prompts for the following information e user name e user ID e initial password e home directory e shell e group name If the initial password isn t entered the user account will be created without a password If the home directory doesn t exist it will be created under usr with the permission mask rwxr xr x If no shell is given the system default shell bin sh will be used If the group doesn t exist a new group will be created with one member namely this user If the group does exist this user will be added to it The passwd utility doesn t provide any mechanism for deleting accounts This function may be performed using a text editor on the etc passwd etc group and etc shadow files The newgrp utility changes the cur
95. er 5 Setting up a Second Filesystem 63 Setting up a DOS filesystem DOS partition types DOS text files DOS binary files This drive can now be adopted by Dosfsys For example Dosfsys s e dev hd0t5t1 Since Dosfsys doesn t automatically scan the dev directory for extended partitions scanning is done when s or S is specified you must specify the drives in these partitions on the command line Once adopted these drives will be accessed in the same way as standard DOS drives These are the standard DOS hard disk partition types Partition type Description 1 DOS primary partition 12 bit FAT 4 DOS primary partition 16 bit FAT lt 32M 5 DOS extended partition DOS 3 3 or later 6 DOS primary partition DOS 4 0 or later gt 32M DOS uses a structure for text files that s different from the one used in ONX by text files we mean line oriented files containing lines of ASCII text separated by line separator seguences In DOS each line of a text file is terminated with a carriage return seguence CR LF while in ONX each line is terminated by a line feed character LF The Dosfsys manager doesn t translate these files All files are treated as is Therefore you may need to use the QNX textto utility to convert your text files before copying them to or from QNX and DOS disks Note also that the text files created by some DOS programs may contain a SUB character Z as the last charact
96. er of the file This is also treated as is Since Dosfsys doesn t translate the contents of files binary files may be copied to or from the QNX DOS partitions as is 64 Partl Installation amp Configuration QNX Operating System 1093333733333 EVV TV OII II I IO III III II III II I DI I I II DVD 3 1 BI 9 3 3 3 3 DVD ED DV PDD DV VB TD DEI I DIEBE 3 39 3 3 31 3 QNX to DOS character and name mapping DOS volume labels DOS QNX permission mapping Administrator s Guide Setting up a DOS filesystem DOS doesn t permit certain characters within a filename it also doesn t allow certain filenames In DOS you can t include any of these characters in a filename ERAMOS B In DOS you can t use these filenames CLOCKS CON PRN NUL AUX COM1 COM2 COM3 COM4 LPT1 LPT2 LPT3 If you attempt to create a file that contains one of the invalid DOS characters or whose filename is invalid you will be denied access Since all DOS filenames and filename characters are allowed under QNX no validation is required on these filenames DOS also maps all alphabetical characters to uppercase so Dosfsys maps these characters to uppercase when creating a DOS filename it maps a filename to lowercase when retuming the filename to a QNX application DOS uses the concept of a volume label which is an actual directory entry at the root of a DOS filesystem To distinguish between the volume label and an actual DOS fil
97. er terminates that shell session the user won t be able to log back in To automate this login process you can use the tinit utility This utility will watch a specified device waiting for any key to be pressed on that terminal It will then start a login automatically When the user has logged in and then logged off again tinit will once again wait for another key to be pressed To start logins when a data key is pressed on two serial devices called dev ser1 and dev ser2 you can use the following command tinit T dev serl dev ser2 amp Suppose instead you wanted logins to be automatically started without first waiting for the user to press a key You would use the t option tinit t dev serl dev ser2 amp You don t have to always start up login You can specify any program or even specify a different program on each device In some environments a canned application is always expected on a given terminal For more information see the documentation for tinit in the Utilities Reference It s fairly easy to configure hardwired terminals since all possible parameters are known Modems on the other hand present special problems since they can have different configurations at different times For example most modems will answer calls at one of several baud rates 300 1200 2400 etc You can t always know in advance the baud rate of an incoming call A special utility called modem is provided in ONX to respond
98. er the communications link QNX is ideally suited for communicating with such modems A nine pin straight through cable is used to connect the modem to the computer Gnd Tx Rx RTS l Computer cts High speed pu modem DSR DTR CD RI Cabling assignments for linking a computer to a high speed modem 36 Partl Installation amp Configuration QNX Operating System PPV EPP FP PFET PPP PPT PPP PP PET TET DT I I I I I I I 3 33 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 LES ap EETPIENI III Standard modems Serial printers Administrator s Guide Serial devices You should enable hardware handshaking in both directions using the stty utility stty ihflow ohflow lt dev serl Traditional modems are less sophisticated Once a communications channel is established at one of the baud rates supported by that modem all subsequent communication over the modem link takes place at exactly that baud rate In other words all transmitted data is simply passed through the modem link at the same rate that it s presented Although these modems don t typically support hardware flow control they often won t function properly unless all four flow control lines are connected A nine pin straight through cable is also used for these modems Gnd Tx RTS Computer CTS DSR DTR CD RI Standard modem Cabling assignments for linking a computer to a standard modem No flow contro
99. ers As a system administrator you should ensure that these permissions are maintained QNX is shipped with a default password database that includes etc passwd and etc group The etc shadow file isn t shipped because the accounts initially don t have passwords associated with them The first job after the system is installed is to set up passwords for all the system accounts and to define any user accounts You perform both of these functions with the passwd utility By convention user accounts have a user ID greater than or equal to 100 Part Installation amp Configuration QNX Operating System PUVVVIIIIIPVIVDPIIPIIVIDPIIIVIIIIIIIFIIIIIIIIIIIIY J13 33333333JJ 3J 33 33333 3 3 333 3 3 33333J3 3 3 J 3330 Default password files Enabling accounting Record format Administrator s Guide Accounting file The default etc passwd file that was shipped with your QNX system contains the following root 0 0 bin sh The default etc group file contains the following root 0 root Accounting file Accounting information is logged to the etc acclog file If this file doesn t exist all accounting information will be discarded This is the normal mode of operation after ONX has been installed For most realtime systems this default of discarding accounting information is recommended If you have a dial up line to a computer or if you run QNX in a network of many users you may wish to change this default
100. ev hd0t77 across the network chkfsys dev hd0t77 Part Installation amp Configuration QNX Operating System 3333332333332 I VV II II I I II I I DI I I I I I I I I ID 3333333333313 V333 VDIIIIDIIIIDIIIIIID III Recovering lost files and directories If the disk is unrecoverable If the filesystem is intact Administrators Guide In either case you should make note of any problems reported and allow chkfsys to fix as much as it can What you do next depends on the result of running chkfsys If for any reason your disk is completely unrecoverable read the next section Recovering lost files and directories In some cases you may need to reinstall QNX from floppy and restore your disk from your backup files If significant portions of the filesystem are irreparably damaged or important files are lost then restoring from backup might be your best alternative If your filesystem is intact yet the machine still refuses to boot from hard disk then either of the following is probably damaged e the partition loader program in physical block 1 e the QNX loader in the first block of the QNX partition To rewrite a partition loader use fdisk fdisk dev hd0 loader To rewrite the ONX loader use dinit dinit b dev hd0t77 You should now be able to boot your system Recovering lost files and directories You may sometimes find that files or directories have been completely lost due to disk corruption If after
101. events you from inserting out of sequence media The vol utility will be default step over block one of all media This is important for floppies and cartridge disks that contain a QNX signature in block one This signature contains the size of the diskette 360K 1 2M etc and allows for automatic remounting of removable media by the filesystem Quantum ships its distribution diskettes using pax to create an archive freeze to compress the data and vol to write to the floppies Chapter 6 Making Backups 71 Backup media Filesystem backups Floppy 72 If you wish to save data for restoration on a UNIX system other than QNX don t use freeze or vol since you won t find those utilities to do the restore at that end Instead use pax to save and restore directly to the target media You back up to a filesystem by copying files probably with the cp utility If your destination media is a floppy diskette the cp utility will prompt you for more diskettes but remember that no single file can be larger than the diskette size If you wish to back up to floppy we recommended that you use one of the archive utilities Backup media Your choice of backup media will be determined b y available hardware and cost There are four common choices e floppy e tape e removable disk e fixed disk Floppies are the most widely available device for backups Their major shortcoming is their limited size Since the QNX pax and vol
102. for valid DOS drives to adopt It looks for the following device names Device name Drive on disk assignment dev d0 dos a dev dl dos b dev hd0t1 dos c dev nd0t 4 dos c dev hd0t6 dos c dev hd1it1 dos d dev hdit4 dos d dev hdit6 dos d Dosfsys can adopt up to eight drives a toh As mentioned above Dosfsys will adopt the name dos as a system prefix It will also manage each specific drive s name as dos a dos b etc These names aren t registered in the system prefix tree but are kept internally by Dosfsys This will be transparent to the user except for the fact that the user won t be able to create files or directories at the dos root A DOS device could be one of the following e a DOS partition on a hard disk e afloppy diskette e an image of a DOS partition or diskette To create an image of a DOS diskette or DOS partition you use the QNX ep utility For example to copy an image of a DOS floppy in your floppy drive 0 you could use the following Part Installation amp Configuration QNX Operating System 3232332373330 3 II 3 3 1 JB 1 I 9 3 3 31 3 3 3 1 I 3 3 1 1 3 3 III 313 3 33 33 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 BI III IB 339313393 DOS version support Administrator s Guide Setting up a DOS filesystem cp dev fd0 usr qnx dosa and then invoke Dosfsys as follows Dosfsys a usr qnx dosa The same could be done with a hard disk partition Dosfsys will
103. g up to or restoring from 73 tapeutility 73 tarutility 71 termdef utility 42 terminals automated login 40 capabilities 41 configuring for users 39 connecting 39 defining type 42 ending communication 34 flow control between modems and terminals 35 hardwired terminals 42 launching custom applications 40 214 Index querying for type 42 terminfo database 41 see also serial devices terminfo database 41 time zones 13 14 coordinated universal time UTC 13 date and time establishing 14 daylight savings time changing to or from 201 202 daylight savings zone defining 202 defining 10 establishing 13 not setting effects of 13 standard zone defining 202 time establishing 14 TZ environment variable 201 202 UTC 13 tinit utility 41 transmission of data slowing down 35 troubleshooting serial device problems 42 TZ environment variable 201 contents of 202 U UARTs 31 hardware interrupts generated by 31 update system see QUICS user accounts see accounts user IDs 21 username entering 20 UTC see time zones utilities finding information about users 24 QNX Operating System J33133333 3333 2333 33 3133 331333 3 3 333 3333 3333 33 PABABA NAAN f I DIVIDIDA IDIBISIDIDID OD fi l JABANG r I IBID i 31313 r l 300000 V volutility 12 71 Z zap utility 94 96 Administrators Guide Index Index 215 CCCCGCGEG GL GECGGCGGEGTGGCGCECGCGCCGCEEGGGEGCEETCECE 329
104. h major ONX service is provided by a process You can add or delete an operating system service by adding or deleting the process that manages it Most processes may be started after the system boots and as such do not need to be included in an image For example let s say you ve booted from disk and the boot image didn t contain the DOS filesystem manager Dosfsys At this point you re getting your files and commands from a local ONX filesystem You could start Dosfsys by typing its name on the command line and running it as a background process as follows Dosfsys It s necessary to start some processes before the operating system loads For example if a diskless workstation boots over the network it will need to have a Network Manager in the image to access the remote filesystem Likewise if you boot from a hard disk you can t start a filesystem by loading itoff the disk since you don t yet have a filesystem In this case you would build an image containing Fsys Fsys driver and mount so that the filesystem is available immediately upon loading buildgnx 115 buildqnx build a custom version of QNX QNX As a general rule you should build into the image only the minimum services needed and start other services after boot In some environments you may want to freeze an OS and a larger number of services by building a large image that you don t change If you re in a special realtime environment where dynamic l
105. handle these images just as it would the actual device For all non removable devices Dosfsys immediately reads the DOS boot parameter block BPB as well as part of the file allocation table FAT at startup For removable devices the BPB and the FAT are read only when the drive is being accessed When Dosfsys has a non removable device open the device is locked for READ WRITE so no other process can access this device without going through Dosfsys Removable devices are kept open and locked only during accesses e g during reading or writing to the disk Note that unless you specify the R option all drives have READ WRITE access The Dosfsys manager supports all DOS partitions formatted with DOS 2 1 or later including standard primary DOS partitions and DOS large partitions DOS 4 0 gt 32M Hard disks 51 4 floppies and 312 floppies are supported The Dosfsys manager also supports DOS extended partitions type 5 To make these extended partitions accessible to Dosfsys you must mount them explicitly via the ONX mount utility To do this you use mount as follows mount p dev hd0t5 This will mount all real partitions within the DOS extended partition For example after issuing the above mount command you might see the following drive mounted dev hd0t5t1 The ending t1 indicates that this is a type 1 DOS partition within the type 5 extended partition this is the way DOS handles extended partitions Chapt
106. he time of this printing the QUICS computer supports seven modem lines and eight X 25 channels into the Datapac public packet switching network All modems will support a variety of baud rates and data compression protocols The following table shows the hardware configuration at the time of printing Hunt group Baudrates Modemtype Protocols 613 591 0934 19200 to300 HST 9600 MNP5 ARO 613 591 0935 38400 to300 HST 14 4K MNPS ARQ v42bis 613 591 0940 38400 to 300 HST Dual Std MNP5 ARQ v42bis v32 613 591 1735 38400to300 HST Dual Std MNP5 ARQ v42bis v32 613 591 3009 38400 to 300 HST Dual Std MNP5 ARQ v42bis v32 v32bis 613 591 3128 19200 to 300 Telebit MNPS PEP 613 591 6093 19200 to 300 Telebit MNPS PEP The modems are on a hunt group with the following primary number 613 591 0934 First number of the hunt group Chapter 9 The Quantum Update System 107 How to phone us Step 1 Step 2 108 On the update system we maintain an up to date configuration on the number of modems their types and phone numbers You can read this when you give us a call To connect to QUICS via X 25 you have to make a pre paid call or register with us for an X 25 account number allowing you to make collect calls Our X 25 network address is 3020 85701416 Quantum s Datapac address Datapac s network code How to phone us Since gtalk is shipped with every system we describe how to contact us from within gtalk We assume that your
107. icali San Felipe 8 0400 7 Apr 7 Oct 26 1991 Belgium 1 1300 2 Mar 31 Sep 28 1991 Tijuana Belize a 0600 Midway Island n 0100 Benin Peoples Rep Dahomey 1 1300 Monaco 1 1300 2 Mar 30E Sep 29 1991E Bermuda 4 0800 3 Apr 7 Oct 26 1991 Mongolia Ulan Bator 8 2000 Bhutan 6 1800 Morocco GMT 1200 Botivia 4 08 00 Mozambique 2 1400 Botswana 2 1400 Myanmar 612 1830 Brazil B East Including All Coast and 3 0900 Namibia 2 1400 Brasitia Nauru Republic Of 12 2359 West 4 08 00 Nepal 534 1745 Territory of Acre 5 0700 ds 1 1300 2 Mar 31 Sep 28 1991 Fernando De Noronha 2 1000 Netherlands Antilles incl Southern St Maanen 4 08 00 British Virgin Islands 4 08 00 New Caledonia 1 2300 Brunei Darussalam 8 2000 New Zealand Excluding Chatham ts 12 2359 Bulgaria 2 1400 3 Mar 31 Sep 28 1991 Chatham Is 1234 0045 ina Faso GMT 1200 Nicaragua 6 0600 Burundi 2 1400 1 1300 Cambodia 7 1900 Nigeria 1 1300 Cameroon aka 1300 Niue Island n 0100 Canada da Islandof 3112 0830 2 1 2 Apr 7 Oct 26 1991 Norfolk Island 1112 2330 4 0800 3 Apr 7 Oct 26 1991 Norway 1300 2 Mar 31 Sep 28 1991 Easton 5 0700 4 Ar 7 Oct 26 1991 Oman 4 1600 Central 6 0600 5 Apr 7 Oct 26 1991 Pacific islands Trust Territory Mountain 7 0500 6 Apr 7 Oct 26 1991 Caroline Is Exciuding Ponape Is Kusaie 11 2200 Pacific 8 0400 7 Apr 7 Oct 26 1991 and Pingelap Yukon Territory
108. ier of the user running the program rather than those on the archive This option is valid only with the x option Write named files to the end of the archive List the names of all of the files in the archive Add named files to the archive if they aren t already there or if they have been modified since last written into the archive This implies the r option tar 193 tar read and write tape archive files UNIX w Print the action to be taken followed by the name of the file then wait for the user s confirmation If you enter a word beginning with y the action is performed Any other input means no This option is invalid with the t option x Extract named files from the archive If a named file matches a directory whose contents had been written onto the archive that directory is recursively extracted If a named file in the archive doesn t exist on the system the file is created with the same mode as the one in the archive except that the set user id and get group id modes are set only if you have appropriate privileges If the files exist their modes are not changed except as described above The owner group and modification time are restored if possible If no filename argument is given the entire contents of the archive is extracted Note that if several files with the same name are in the archive the last one will overwrite all earlier ones v Be verbose Usually tar works silently but the v opti
109. ime clock These two lines should be the first in the file for machines that boot from hard disk They are optional in a machine that boots over the network since the machine inherits this information from the node it boots from export TZ EST5DST4 M4 1 0 3 M10 5 0 3 rtc hw The following lines start the Device Manager and the console driver with eight virtual consoles then instruct the Shell to reopen its standard I O through the new console device 10 Part Installation amp Configuration QNX Operating System 33333331333 3333 3 3 3 333 1 33 333 3 331 33133 3 3 13 3 31 33 333 33939 333939393 393933 3 I I 3 I III 3 III 33 3 I 3 3 3339393 Administrator s Guide The system initialization file Dev Dev con n 8 reopen dev conl The following lines start up any other device drivers you may need They start both a serial driver which will look for COM1 and COM2 and a parallel driver These drivers will terminate if they can t find the needed hardware Dev ser 4 Dev par If you started Dev ser you might need to use the stty utility to change the default line configuration For example the following lines change the baud rate to 19200 stty baud 19200 lt dev serl stty baud 19200 lt dev ser2 etc If your programs use floating point and you don t have an 80x87 chip you need to start the floating point emulator emu87 4 The following line starts a login on the first console and arms all other c
110. ing notation If no pattern is specified the default is which selects all files pax 181 pax portable archive interchange POSIX Modes of operation If you don t specify r or w then pax lists the contents of the specified archive In this mode pax lists normal files one per line Hard link pathnames are listed as pathname linkname where pathname is the name of the file being extracted and linkname is the name of a file that appeared earlier in the archive If v is specified then pax lists normal pathnames in the same format used by the 1s utility with the 1 option Hard links are shown as lt ls 1 listing gt linkname w Write the files and directories specified by pathname operands to the standard output together with the pathname and status information prescribed by the archive format used A directory pathname operand refers to the files and recursively subdirectories of that directory If no pathname operands are given then the standard input is read to get a list of pathnames to copy one pathname per line In this case only those pathnames appearing on the standard input are copied r Read an archive file from the standard input select for extraction only those files whose names match any of the pattern operands The selected files are conditionally created and copied relative to the current directory tree subject to the options chosen By default the owner and group of selected files wi
111. ing by 1024 a b suffix multiplies blocking by 512 and an m suffix multiplies blocking by 1048576 1 megabyte In ONX the maximum buffer size is 32K 1 If not specified blocking is automatically determined on input and is ignored for rw copy files c Complement the match sense of the pattern operands d Don t create intermediate directories not explicitly listed in the archive This option is applied only if the r option is specified archive Use archive as the pathname of the input or output archive overriding the default of standard input for r or standard output for w i Interactively rename files Substitutions specified by s options are performed before requesting the new filename from the user A file is skipped if an empty line is entered If EOF is encountered pax exits with an exit status of 0 pax 179 pax portable archive interchange POSIX 1 m n o P When possible link rather than copy files Don t keep file modification times When r is specified but w is not treat the pattern operands as ordinary filenames Only the first occurrence of each of these files in the input archive is read The pax utility exits with an exit status of O after all files in the list have been read If one or more of the files in the list aren t found pax writes a diagnostic to standard error for each of these files and exits with a nonzero exit status The filenames are compared before any
112. internal fixed disk a SCSI drive Unlike floppies and tapes a removable hard disk lets you avoid using the archive utilities like pax Instead you d likely use cp to copy your data to a real filesystem on the cartridge This allows you to recover single files very easily and quickly You can place a second hard disk in your machine or you can back up to a hard disk on another machine in the network This will give you an online backup However it s still a good idea to maintain off site storage Compression You can use a compression utility to reduce the amount of space required to store data The amount of compression will depend on the nature of the data you re saving Some databases containing large amounts of null data may compress up to 90 Other data might compress less than 10 Although compressing may save media space it has two side effects e Compressing requires a fair amount of computation and may slow down the saving of data e You can t recover compressed data should a defect develop such as a bad block on your saved backup media Potentially all data following a bad block can be lost In comparison uncompressed data will simply have a hole in the middle You may use the freeze utility to compress your data and the melt utility to restore it Both these utilities will act on a stream of data as well as on files This ability to act as a filter lets you connect them to Part Installation 8 Configuration Q
113. inters amp Modems 31 Serial devices Multi port serial adapters Typical hardware some commonly found combinations but we recommend that you read the hardware documentation carefully to discover the choices available on a given manufacturer s adapter card Name Address Interrupt COMI 3F8 IRQ4 COM2 2F8 IRQ3 COM3 3E8 varies COM4 2E8 varies You can usually configure multi port serial adapters to respond to a wide range of VO addresses The adapters may also give you considerable flexibility in selecting hardware interrupts A good choice for I O addresses is often the 280 through 2BF range Because of the limited number of hardware interrupts available these cards will often OR the interrupt lines from the individual UART s into a single interrupt connected to the bus QNX allows for many serial ports to share the same interrupt since Dev ser will check every UART that shares an interrupt The following diagram shows a typical configuration of serial installation adapter cards in a QNX system CPU Bus Adapter cards Serial devices COM1 32 Parl Installation amp Configuration QNX Operating System J J33113 333 313333 333333133331333 3 3 3 3 3 11333 3 333 3 3 333 333 3 3 03 3033 30 303 30303033 0303 333 3 30333 39 033 0303333 IS The RS 232 serial protocol Electrical interface Administrator s Guide Serial devices For proper operation each serial channel must ha
114. is moved into the inodes file 90 Parti Installation amp Configuration QNX Operating System J 31333 3 3313 333 3 331 3331331 3333 3 31 3 3 31331 3 3 1133 PRVFTFFVIVIIIIIIIVIIIIIIIIIIVIIIFIIIIIINIAIIIIIIIAS Overview of QNX 4 disk structure directory entry dinode_ndx ae 88R848888R888B80o Extent blocks Extent blocks are used for any file that has more than a single extent The directory entry di xblk points to one of these extent blocks which in turn defines where the second and subseguent extents are to be found An extent block is exactly one 512 byte disk block with the following form xblk next xblk xblk prev xbik Xblk_spare Bl xblk_num_blocks xbik xtnts 0 24 STATS 488 xolk xnis B 496 4amXbk 504 1st xbk only Administrators Guide Chapter 8 Disk amp File Recovery 91 Overview of QNX 4 disk structure Each extent block contains forward backward pointers a count of extents a count of all the blocks in all the extents defined by this extent block pointers and block counts for each extent a signature IamXblk The first extent block also contains a redundant pointer to the first file extent also described within the directory inode entry This allows you to recover all data in the file by locating this block alone Files Files or file extents are groupings of blocks described by directory inode entries they have no structure imposed
115. is moved to a file named by year and month and a new empty log is created mv etc acclog etc acclogs 9106 touch etc acclog Since the data in this file is very regular you may use the freeze compression utility which will achieve very high rates of compression on the file This can significantly reduce disk space requirements if you keep the saved logs online or save them to a floppy Remember to move the file before compressing it Never compress etc acclog directly Here s an example of the recommended compression procedure mv etc acclog etc logs 9106 touch etc acclog freeze etc logs 9106 Note also that other utilities possibly third party may add their own accounting records to the etc acclog file Utilities may also log problems or unexpected events to the etc syslog text file Chapter 2 Setting up User Accounts 27 KECECECCGCGCECECCGCGECECGCCCCGCGCCCCGGECECECCECECE 33323 3 33 3333 3 333 II III III III 3333933333 3 II Chapter 3 Connecting Terminals Printers amp Modems In this Chapter Starting device drivers Parallel devices Serial devices _Administrator s Guide Chapter 3 Connecting Terminals Printers amp Modems 29 Parallel devices Single parallel port Multiple parallel Starting device drivers A QNX system will usually contain one or more terminal devices All such devices are managed by the Dev process This process must be started first before any device drivers are
116. ishing time zones and time changes e g daylight savings time You ll find a time zone chart and a map at the end of this appendix You specify time zone information via the TZ environment variable This variable contains a coded string that lets you specify the time zone as well as the rules for changing to and from daylight savings time if used in your area The value of TZ has the following form spaces have been inserted for clarity std offset dst offset rule where std standard time offset offset of standard time from UTC time dst daylight savings time offset offset of daylight savings time from UTC time rule specifies when to change between standard time and daylight savings time In more detail TZ is coded as follows TZ std offset dst offset start time end time The time zone chart was excerpted from OAG Desktop Flight Guide Worldwide Edition May 1991 Vol 16 No 3 pp 1278 1279 published by Official Airline Guides Inc Oak Brook Illinois Administrators Guide Time Zone Rules 201 Appendix A 202 Appendix A The components of the TZ environment variable string are defined as follows std and dst offset rule Defines a string used to identify the time zone e g EST All characters are allowed except for a leading colon digits a comma a minus sign a plus sign ASCII NUL std defines the name of the standard time zone and dst defines the name
117. it translations 66 QNX to DOS character and name mapping 65 drivers see device drivers DSR 34 DTR lines 34 E electronic mail sending to Quantum employees or other users 106 see also QUICS embedded images 83 emu87 utility 11 environment variables defining 12 etc acclog file see accounting file executable files executing with privileges of owner or group 22 extent blocks 91 F fdisk utility 93 file maintenance utilities 93 chkfsys 93 95 Index 209 Index dinit 93 fdisk 93 spatch 94 97 102 zap 94 96 file permissions 22 filenames DOS 65 longer than 16 characters 90 files access fields 22 accounting file 25 27 blocks examining 97 deleted 96 DOS text files 64 executable files 22 extent blocks 91 links 90 maintenance utilities 93 multiple extents 91 permissions 22 recovering 85 103 recovering if deleted 96 recovering if lost 101 103 removing without returning used blocks 94 structure 92 filesystems backups 72 how data is stored on disk 86 restoring 94 setting up second system 57 67 see also DOS filesystems partitions fixed disks backing up to or restoring from 74 see also backups floating point emulator 11 floppies backing up to or restoring from 72 see also backups floppy driver starting 12 free software 106 freeze utility 75 210 index G global name server selecting a machine as 12 greenwich mean time see time zones UTC group IDs 21 H hard disk booting see booting hard dis
118. it with a return code which is the size of the indicated entry in megabytes where type is the partition specifier e g t77 as in the following list t77 QNX 4 t7 t8 ort9 QNX 2 t1 t2 t3 ort4 DOS size is the size of the partition in cylinders e g 680 or megabytes e g 72m slot is partition number 1 2 3 or 4 gt If you wish your disk to contain both QNX and DOS partitions we recommend that you create the DOS partition first using DOS commands Exit status O Successful gt 0 An error occurred See also dinit fdformat mount Caveats After changing any partition that is mounted you must reboot If you don t reboot you could damage the filesystem on the new partition 144 Partili Managers Drivers amp Utilities QNX Operating System S 33333333 133 303 333 3 3 3 9 3 3 3 3 3 I I 1 I II I I I I 3 3 I I 15 freeze compress and uncompress files QNX Syntax Options Examples Administrator s Guide freeze Vcdfv n1 n8 filename v Display the program s version number and compilation options d Uncompress the files from the archive melt f Force creation of the F file This option creates the F file even if one already existed without prompting you for confirmation The F file will be created even if the compressed file is larger than the original c Write the results of the freeze melt operation to standard output No files are changed
119. ith several of these files with names such as usr 1ib terminfo q qnx the QNX console usr lib terminfo v vt100 a VT100 terminal A QNX program will access the appropriate file in the database provided that the TERM environment variable has been set If you don t have a terminfo file for your type of terminal there are several things you can try e access the Quantum Update Service QUICS and download a terminfo file if it exists e access another UNIX system and look for the appropriate terminfo file e use infocomp and tic to make your own terminfo file based on the reference manual for your terminal Chapter 3 Connecting Terminals Printers amp Modems 41 Serial devices Defining terminal type Troubleshooting serial device problems 42 Full screen programs use the TERM environment variable to determine which type of terminal is currently used They also automatically adjust their behavior to properly display data and interpret keys from that type of terminal This all works as expected provided that the TERM environment variable is properly defined For hardwired terminals running canned applications you can preset this environment variable when the application is launched For example TERM vt100 ontty dev serl custom_application However users logging in via login through tinit represent a special problem If the type of terminal is known then tinit can be told to define this environment
120. ities Reference 1p 1pc 1pq 1prm Administrator s Guide losrrr 167 CEECECCOCOECEECCOCOCECCOCEOCECOCOCOCEOCOCECOTCECOCCOCCECECCE 3333333333333 393333 3 3 3 33 I 3 1 I 3 1 3 3 I 33 339 I 3 II 939393 Syntax Description Administrator s Guide melt Vcfv filename See the freeze utility melt uncompress files QNX melt 169 FELECECEECOEOCECELELCECETCOECEOCOCCOCECCECOLCCOCCECOCEEL 333 333 33 3 33331 3333 3 3 3 3 333 3 33 3 3 33 33 33333 Syntax Options Examples Description Administrators Guide Mouse mouse driver QNX Mouse b i interrupt p address g number n name s baud x y type lt serial_port amp Mouse test b Assume a bus mouse default is serial g number The gain to apply to mouse motions default is 1 i interrupt The hardware interrupt to use for the bus mouse default is 5 p address The I O address of the bus mouse in hex default is 23C n name The name to register default is qnx mouse s baud Set the serial port to this baud rate default is 1200 baud x Reverse x motions y Reverse y motions type The type of mouse see Description lt serial port The port your serial mouse is attached to Assume a Microsoft Serial Mouse on dev ser1 Mouse msoft lt dev serl amp Assume a standard bus mouse Mouse b msoft amp Test an installed mouse driver Mouse test The Mouse driver manages the mouse on a QNX syste
121. k QNX supports four character sizes You choose the size of data character with the stty utility stty bits 5 stty bits 6 stty bits 7 or stty bits 8 default This parameter defines how many bits following the start bit will be used to form the least significant portion of a received character It s possible to transmit data that is followed by either one or two stop bits Two stop bits are used only to slow down the overall transmission of data so that the remote end has a chance to keep up Using stty you specify one of these stty stopb 1 default stty stopb 2 To disable the transmission of parity bits and suppress the checking in hardware of received parity bits you specify stty par none default If parity is used you specify one of the following values Chapter 3 Connecting Terminals Printers amp Modems 35 Serial devices Baud rate Connecting serial devices High speed ECC stty par odd stty par even stty par mark stty par space You can specify the baud rate with the baud number option of the stty utility stty baud number QNX defaults to 9600 baud High speed error correcting modems are becoming very modems sophisticated they work best when all hardware handshaking signals are respected These modems often communicate with the host computer at a fixed high speed baud rate e g 19200 baud and use the RTS CTS handshaking lines to regulate the actual flow of data ov
122. k of a floppy diskette For this reason vol by default skips the first block of each volume it writes to If you don t want it to skip the first block you can specify the s option with a value of zero If you specify s 0 no blocks will be skipped and no header will be written at the beginning of each volume If you specify the s option when writing an archive remember that you must also specify the same number of blocks when the archive is retrieved If you want to save files larger than a single volume you specify the w option The vol utility will read the standard input and write it onto a block special device usually diskettes pausing at the start of each one If you want to reassemble and extract archives split across several volumes you specify the r option The vol utility will read from a block special device and write the output in a single stream to standard output vol 199 vol manage multi volume archives QNX See also cpio pax tar Caveats If you tell the vol utility to skip zero blocks on a floppy s 0 it might not be able to determine the media characteristics on retrieval The vol utility does not format media 200 Part Il Managers Drivers 4 Utilities QNX Operating System 3333233333203 3322 III II ITI III III II III III III 33 333 333333 3393933333333 III EI 3 3 3 3 3 33 3 3 3 3 Appendix A Time Zone Rules This appendix describes the various rules used for establ
123. kfsys at some point to recover the lost blocks on the disk If you re running an application that can t afford downtime you might not be able to shut down your system long enough to run chkfsys In order to provide a comprehensive verification of the disk chkfsys normally requires exclusive use of the filesystem But you can identify potential problems in a live system by using a special read only mode of chkfsys chkfsys f dev hd0t77 The ix mode won t be able to correct problems but it will give you a feeling for the overall sanity of your filesystem If serious problems are detected that must be fixed right away you can use another special mode the Rambo mode Chapter 8 Disk 8 File Recovery 95 Disk recovery procedures Recovering deleted files 96 chkfsys R dev hd0t77 Remember that you must not use Rambo mode unless you are sure that e the affected files are not presently opened e the affected files will not be opened during the rebuild process e any files currently opened will not grow during the process Using Rambo mode will fix most errors but since you re fixing the disk underneath a live filesystem with opened files it will not e attempt to recover bitmap blocks e check for block allocation errors e attempt to rebuild the inodes file There is some risk to running chkfsys on a live system both chkfsys and the filesystem are reading and possibly writing the same blocks on
124. ks see disks hardware adapters 31 hardware interrupt generated by each UART 31 images build file constructing 78 83 buildgnx utility 78 creating through buildqnx or the Makefile 78 disk images 80 embedded images 83 heap size setting 79 image filelocation 78 local memory allocating 79 network images 82 processes required for hard disk booting 80 processes selecting 79 installing on a hard disk 4 interrupt generated by each UART 31 QNX Operating System 3333233333333 13 3 3 3 3 3 3 1 3 3 J III 3 1 3 3 1 1 1 I I 3 3 1 I 1 III PESIS ESER ESENES ES DIDI III J 4 3339 3 13 33 13 l ip oe be hee j 1 t 33 33 I t 311 L licensing 15 17 application licensing 16 expanding your license 17 license utility 17 operating system licensing 15 links 90 loader block 87 login utility 20 login automated 40 login starting on consoles 11 lost found directory 102 lp utility 47 lpc utility 48 lpq utility 47 lprm utility 47 lpsrvr utility 48 55 mail see QUICS email Makefile examples 80 location 80 macros for changing defaults 80 melt utility 75 modem utility 40 modems configuring 40 connecting 36 37 detecting incoming call 35 dial up access 40 establishing connection with another modem 35 flow control between terminals and modems 35 hardware handshaking 37 Administrator s Guide Index high speed error correcting 36 standard 37 terminal type guerying user
125. l need be enabled with stty when using these modems Serial printers are usually bidirectional devices Data flows from computer to printer as expected but since printers can t keep up with the host computer serial printers often use software flow control to Chapter 3 Connecting Terminals Printers amp Modems 37 Serial devices regulate the flow of data In other words they transmit XON and XOFF characters back to the computer Some printers use the hardware handshaking lines for this purpose some support both forms of flow control To be safe you should connect all nine signals although printers that support only software flow control may function just as well with a three wire cable Rx Tx and Gnd Also since printers are usually configured as Data Terminal Equipment DTE just like the host computer you may need to use a null modem cable Gnd ii Tx mr er des RTS CTS DSR DTR cD RI Computer Null modem cable Serial printer Cabling assignments for linking a computer to a serial printer If the printer uses you use software flow control stty osflow lt dev serl hardware flow control stty ohflow lt dev serl both software flow control both stty options and hardware flow control 38 Partl Installation amp Configuration QNX Operating System 3373337332230 3033033 III III II III III III III III II 13 3 3
126. l state of DSR to off Set all subsequent ports to raw mode default Disable hardware flow control on all subsequent ports The size of the raw input buffer default is 2048 The name of the device default is ser The size of the raw output buffer default is 2048 Set initial state of RTS to off The initial baud rate for subsequent ports default is 9600 Set initial state of DSR to on Set all subsequent ports to edited mode Enable hardware flow control on all subsequent ports default The flow control high water mark for subsequent ports default is of input buffer The flow control low water mark for subsequent ports default is V4 of input buffer Set initial state of RTS to on Scan for COM1 and COM2 Dev ser Dev ser 131 Dev ser serial device driver QNX Description See also Set port at 3F8 as a raw device at 1200 baud and port at 2F8 as an edited device at 9600 baud Dev ser E b 1200 3 8 4 e b 9600 2f8 3 amp Specify a standard COM1 port at 3F8 as well as four ports on a multiport card Dev ser 3f8 4 280 3 288 3 290 3 298 3 The Dev ser driver manages all serial devices in a QNX system If you don t specify any serial ports on the command line Dev ser scans the hardware looking for a port at 3F8 COM1 or a port at 2F8 COM2 or both If COM1 is present Dev ser assumes that it uses interrupt IRO 4 if COM2 is present Dev ser assumes that
127. le of a directory or some other critical block Again the utilities we ve provided can help you determine the extent of such damage You can often rebuild the filesystem in such a way as to avoid the damaged areas In this case some data will be lost but with some effort a large portion of the affected data may be recovered Overview of QNX 4 disk structure In this section we describe how the QNX filesystem stores data on a disk Reading this section should enable you to recognize and possibly correct filesystem damage if you ever have to rebuild a filesystem 86 Partl Installation amp Configuration ONX Operating System 3333330323030 0 III 3 I III III I II I III II 1 1 29393 III 33333333 3 3 33333 33 3 33 3 3 30 03 3 3 93 93 33 3 13 33 33 3 Partition components Loader block Root block Administrator s Guide Overview of QNX 4 disk structure If you have a C development package the header file lt sys fsys h gt contains the definitions for all terms used in this section For an overall description of the QNX filesystem see the User s Guide Chapter 5 The Filesystem Manager A QNX filesystem may be an entire disk in the case of floppies or it may be one of many partitions on a hard disk Within a disk partition a QNX filesystem contains the following components The following blocks are always found in order on a QNX 4 disk partition 1 loader block 2 root block 3 bitmap blocks
128. lect Mark the spatch utility will mark the current disk block as the first block in a range of blocks You can then move to the last block of the region and select Mark a second time This will identify the region of blocks to spatch A special menu will now appear giving you the option of e removing all marks e linking the marked blocks into lost found as a file e linking the marked blocks into lost found as a directory e copying the marked blocks to a file e copying with append the marked blocks to a file e ignoring the second mark allowing you to select a different one If you choose to link or copy the blocks into a file directory spatch will ask if you first want to perform a scan of the entire disk looking for an xbik that references this range of blocks If you say yes then Part I Installation amp Configuration QNX Operating System 3332033323333 00 I EZ EB III III III II III II II III III 33 3 3 3 3 33 Ji 3 33 3 3 III VIVE VDI 3 3 3 3 3 3 9 Administrator s Guide Recovering lost files and directories spatch will perform the scan and if it finds a block it will give you the option of linking in all the extents defined by that xblk and any other associated xblks The xbIk scanning allows potentially large disk files or directories to be recovered in one piece If you choose not to scan for xblks or no such xblk is found then a file directory will be created that has only a single extent cont
129. ll be that of the invoking process and the permissions and modification times will be the same as those in the archive The supported archive formats are automatically detected on input The default output format is ustar but may be overridden by the x format option described below rw Read the files and directories named in the pathname operands and copy them to the destination directory A directory pathname operand refers to the files and recursively subdirectories of that directory If no pathname operands are given the standard input is read to get a list of pathnames to copy one pathname per line In this case only those pathnames 182 Part il Managers Drivers amp Utilities QNX Operating System 13133133 13 3333333131 3 33 313 3 3 3 1 13335 3 3 3 30 3 93 93 31 3 93 13 3 3 3 33 3 3 3 3 31331303 311 3 3 313 JB III II II 1 I I II II pax portable archive interchange POSIX Examples Description Administrators Guide appearing on the standard input are copied The directory named by the directory operand must exist and must have the proper permissions before the copy can occur Copy the contents of the current directory to the floppy drive pax w f dev fd0 Copy the contents of olddir to newdir mkdir newdir cd olddir pax rw newdir Read the archive pax out with all files rooted in usr in the archive extracted relative to the current directory pax r s usr f pax out The pa
130. m It accepts and interprets the stream of data generated by a moving mouse and processes this into an internal first in first out queue of significant mouse events Application programs can read these mouse events Mouse 171 Mouse mouse driver QNX See also by sending messages to the Mouse server via a set of mouse specific functions To minimize buffer requirements yet ensure a consistent mouse position Mouse compresses unread mouse motions A mouse event is always generated when the user presses or releases a mouse button To ensure that mouse motions apply only to the visible console and don t interfere with background programs Mouse tracks the system console and flushes all mouse events if the visible console is changed At the time of printing the following mouse types are supported msoft Standard 200 DPI Microsoft Mouse msys Mouse Systems Mouse ps2 IBM PS 2 Integrated Mouse To see a list of currently supported mouse types you type use mouse Dev Dev drivers C language mouse functions 172 Partll Managers Drivers 4 Utilities QNX Operating System 331933 9 93 7932732 7393939 9293939292 329329392939 793 SEE BEER RE 3333313333 3333333333333 333 3333993339393 3939I93 993199399 Syntax Options Examples Description Administrator s Guide netboot service boot requests from the network QNX netboot f netfilej n netname v netfile The name of the
131. modem is connected to the QNX device dev ser1 If it isn t you ll have to tell gtalk where your modem is Set your serial port settings Set your serial port settings to the following values Refer to the section on configuring modems if you need help with this par none bits 8 You ll also need to set your baud rate to whatever rate your modem will support Start qtalk and have your modem dial us If you are in North America and have a Hayes compatible modem you can use qtalk s dialing directory capability The default dialing directory etc config dial dir provides an entry called Part Installation amp Configuration QNX Operating System 1322323385320 3033333333233 EEE EB EEE I III III III 331330 i 4 i 313 3 3 313 3 3 VV 31313 39593 i 33 3 3 313 3 9 3 3 3 3 3 3 f BIJ Administrator s Guide Logging in quics which contains Quantum s phone number For more information see the documentation on qtalk in the Utilities Reference qtalk quics m modem Hayes compatible modem OR qtalk m modem other modem The m modem option is needed only if your modem is not connected to the dev ser1 device Logging in Once you have successfully established communications with QUICS you ll be asked to log in If this is your first time signing onto QUICS you should log in as user ID newuser Login newuser Next you ll be asked to enter information about y
132. n about your time zone If you don t set your time zone QNX will assume that local time is the same as UTC time This would present a problem only if you wish to transfer files to another system in a different time zone In this case the dates on the file will appear to be shifted by the difference between the two time zones If you plan to use Quantum s update system to download new software you ll want to set your time zone correctly You should establish time zone information before setting the current date and time If the realtime clock in your computer has been set to local time QNX needs the time zone information in order to establish UTC Chapter 1 Installation 13 Setting your time zone In the following example the time zone as well as the time change rules are set for Eastern Standard Time in North America export TZ EST5DST4 M4 1 0 3 M10 5 0 3 where export Shell command to set an environment variable TZ Name of variable EST Eastern Standard Time 5 5 hours before Greenwich Mean Time DST Daylight savings time 4 4 hours before Greenwich Mean Time M4 1 0 3 First Sunday of April at 3am M10 5 0 3 Last Sunday of October at 3am gt For more information on the time zone rules see Appendix A Getting the date If you re booting from disk you should follow the first line in your and time from system initialization file with the rte utility to establish the current the realtime clock date and time from the
133. n be local a hard disk on that machine or remote a hard disk on another machine If the filesystem is local the image must contain the Filesystem Manager and a disk driver to access the local disk If the filesystem is remote the image doesn t need the Filesystem Manager but will require the Network Manager to access the remote filesystem over the network When sinit runs it firsts determines if the image it s part of was booted from disk or over the network If the image was booted from disk sinit checks to see if a normal boot or an alternate boot occurred Based upon this information it attempts to open one of two files see below Ifthe open succeeds then sinit will exec into the Shell bin sh with the file it opened as an operand The Shell replaces sinit whose job is now done If and only if sinit can t open this first file it will attempt to open the etc config sysinit file If it opens this file it will exec into the Shell with this file as an operand If it can open neither file then sinit will terminate and no system initialization file will be processed This is summarized in the following table 8 Parl Installation amp Configuration QNX Operating System 313333333313 3 13 3 3313 3 3333 3333 33 3 3 31 13 3333 3333 333 3 3 3 3333 33 3 333 3 3 33 3 3 3 333333 333 3 sysinit node altsysinit Administrator s Guide The system initialization file If you choose sinit tries to find and open
134. n on once a month and make a log of this list Free software We also maintain a growing list of free software that may be of interest to you It includes useful utilities games and megabytes of public domain source provided by ourselves and by our customers This source can often help you understand some of the intricacies of QNX Electronic mail You can use the private mail facility to communicate privately with Quantum employees or with any other user of QUICS Part Installation amp Configuration QNX Operating System 1333 113131312331133133331311 333113313 31133333 331313 III 3 03103090303 19 0303030030309 10303903909 eee 0903109 3 093 1 1 3 3 3933339939 Administrator s Guide About our hardware Conferencing system If you d like to make a comment or ask a question that you feel other users may be interested in then you ll want to use our conferencing system Its command structure is very similar to that used by Byte magazine s conferencing system All Quantum developers are members of the conferencing system as are most of our more active third party developers It s not unusual to pose a question and have several comments on it within an hour or so You ll find topics on realtime hardware utilities C and so on You don t need to be a QNX customer to use the conferencing system You can access it from a terminal or a terminal emulation program running under DOS About our hardware At t
135. nce since a failure in one department won t prevent another department from booting For large numbers of nodes this practice should also reduce the potential for a boot bottleneck when people in the office start work first thing in the moming Chapter 1 Installation 5 Booting ONX over a network 6 Step 3 Step 4 Part I Installation amp Configuration Start the netboot utility When a node boots it sends a boot reguest to its boot server When the network manager receives a boot reguest message it forwards this reguest to the netboot utility which must be running on the boot server if the reguest is to be honored When you boot over the network the operating system image loaded will inherit the following from the boot server e the time e its list of name locators see nameloc utility in Utilities Reference e its licensing capabilities The netboot utility is typically started in the system initialization file of the boot server as follows netboot 4 Edit the netboot configuration file When a boot request is received the netboot utility opens the etc config netboot file on the boot server This file contains entries that describe which operating system image to boot for each node in the network Each line in the etc config netboot file starts with a logical node number followed by a file specification identifying the operating system image to boot For example the following file might be used
136. ne the file is skipped Should be used only with the i or o options cpio 121 cpio copy file archives in and out UNIX Examples Description t Printa table of contents of the input No files are created Can be used only with the i option u Copy files unconditionally Usually an older file will not replace a new file with the same name Can be used only with the i or p options v Be verbose Print the names of the affected files Can be used only with the i option Provides a detailed listing when used with the t option pattern Simple regular expression given in the name generating notation of the shell directory The destination directory Copy out the files listed by the 1s utility and redirect them to the file newfile ls cpio o gt archive Use the output file archive from the cpio o utility extract those files that match the patterns memo al and memo b create the directories below the current directory and place the files in the appropriate directories cat archive cpio id memo al memo b Take the filenames piped to cpio from the find utility and copy or link those files to another directory named newdir while retaining the modification time find depth print cpio pdlmv newdir The cpio utility produces and reads files in the format specified by the POSIX cpio Archive Interchange File Format It operates in three modes The i option copy in extra
137. ng Backups 75 Archive examples tape forward find newer lastsave pax w gt dev qic02 touch lastsave Restore all the files on a tape that are under the directory usr robo tape rewind pax r usr robo lt dev qic02 Cartridge optical Copy all files from the filesystem on node 1 to the filesystem on node 2 cp Rp 1 2 In the following example the disk on node 2 is probably a very large optical with sufficient room for many disk contents A full backup is done each Friday and a partial backup of modified files could be done each day of the week cp Rp 1 2 fri cp Rp a date 1 2 mon cp Rp a date 1 2 tue 76 Part Installation amp Configuration QNX Operating System J333333333333 33 31 33733 113333313 333 3133 3333 333339933933 33 33 3 3 3 3 3 3 1 3 3 I 3 31 I 1 3 I 3 33 3 3333 939 Chapter 7 Building a Custom Operating System Image In this Chapter Introduction Constructing a build file Administrators Guide Chapter 7 Building a Custom Operating System Image 77 Constructing a build file Introduction QNX is a modular operating system composed of a microkernel and one or more processes that provide services For example a process named Fsys provides filesystem services while a process named Dev provides device services When you build an operating system image you select those services you wish to be available immediately after boot and include the
138. o device the name of the device the job is scheduled on jobid the job ID number of this job In addition all the keys defined earlier can be referenced as metavariables For example ci will expand to the name of the copy in command ci string Chapter 4 Print Spooling 53 Configuring the spooler A more complicated example The following example is a further refinement of the above setup with some additional features required for a larger configuration There are now three laser printers all PostScript located at different locations in the building connected to 1 dev serl 2 dev serl1 and 3 dev ser1 The configuration looks like this txt text2ps HI queue gt Ea gt queue gt gif2ps queue nl Here s the configuration file to set this up This is the spool setup file First the plain text printer txt de lpl 1p2 1p3 af usr spool 1p log ci text2ps fname gt spfile pr 50 Second the postscript printer ps de lpl 1p2 1p3 af usr spool ps log pr 60 Third the gif gif de 1p1 1p2 1p3 af usr spool gif log X ci gif2ps fname gt spfile pr 5 Now define the laser printers lp1 dv 1 dev serl 1 dev serl 2 dev serl 3 dev serl il ok echo job jobid completed mail username ab echo job jobid aborted mail username 1p2 dv 2 dev serl ok echo job on na
139. oading isn t possible you may also choose to build a complete load image of all the processes you need The core kernel modules and images are placed under the boot directory This directory also contains a Makefile which references a set of build files that name the processes to be included in an image The Quantum kernel processes that make up the required operating system services are kept in the boot sys directory The following lists Quantum processes that are often included in an image Type Process Description A Proc Process Manager including the microkernel A Slib Shared Library B Fsys QNX Filesystem Manager B Fsys floppy NEC 765 floppy driver Fsys wd Western Digital 1002 1007 hard disk driver Fsys ps2m PS 2 MFM hard disk driver Fsys ps2e PS 2 ESDI hard disk driver Fsys ps2s PS 2 SCSI hard disk driver Fsys aha Adaptec SCSI hard disk driver C Dosfsys DOS Filesystem Manager reguires Fsys 116 Part Il Managers Drivers 4 Utilities QNX Operating System 3333339 3 33 3 1 By VP JR DI DD I IVI DI DI DD DB I I I easy 3 313 3313 BI DI DIVIDED IDV 3 9 3 3 Administrator s Guide Type buildgnx build a custom version of QNX QNX Process Description Dev Device Manager Dev con Monochrome EGA VGA console text driver Dev par Parallel driver Dev ser 8250 16450 16550 RS 232 serial driver Arcnet QNX Arcnet Network Manager driver sinit System initialization process Debugger Low level system debugger
140. oduction A filesystem rooted at slash may be composed of one or more physical filesystems grafted together A physical filesystem is a separate disk or partition One of the physical filesystems is typically assigned to be the root while the other filesystems are mounted as subdirectories These subdirectories don t exist on disk but rather in an independent space called the prefix tree The prefix tree maps pathnames to I O managers which in turn map to disks and devices For more information on the prefix tree see the chapter on I O Namespace in the Users Guide Partitioning the pathname space The following examples should help clarify how the pathname space is partitioned We ll look at the following configurations e ahard disk and a floppy e two hard disks e two or more QNX partitions e local and remote hard disks In these examples we assume that Fsys as well as the appropriate drivers are ruming and that the mount p command has been done on your hard disk The hard disk is mounted as slash and forms the root of the filesystem The floppy is mounted as d0 mount dev hd0t77 mount dev fd0 d0 Any reference to a pathname starting with d0 will be directed to a ONX filesystem on the floppy For example ls aR fd0 Show all files on the floppy Part Installation 8 Configuration QNX Operating System 11 3111 3333 3 33333333333 31333 1 3 3313 3 33 33 333 33 3 3 93 33 3 9 333
141. of 1K The minimum size is 4K the maximum size is 8192K There is no default size x cache proportion The maximum proportion of the cache that may be used for caching load modules For example x 2 would fill up to Y the cache with load files The default is 0 which will not cache load modules Fsys The Filesystem Manager Fsys provides a standardized means of storing and accessing data on disk subsystems Fsys is responsible for handling all reguests to open close read and write to files The Fsys manager lets you define ramdisks A ramdisk is a block of memory that s accessed by the filesystem as if it were a disk drive It can be effectively used for temporary files or to augment the cache by storing freguently used data such as programs or tables Only one ramdisk is supported by the Filesystem Manager The ramdisk is Fsys 149 Fsys Filesystem Manager QNX defined as a block special file with the name dev ram To define the root name for the filesystem on the ramdisk you use the mount utility Note that since a ramdisk is entirely RAM based its contents are lost when the system is rebooted Normally ONX filesystems don t cache load modules But you can use the x option to specify that up to of the cache may be used to cache frequently used load modules where n is the cache proportion argument for this option The maximum number of distinct files that may be open at any time may be less than th
142. of contents listing on the standard output when both r and w are omitted otherwise the filenames are printed to standard error as they are encountered in the archive x format Use this output archive format The input format which must be one of the following is automatically determined when the r option is used The supported formats are cpio the extended cpio interchange format specified in IEEE Std 1003 1 1988 ustar The extended tar interchange format also specified in IEEE Std 1003 1 1988 This is the default archive format y Interactively prompt for the disposition of each file Substitutions specified by s options described above are performed before the user is prompted for disposition EOF or an input line starting with the character q causes pax to exit Otherwise an input line starting with anything other than y causes the file to be ignored This option cannot be used in conjunction with the i option Only the last of multiple or t options take effect directory The destination directory pathname for copies when both the x and w options are specified The directory must exist and you must have the appropriate write permissions or an error results pathname A file whose contents are used instead of the files named on the standard input When a directory is named all of its files and recursively subdirectories are copied as well pattern A pattern given in the standard shell pattern match
143. of the i s or y options are applied Restore file ownership as specified in the archive The invoking process must have appropriate privileges to accomplish this Preserve the access time of the input files after they have been copied s replstr Modify filenames according to the substitution expression The syntax for the expression is s old new gp Any non null character may be used as a delimiter a is used here as an example Multiple s expressions are applied in the order specified terminating with the first successful substitution The optional trailing p causes successful mappings to be listed on standard error The optional trailing g causes the old expression to be replaced each time it occurs in the source string Files that substitute to an empty string are ignored both on input and output t device The device argument names the input or output archive device overriding the default of standard input for r and standard output for w u Copy each file only if it is newer than a preexisting file with the same name This implies option a 180 Partii Managers Drivers amp Utilities ONX Operating System 333 3 31 13933 3 3 333 3 3 3 3 3 033000200 BD 3 3 I I I I 3 3 33 3 3 3 3 3 3 33 3 3 3 3 III II III 3 31 1 3 3 31 33 31391 3 3 3 3 3 IG Administrators Guide pax portable archive interchange POSIX v Be verbose list filenames as they are encountered This option produces a table
144. of the daylight savings time zone If dst is omitted then daylight savings time isn t used in this locale Indicates the value you must add to the local time to arrive at UTC The form for offset is HH MM SS The minutes MM and seconds SS are optional The hour AH is required and can be a single digit You must specify an hour between 0 and 24 You can specify minutes and seconds if required between 0 and 59 Time zones east of the Prime Meridian through England should be preceded by a minus time zones west of the Prime Meridian can be optionally preceded by a plus An offset following std is required but the offset following dst may be omitted In this case daylight savings time is assumed to be one hour ahead of standard time Specifies when to change from standard time to daylight savings time and back again If you don t specify rule ONX assumes standard time is in effect The rule has the following format date time date time QNX Operating System 3333333223133 32 III III III 1 I 1 1 1 13 1 1 1 1 III III SB BE 1 I DI I 3 3 3 3 3 3 313 3 3 3 3 3 3 3 3 1 3 J 3 33 3 313 3 3 3 3 3 3 9 3 Appendix A where the first date specifies when the change to daylight savings time takes place and the second date specifies when the change to standard time takes place Each time field specifies the exact time at which the change shall be made The date field has one of the following formats Jn Specifie
145. og doesn t show a logout The logout is inferred because in the final entry tinit starts another modem program The total connect time for the user from successful login can be calculated thus 670465824 670464550 1274 seconds On a busy system records from many devices will be interspersed throughout the logfile In order to match events keyed to each device you ll find a node number associated with each device letting you track accounting records for all devices throughout a network in a single logfile Here are several common event sequences TS gt LO gt TS A login and logout on a dedicated line TS Mo Lo TS A login and logout on a dial up line TA TS LO TA _ A loginand logout on a dedicated line armed by a keystroke TS gt TS An unsuccessful login on a dedicated line TS gt MO gt TS An unsuccessful login on a dial up line 26 Partl Installation amp Configuration QNX Operating System U hm 3333 33 3 333J3 333 333 3 3 33 33 33 3 33 3 3 3 3333 3 333 Clearing the logfile Administrator s Guide Accounting file Once you create etc acclog the file will start to grow as records are appended to it If left unmanaged this file may grow to consume considerable disk space so you should print or archive the information in this file on a regular basis You may even want to automate this housekeeping job using the cron utility see the Utilities Reference In the following example the logfile
146. on causes it to print the name of each file it processes preceded by the option letter With the t option v gives more information about the archive entries than just the name filename The pathname of the file to be archived Examples Display a verbose listing of the archive members in dist tar tar tvf dist tar Copy the contents of the current directory to the floppy drive tar cf dev fd0 Make an archive backup tar of all the C source and header files in the current directory tar cvf backup tar ch 194 Part Il Managers Drivers amp Utilities QNX Operating System 3233333 33 33333 3 BB JB 3 3 33 3 33 3 3 33 3 1 33 3 3 93 99 3333333333331 3333 33033 3331332331313 31 III II III tar read and write tape archive files UNIX Description Files See also Administrator s Guide The tar utility reads and writes archive files that conform to the Archive Interchange File Format specified in IEEE Std 1003 1 1988 The controlling terminal dev tty is used to prompt the user for information when either or both the i or y options are specified cpio pax tar 195 CEELCECOCCECOCCEECLECEELCETEOCEOCECCOELCECECOCCECCEOECOECTL 33 3 33 3 33 33 3 33 3333 3 3 333 323 3331 3 13 31 333 3 333 Syntax Description Administrator s Guide termdef prompt for terminal type QNX termdef c command The termdef utility prompts the user for their terminal type You should find te
147. on 32 Administrator s Guide Index serial devices 31 43 connecting 36 hardware adapters 31 multi port serial adapters 32 printers connecting 37 RS 232 serial protocol 33 serial ports configuring 35 troubleshooting 42 see alsomodems RS 232 terminals serial driver starting 11 30 serial ports baud rate specifying 36 configuring 35 data bits 35 parity bits 35 stop bits 35 setgid 22 setting up user accounts 19 27 setuid 22 shared resources 46 sinit utility 8 requirements for running 8 software refresh policy 106 software free 106 spatch utility 94 97 102 spool configuration file see print spooling standard time see also time zones standard time zone defining 202 stop bits 35 suutility 20 submitting print jobs 47 see also print spooling system initialization file 8 12 altsysinit 9 base level services 10 clock starting 13 console driver starting 10 Index 213 Index cron server selecting machine as 12 Device Manager starting 10 DOS filesystem starting 12 environment variables defining 12 floating point emulator 11 floppy driver starting 12 global name server selecting machine as 12 last command in file 11 login starting on consoles 11 machines booting from hard disk 10 optional services 12 parallel driver starting 11 realtime clock getting time from 10 serial driver starting 11 single file affecting group of machines 11 sysinit 10 sysinit node 9 time zone defining 10 T tape backin
148. onfig sysinit node etc config altsysinit The hard build file doesn t contain the Device Manager bin Dev The Device Manager and its drivers are usually started in the system initialization file after the system boots Chapter 7 Building a Custom Operating System Image 81 Constructing a build file Network images If the system initialization file isn t executed the Device Manager will not be started As a result your keyboard and system console won t function The build file for hard disks contains an entry for the network manager bin Arcnet This entry is mandatory if you are running QNX on a network Arcnet will automatically terminate if no network hardware is present A network link can be used to perform remote diagnostics For example assume that node 1 is running with access to an available filesystem and node 8 was just booted but appears dead the keyboard is ignored and there s no login prompt Entering the following commands from node 1 might provide some clues as to the state of node 8 sin n 8 sin n 8 info prefix n 8 You normally use a network image to boot a diskless workstation over the network As such the boot image doesn t need to contain a local filesystem or a disk driver The Makefile under boot contains an entry for making a generic workstation boot The following example uses the build file boot build ws and makes an image boot images ws make b ws The buildgqnx utility defines
149. onsoles This should be the last command executed in the file This particular example shows a reasonable default suitable for the console tinit T dev con t dev conl amp You may wish to place common sets of commands in a separate Shell file that you execute via the dot Shell built in This allows you to edit a single file to affect a group of machines For example the following system initialization file could be used for all machines in the Technical Department etc config techies Note that node specific commands would be added after this dot line followed by the tinit utility Chapter 1 Installation 11 The system initialization file Optional services 12 You can add a host of other services to your system initialization file You should add these services just before the line containing the tinit command The following examples show commonly used optional services Note that these utilities typically support command line options to modify their behavior these options are explained in the documentation for each utility Define any environment variables you wish inherited by all processes started in the sysinit file export var value Start a local floppy driver if the QNX filesystem is running locally don t include the first line Fsys Fsys floppy If a floppy driver is running you can use the vol and pax utilities to access the driver s block special file If you want to access i
150. options This link is equivalent to melt freeze d fcat freeze cd You can restore compressed files to their original form through either of two ways e specifying the d option to freeze e running melt on the F files or on the standard input When you specify filenames the ownership modes access times and modification times are maintained between the file and its F version As a result freeze can be used for archival purposes yet can still be used with make after melting The freeze utility uses the Lempel Ziv algorithm on the first pass and the dynamic Huffman algorithm on the second one The size of sliding window is 8K and the maximum length of matched string is 256 The positions on the window are coded using a static Huffman table 146 Part Il Managers Drivers amp Utilities QNX Operating System PUT VV FPDP TIFT A 3 3 3 9 I 3 3 IID 3 3 3 1 3 3 3 3 3 1 3 1 3 3 3 9 93 3313333331333 39393393 331 3 313 I I 13 I 1 I I I I I 1 I III Exit status See also Administrator s Guide freeze compress and uncompress files QNX A two byte magic number is prepended to the file to ensure that neither melting of random text nor refreezing of already frozen text is attempted In addition the characteristics of the static Huffman table being used during the freeze are written to the file so that these characteristics may be adapted to concrete conditions The amount of compression you o
151. ou and your company as well as the name you wish to create as your own personal user ID Since there are many thousands of QUICS users we ask that you avoid simple names like your first name alone when selecting your user ID A good rule that works well is to select a name consisting of your first two initials followed by your last name For example the user ID for Johann Sebastian Bach would be jsbach From now on you log in with your user ID instead of newuser each time you access QUICS Chapter 9 The Quantum Update System 109 Using QUICS 110 Using QUICS After logging in you ll see the main menu QUICS is a fully menu driven system We encourage you to explore the system to get familiar with its many capabilities By the way one of the submenus lets you download a manual on how to use QUICS If at any time you experience difficulty just give our technical support line a call 613 591 0941 We at Quantum look forward to seeing you on QUICS Part Installation amp Configuration QNX Operating System III 31 1 1 B 1 1 1 3 3 BJ JB 3 EB I ED I II IRB I IR II I DI I I I I 3 BV VDDD 310919091090 r L 3 Ji III III 319 VV VIVID III Part Il Managers Drivers 4 Utilities Arcnet buildqnx cpio Dev Dev con Dev par Dev ser Dosfsys emu87 fcat fdisk freeze Fsys Fsys aha Fsys floppy Fsys ps2e Fsys ps2m Fsys ps2s Administrator s Guide Arcnet network manager QNX 113 buil
152. partition reports any inconsistencies and fixes them if possible e verifies overall disk block allocation e writes a new bitmap upon your approval The chkfsys utility assumes that the root block is valid If the root block isn t valid chk sys will complain and give up you ll need to try restoring the root block with the dinit utility The zap utility lets you remove files or directories from the filesystem without returning the used blocks to the free list You might do this for several reasons including e the directory entry is damaged e two files occupy the same space on the disk an error To remove zapped file entries and recover the used disk blocks you use the chkfsys utility The spatch utility lets you browse the raw disk and patch minor problems You can sometimes cure transient disk problems by reading and writing the failing block with spatch Disk recovery procedures The chkfsys utility is your principal tool for checking and restoring a potentially damaged filesystem It can identify and correct a host of minor problems as well as verify the integrity of the entire disk system as a whole Normally chkfsys requires that the filesystem be idle and that no files are currently open on that device You ll have to shut down any processes that have opened files or that may need to open files while chkfsys is running To run chkfsys on an idle filesystem called dev hd0t77 you would simply type chkfsys
153. pports the NULL device called dev null See also Dev con Dev ser Dev par Administrator s Guide Dev 125 CEECECOCOCCOEECECECOCOCCOCOCECOCEEOCEEECCOCOECOCECCOCCOCOECOCOOEEL 3333 333 3333 3 33 333 333 3333 3 3 3 J33 3 33 33 333 3 Syntax Options Examples Description See also Administrator s Guide Dev con console driver QNX Dev con C number I number N name O number n number amp C number The size of the canonical input buffer default is 256 I number The size of the raw input buffer default is 256 N name The prefix to use for the device name default is con O number The size of the output buffer default is 2048 n number The maximum number of virtual consoles default is 1 Dev con Start Dev con use defaults Dev con n 4 amp Allow 4 virtual consoles The Dev con driver manages all console devices in a QNX system Remember that you can start Dev con only after the Device Manager Dev has been started Dev Dev ser Dev par Dev con 127 CECCCCCCCCCCECCCCCCECCECCGCCCCCECCCCCCCCCCCCCEE 333333 3333 33 333 3 3333333I1 3 3 J3 33 3333 333 Syntax Options Examples Description See also Administrator s Guide Dev par parallel device driver QNX Dev par b number N name p number O number E b number Use the printer number as defined by the BIOS where number can be 1 2 3 or 4 N name The name of
154. priate privileges affect the ability of pax to restore ownership and permissions attributes of the archived files See Archive Interchange File Format in IEEE Std 1003 1 1988 Note that the options a c d i 1 p t u and y are provided for functional compatibility with the historical cpio and tar utilities The option defaults were chosen based on the most common usage of these options so some of the options have meanings different from those of the historical commands The controlling terminal dev tty is used to prompt the user for information when the i or y options are specified 0 All files in the archive were processed successfully gt 0 The pax utility aborted due to errors encountered during operation Special permissions may be required to copy or extract special files Device user ID and group ID numbers larger than 65535 cause additional header records to be output These records are ignored by some historical versions of cpio and tar The archive formats described in Archive Interchange File Format have certain restrictions that have been carried over from historical usage For example there are restrictions on the length of pathnames stored in the archive When getting an 1s 1 style listing on tar format archives link counts are listed as zero since the ustar archive format doesn t keep link count information On 16 bit architectures the largest buffer size is 32K 1 This is due in part to
155. r from the diskette to your hard disk Note that the new serial number will not become effective until you reboot Nodes that boot over the network will inherit serial numbers from the node they boot from If you have more than one machine that boots from disk in a local area network you can specify a directory to the license utility to copy all serial numbers from one hard disk to another Note that if you don t specify a destination the license utility always writes to the etc licenses directory in the current filesystem 166 Part Il Managers Drivers 4 Utilities QNX Operating System 33 93 3 393 3 9 3393 3 3 3 3 3 000000000 0 II 3 993 9393 333333333 33333333 3 3 3 3 3 3 3 33 3 3 3 3 3 3 3 I 3 II 3 3 3 3 3 333 Ipsrvr print server QNX Syntax lpsrvr L logfile c file n name q Options L logfile Print log information into logfile rather than to standard error c file Use file for configuration information Default is the usr spool lp setup file n name Register using name rather than the qnx spooler file q Be quiet Don t generate log information Description The 1psrvr utility is the print server The utility accepts requests for printing rescheduling and examination of print jobs When lpsrvr starts it scans the configuration file to find out about existing printers then scans for any residual work from a previous invocation Files usr spool lp setup See also Util
156. realtime clock The following two lines would accomplish this export TZ ESTSDST4 M4 1 0 3 M10 5 0 3 rtc hw This will set the date and time on an IBM AT compatible computer Note that there are two possible approaches to take when setting the realtime clock in your machine e setting the realtime clock to universal time e setting the realtime clock to local time We recommend that you set the time in the realtime clock to UTC But if you re also running operating systems that assume the realtime clock is set to local time e g DOS you ll want to use the rte utility with the 1 option rtc 1 hw 14 Parl Installation amp Configuration QNX Operating System 1 33 3133 331333333 3 3333 3133333133133 3333 33333 3 3 03 3 3 3 33 3 3 3 3 3 DEI BEI DD DIE BED DIEBE II DIDI VIII IIa If you re booting over the network Operating system licensing Administrator s Guide Licensing This invocation of rtc assumes that the realtime clock was setto local time Note that when you use local time in the realtime clock you ll have to manually change the value in the realtime clock when you switch to and from daylight savings time in locales where it s used If the time in your hardware clock is incorrect perhaps the battery has been replaced you should set the system time using the date utility then set the realtime clock using the rtc utility with the s option For details see the documentation for these utilities in
157. rectories 89 Links 90 Extent blocks 91 Files 92 File maintenance utilities 93 fdisk 93 dinit 93 chkfsys 93 zap 94 spatch 94 Disk recovery procedures 94 Using chkfsys 94 Recovering deleted files 96 Recovering from a bad block in the middle of a file 97 What to do if your system will no longer boot 97 If the disk is unrecoverable 101 If the filesystem is intact 101 Recovering lost files and directories 101 The lost found directory 102 Using spatch 102 QNX Operating System FUP IFFT TV IFFT FTI DAV AVIV E FI IDIFIVIT PIII III VIS 33333 3 33 3 3 3 33313 333 3 3 3 3 33 II IIND 3 3 33 93 II III I Chapter 9 Part Il Appendix A Administrator s Guide Contents The Quantum Update System 105 Introduction 106 Reporting bugs 106 Free software 106 Electronic mail 106 Conferencing system 107 About our hardware 107 How to phone us 108 Logging in 109 Using QUICS 110 Managers Drivers amp Utilities Time Zone Rules 201 Index 207 Contents Xi FELELCEELCOEECOCEOCCOEECECEECCELEECOOECCOECLEEOCCOCCOCOCOCOCE 3333 13 333131313 3 1 J II 3 I I 3 I II I I I I I I I I III III Part I Installation amp Configuration In this Part Installation Setting up User Accounts Connecting Terminals Printers amp Modems Print Spooling Setting up a Second Filesystem Making Backups Building a Custom Operating System Image Disk amp File Recovery The Quantum Update System CCCECCCECECEGCCECEGCECGCCC
158. reeze and melt _Leonid A Broukhis Cover art by Robert Tinney Printed in Canada 3 33 3 3 3 3 3333333333 3 3333331331 121333J331333 33333 3333 3 33 39 3 3 3133 IMI III Eu Eu Eu IIIA III Acknowledgmenis Several members of Ouantum Software Systems Ltd have contributed to the design and implementation of ONX 4 0 This product embodies more than a decade of research development and field tested experience Veteran ONX users will recognize the performance advantages and comfortable feel of their familiar OS while new users can expect a standard operating system with a difference We are proud to see the ONX operating system enter the standards arena without sacrificing the fundamental gualities of its original vision The following people deserve a special word of thanks and achnowledgment for their substantial contribution to ONX 4 0 Software Development Documentation Luc N Bazinet Kevin Didsbury Gordon Bell Paul N Leroux Andrew C Boyd Paul McManus Brian Campbell John M Ostrander Grant D Courville Dan Dodge Andrew Edgar William A Flowers Dan Frank Jeffrey G George Dan Hildebrand Eric Johnson Debbie Kennedy Terry Laughlin Steve McPolin Rob Oakley Martin Walter KLECECECECECECCCCEC CECECOGCECCEGECLECCECCECCEC JVIIIIIIIIIIIIIIIIIIIIIIII ID 3 33 33 55 E5 ES ES IB 3 3 3 3 3 Administrator s Guide About this Guide What will I find in this guide The QNX operating system
159. rent process s real and effective group ID If invoked without arguments newgrp changes the group identification to the group identified in the password database for the current user The groups that a particular user may change to are controlled by the password database QNX uses two pieces of information to control access to resources e user ID e group ID Chapter 2 Setting up User Accounts 21 Security File permissions setuid and setgid The user ID should be unique that is no two users should share the same user ID This rule is enforced by the passwd utility but the superuser can override this rule by editing the password file directly The group ID refers to a database that allows several users to be associated to a group This group mechanism allows a team of users to share resources without making them available to the rest of the world All files and directories in the ONX filesystem have three sets of access fields corresponding to e owner e members of the owner s group e everyone else All files and directories also have fields that identify the owner and group of the file Executable files have further permissions that cause them to execute with the privileges of the file s owner or group regardless of who executes them Colloquially this mechanism is referred to as setuid and setgid respectively This simple mechanism allows non privileged users to perform certain privileged function
160. rmdef useful as a front end process on dial up lines If the terminal name entered matches one of the supported terminfo entries termdef will set the TERM environment variable accordingly and will do an exec into the login command A list of all available terminal types will be displayed if the user presses lt Enter gt without specifying a terminal name To launch a command other than login use the e option The specified command will be launched instead termdef 197 COCCECOCCOCOLCECECCOCLEECOCOCOCOEOCOCCCECCECOCCOOCEL 333 3333 333 333 33 III II 3 I III I I IIIIIIIIIIIIIIII II Syntax Options Examples Description Administrator s Guide vol manage multi volume archives QNX vol r w s blks_num block special device r Read from the block special device w Write to the block special device s blks num Skip this number of blocks at the start of each volume default is 1 Use pax to archive everything under the current directory and let vol split the data across as many diskettes dev d0 as required pax w vol w dev fd0 Restore the archive from dev d0 vol r dev fd0 pax r You use the vol utility primarily with removable media particularly floppy diskettes At the beginning of each volume vol writes a header containing the creation time and seguence number of the volume this helps you detect out of sequence diskettes A media descriptor is located on the first bloc
161. rocedure certainly can t hurt and is often worth a try To examine the blocks within a file you use the spatch utility When you get to a bad block spatch should report an error but it may have actually read a portion of good bytes from that block Writing that same block back will often succeed At the same time spatch will rewrite a correct CRC that will make the block good again but with possibly incorrect data You can then copy the entire file somewhere else and then zap the previously damaged file To complete the procedure you mark the marginal block as bad by adding it to the bad_blks file then run chkfsys to recover the remaining good blocks If this procedure fails you can use the spatch utility to copy as much of the file as possible to another file and then zap the bad file and run chkf sys What to do if your system will no longer boot If a previously working QNX system suddenly stops working and will no longer boot then either the hardware has failed or the data on the hard disk has been damaged The following steps can help you identify the problem Where possible corrective actions are suggested Chapter 8 Disk amp File Recovery 97 What to do if your system will no longer boot Step 1 If you don t have a network If you do have a network Step 2 Step 3 Try booting from floppy or across the network If you don t have access to a QNX network then you ll need to boot
162. rrent use Some applications are licensed per node in a ONX network in the same way as the operating system If you have an application licensed for say three nodes then you would be restricted to running it only on three nodes of your network Note that your network license size may exceed the license size for an application You may run multiple invocations of the application on each licensed node When you run an application licensed per node the invoking node will consume one of the licenses The license will remain with that node until it is rebooted By convention serial numbers that end in nddd are licensed per node Applications may also be licensed for the number of copies in concurrent use For example if an application is licensed for three concurrent copies then up to three copies may be run anywhere in the network at one time Note that on a non networked single node machine you may still run only three concurrent invocations By convention serial numbers that end in uddd are licensed per use 16 Partl Installation amp Configuration QNX Operating System 133 33 33333313333 3 333333 13331 1313313313333 3 33 J 13333 Licensing Expanding your license Administrator s Guide You expand your license size for the operating system or an application using the license utility This utility installs license serial numbers from floppies to your hard disk Each QNX boot diskette and
163. rs amp Utilities QNX Operating System 3333533333333 VPTVVIIVIPIIIFIIIIIIIIIDIIIIIIIIY 333331333 3 33 3 3 31 3 3 3 333333 33 3 33333 3 313333 Syntax Options Description Administrators Guide Fsys ps2e driver for the PS 2 ESDI controller QNX Fsys ps2e a controller d dma channel i interrupt m maxsize n name a controller The controller address default is 3510 hex d dma channel The DMA Channel to use default is 5 i interrupt The interrupt level used by the controller default is 14 m maxsize The maximum number of blocks that will be transferred from the disk to memory in one operation default is 36 n name The name of the block special device associated with the hard drive The default is hd which yields a device name of dev hdn where n is a unit number assigned by Fsys Fsys ps2e is the driver for the IBM PS 2 ESDI Fixed Disk Drive Adapter The Fsys ps2e driver e doesn t require any specification of drive parameters this information is provided by the drive s e uses the PS 2 DMA controller to transfer data between the Adapter and the system memory e allocates maxsize x 512 bytes for a DMA buffer The Fsys ps2e driver makes its code and data available to the local Filesystem Manager Fsys which then invokes that code and data via direct calls Once Fsys has adopted this code and data Fsys ps2e terminates as a process This driver works only with the
164. rs Guide What to do if your system will no longer boot Wrong disk parameters Probable cause If fdisk successfully reads block 1 but reports incorrect disk parameters heads cylinders sectors cylinder then your hardware has probably lost its information about this hard drive The most probable cause is that the battery for the CMOS memory is running low Remedy Rerunning the hardware setup procedure or the programmable option select procedure on a PS 2 will normally clear this up Of course replacing the battery will make this a more permanent fix Bad partition information Probable cause If the disk size is reported correctly by fdisk but the partition information is wrong then the data in block 1 of the physical disk has somehow been damaged Remedy Use fdisk to recreate the correct partition information It s a good idea to keep a hard copy of the correct partition information available in case you ever have to do this step Create a raw volume At this point you have verified that the hardware is working at least for block 1 and that a valid partition is defined for QNX You now need to create a raw volume for the QNX partition itself mount p dev hd0 This should create a volume called dev hd0t 77 or its equivalent If the partition information is correct this shouldn t fail Mount a QNX filesystem At this point you still don t know the health of the filesystem on the QNX partition
165. s For example passwd allows anyone to modif y their own entry in the password database even though they would normally be denied access to the file The passwd login su and newgrp utilities are all setuid to root these programs therefore run with the permissions of the superuser 22 Partl Installation amp Configuration QNX Operating System 333 33 333 33333 3 3 33 3 3 333 313 3333 133 31 3 1333333933333 3933 3 33 3 3 3 3 3 3 3 3 3 3 3 3333333333393 93999 The password database etc passwd Administrator s Guide Security By convention root is the only user with user ID zero which yields superuser status With respect to access control you must ensure that only programs that can be trusted and absolutely need to be trusted are setuid or setgid to root i Since these setuid and setgid programs will inherit superuser capabilities you should make sure they do not have general write permissions so that non superusers won t be able to modify the programs Three files collectively form the password database e etc passwd e etc shadow e etc group The access to these files should be as follows File Owner Group Permissions etc passwd root root rw r r etc group root root rw r r etc shadow root root rw The etc passwd file contains a set of lines in the following format username has pw userid group comment homedir shell where
166. s gives you more information about recent significant network events and about the current state of the network board Arcnet 113 Arcnet Arcnet network manager QNX If for some reason Arcnet cannot initialize the hardware or its runtime environment it terminates If this happens a message is printed directly to the current console with an integer error code Record this code and contact Ouantum for more information Exit status O Successful gt 0 An error occurred See also netnode netpoll Utilities Reference netinfo 114 Part Il Managers Drivers amp Utilities QNX Operating System 13 3313 3 333 331133 31 33 333 33113323 1333313 33313133 382 313 3 3 3 3 31 3 3 3 3 333183 I l f I PVD III DIGIT VIG 3 3 3 3 3 ES 1 52 3 ES ES ES EE buildqnx build a custom version of QNX QNX Syntax Options Examples Description Administrator s Guide buildqnx v macro name build file os file v Be verbose macro name Define a macro build file An input file of module names os file An output image file cd boot buildgnx build ws images ws 400 You use the buildanx utility to build a QNX boot image A boot image is a collection of individual processes packed into a single file image This image is loaded into memory at boot time Once the image is in memory control is transferred to the first process in the image this process starts each of the other processes Eac
167. s the date as a Julian day where 1 lt n lt 365 This format doesn t allow leap days to be referenced e g February 28 is day 59 and March 1 is day 60 it s impossible to refer to February 29 n This specifies the date as a zero based Julian day where 0 lt n lt 365 Leap days are counted and you can refer to February 29 Mm w d This specifies the dth day 0 lt d lt 6 of week w of month m of the year 1 lt ws5 1 lt m lt 12 where week 5 means the last d day in month m that may occur in either the fourth or fifth week Week 1 is the first week of month m in which the dth day occurs Day zero is Sunday The time has the same format as offset except that no leading sign or is allowed The default if time isn t specified is 02 00 00 Administrator s Guide Time Zone Rules 203 Mn OUT PUOHPUTIIUT International Time Chart Standard Time Legal time for each country fixed by law and based on the theoretical division of the world s surface into 24 zones each of 15 longitude with certain deviations due to frontiers or local Daylight Saving Time DST Modified advanced legal time adopted by certain countries for part of year specially during local summer Arizona and of indiana do not observe DST Province of Saskatchewan and certain Canadian cities remain on Standard Time all year Except Broken Hill NS W follows South Australia times B Amapa Amazonas Para Rondania Roraima St
168. s the partition specifier e g t 77 as in the following list t77 QNX 4 0 t7 t8 ort9 QNX 2 1 t1 t2 t3 ort4 DOS size is the size of the partition in cylinders e g 680 or megabytes e g 72m slot is partition number 1 2 3 or 4 Refer to the description for more details on partition specifiers fdisk dev hd0 fdisk dev hd0 add qnx half The fdisk utility lets you partition a hard disk The partition information matches that used by DOS The information is kept on the first physical block on the disk fdisk 141 fdisk create QNX disk partition QNX To create a QNX partition for the first time you must first start the filesystem and hard disk driver For example Fsys Fsys wd 6 You should now execute the disk command fdisk dev hd0 and partition your disk ONX doesn t automatically mount any partition Once you ve created the partition you should mount the disk using this partition see mount It s important to realize that the disk command only displays and updates the partition information on the disk It doesn t directly affect your access to the drive see mount The fdisk utility is a full screen interactive program that is fairly self explanatory When fdisk is invoked it displays a screen similar to this one assuming your disk is already partitioned FDISK Ignore Next Prev 1 2 3 4 Change Delete Boot Unboot Restore Loader Save Quit os__ Start End _____ Number Size Boot name
169. specified on the command line the spooler uses the usr spoo1 1p setup file This configuration file defines queues dequeues and the relationships between them Queues and dequeues have symbolic names as well as a set of attributes The format of each entry in this file is as follows name attribute attribute If a single entry spans a line the last character before the lt newline gt must be a backslash 1 all leading white space on the following line will be discarded Comment lines start with a pound sign The name may contain only alphanumeric characters and slashes and is limited to 48 characters If the object being described is a dequeue the name must start with a dash The dash is for delineation only it isn t considered part of the name Each attribute consists of a two letter key in one of the following forms key Boolean key number Numeric key string Character All numbers are assumed to be decimal numbers unless they start with a leading zero meaning octal or a leading 0x meaning hex All strings contain printable characters The backslash is a special character It can be used to escape other characters In particular the colon must be represented with and a real backslash must be represented with The following keys are defined Part Installation 4 Configuration QNX Operating System 1313 939793393933 93 3 3 3 3 3 33 3 33 3 3 3 3 3 3 3 3 3
170. stem on node 1 has a usr1 directory while the filesystem on node 2 has a usr2 directory You could map each user directory into the other filesystem s space as follows On node 1 On node 2 prefix A usr2 2 usr2 prefix A usrl 1 usrl Other than this link each filesystem is self contained with its own copies of bin etc The advantage is greater redundancy if one department uses node 2 and node 1 goes down the department using node 2 can continue to work except that the files under usr1 won t be available Part Installation amp Configuration QNX Operating System VUVFFVEDTFFIVFIIIVIFVPPVFVIFVIIFVIIPFIDIFIFVIIITI 33 3 3333 33 3 3 3 33333 3 33 3 3 3 3 3 3 3 3 3 3 3 Invocation modes Administrator s Guide Setting up a DOS filesystem In the examples in this section you ll notice that local filesystems are associated with block special files e g dev hd0t 77 while remote filesystems are associated with pathname prefix mappings This prefix mapping redirects requests to a remote filesystem that will be associated with a remote block special file Setting up a DOS filesystem The Dosfsys filesystem manager provides totally transparent access to DOS files and directories that reside on a DOS disk Dosfsys can support up to eight drives a to h You can create files on DOS disks read them write to them and delete them with most QNX programs You can also create read and delete direc
171. t as a QNX filesystem you must mount it as such we recommend that you transport files using pax rather than as files in a QNX filesystem mount dev fd0 f d0 Start a DOS filesystem to access DOS floppies and partitions This requires that the QNX filesystem be running with a driver for the floppy and or hard disk Dosfsys Tf this is a boot file server start the netboot utility netboot amp If this is a machine that you hope will be available at all times you may select it as a global name server nameloc 4 If this is a machine that you hope will be available at all times you may also select it as a cron server cron 4 Part Installation amp Configuration QNX Operating System 1113333313131111321333133 33331 3313 313 311313 3 1333 3 3 3 33 3 3 3 93 3 3 3 3 3 33 39 3 3 3 3 3 3 09 33 3 3 3 33 Eu Es Du Bu Eu Eu Bu Eu Setting your time zone Establishing the time zone Administrator s Guide Start a clock that will continuously display the time in the upper right corner of the screen clock f green X amp Setting your time zone It s important that the correct date time and time zone information be established early during initialization This should be the first step in your system initialization file Internally QNX uses Coordinated Universal Time UTC which is often referred to as Greenwich Mean Time Applications and utilities convert to local time by using informatio
172. te files In this configuration you treat one filesystem as the primary and you mount the second filesystem as a subdirectory under the primary For example assume node 1 has the primary and node 2 has the secondary mounted as usr2 Node 1 boots from hard disk and has Chapter 5 Setting up a Second Filesystem 59 Partitioning the pathname space Linked independent 60 its root set to its local disk by a mount utility built into the operating system image with Fsys and a driver Its system initialization file would invoke the prefix utility to mount the remote filesystem as follows prefix A usr2 2 usr2 Node 2 boots over the network from node 1 and has its filesystem root set to 1 using the r option of the sinit utility built into the operating system Its system initialization file would invoke the mount utility to mount the local filesystem as follows mount dev hd0t77 usr2 The Filesystem Manager Fsys and its driver may be built into the image but they are more likely started from the system initialization file In other words node 2 boots like a simple diskless workstation then starts its filesystem after booting Both nodes 1 and 2 will access the filesystem on node 1 as and the filesystem on node 2 as usr2 In this configuration you treat each machine as an independent self contained filesystem but you link portions of them together via the prefix utility Forexample assume that the filesy
173. that was built via the buildanx utility If a relative pathname is used it is assumed to be relative to the boot directory For example F images ws is equivalent to F boot images ws If a build file is specified the buildanx utility will be invoked on the fly to build an operating system image that is piped to netboot and shipped as an image over the network If a relative pathname is used it is assumed to be relative to the boot directory For example f build ws is equivalent to boot build ws Build files are much smaller than operating system images so if you have a number of different images you want loaded you can save considerable disk space by building them on the fly Images are sometimes useful for freezing a particular operating system image that you wish to be immune from subsequent operating system module updates In this case you would have to build a new image using buildanx to activate any new modules QNX is a modular operating system As such you don t need to build into the transmitted image all modules you may require Once the operating system loads you can start many subsequent modules from the command line or more typically from a shell script that is executed right after boot This is described in more detail under the buildgnx and sinit utilities You may run netboot on more than one machine in the network This is advisable in larger networks to speed up booting when many reguests are acti
174. the disk Also the filesystem has internal cached data about files and directories that cannot be updated when chkfsys makes a change Static changes in place on files or directories that Fsys doesn t currently have opened will probably not cause problems If a file is accidentally deleted it s sometimes possible to recover the file using the zap utility To recover a file using zap e the directory entry for that now deleted file must not be reused e the disk blocks previously used by the file must nor be reassigned to another file Still if you act quickly enough or if you re lucky enough there s a chance that the following command might restore the file zap u filename Part Installation 8 Configuration QNX Operating System Z NE M M B M NE M O O O O O EEE BEER EEE EEE 33 3333 33 33 33 333 33 3 33 3 3 3 3 33 3 3 333 Recovering from a bad block in the middle of a file Administrator s Guide What to do if your system will no longer boot Hard disks occasionally develop bad blocks as they age In some cases you might be able to recover most or even all the data in a file containing a bad block Some bad blocks are the result of power failures or of weak media on the hard disk In these cases sometimes simply reading then rewriting a block will restore the block for a short period of time This may allow you to copy the entire file somewhere else before the block goes bad again This p
175. ties Disk recovery procedures What to do if your system will no longer boot Recovering lost files and directories Administrator s Guide Chapter8 Disk amp File Recovery 85 Overview of QNX 4 disk structure Introduction The QNX filesystem achieves high throughput without sacrificing reliability The filesystem is designed to be as robust as possible however there will always be situations in the real world where disk corruption will occur Hardware will fail eventually power will be interrupted and users will no doubt reboot the computer at just the wrong time The QNX filesystem has been designed to tolerate such catastrophies It is based on the principal that the integrity of the filesystem as a whole should be consistent at all times any single failure will damage no more than the contents of files opened for writing at the time of a crash Effectively this means that the most common types of failures power failure reboot CPU crash usually leave the QNX filesystem intact If a crash occurs we ve provided recovery utilities that let you examine the filesystem to determine if any damage was done to files there were open for writing at the time of the crash These same utilities can also fix such damage and in many cases will completely restore the filesystem Sometimes the damage may be more severe For example it s possible that a hard disk will develop a bad block in the middle of a file or worse in the midd
176. to modems Used in conjunction with tinit modem can provide excellent dial up capabilities A typical dial up system using ONX might have several serial ports dev ser1 dev ser2 etc and might use the following command to permit dial up access through Hayes compatible modems 40 Partl Installation amp Configuration QNX Operating System DPF PPT 393 3 7 3 1 1 II 5 a B SI II III III III II III III III 1233913 SESER Bu be ee Bu re En Zu Eu LE IB Eu En Eu EB Eu oe Bu Bu Bu ER Eu ED ee u Eu Eu Bi t I 33939399 The terminfo database Administrator s Guide Serial devices tinit c modem t dev serl dev ser2 amp The tinit utility will automatically launch modem on each of the serial lines When communication is established modem will do the following e answer the phone e determine and set the proper baud e execinto login When the user either logs off or hangs up tinit will once again launch a new modem which will wait for another call For more information see the documentation for modem in the Utilities Reference Full screen programs in QNX have access to a database of terminal capabilities known as the terminfo database which is implemented as a collection of files in the usr lib terminfo directory A separate file exists for each terminal supported in QNX These files use an industry standard format so can be shared between different UNIX systems Your QNX system will have been shipped w
177. to boot nodes 2 through 7 node 1 is the boot server which boots from disk so it doesn t need to be in the file f build ws f build ws f build ws2 f build ws f build ws images special oO WwW UN QNX Operating System 133 3333 3 233 133313 3 3 1333 3133 3 33313 3 3331 33 2333133331331 33 III III 3 3 3 3 3393 Step 5 Step 6 Step 7 Administrator s Guide Booting QNX over a network The first line build ws indicates that the buildqnx utility should be invoked to construct a workstation image ws on the fly On the standard distribution we provide a file by this name which is suitable for booting a machine as a network workstation The F images special line will ship the exact image in boot images special For more information see Chapter 7 Building an Operating System Image The above file will allow only nodes 2 through 7 to boot You could simplify the file as follows 4 f build ws2 7 F images special f build ws where matches any node Note that the must be the last entry in the file In this case all nodes except 4 and 7 will use the ws build file to construct a boot image Configure the network card See the information given in the documentation that was shipped with your network card or network ROM from Quantum Connect the card to the network You should now physically connect the new machine into the network Create a system initialization file Now create
178. tories on DOS disks with standard QNX utilities such as mkdir 1s and rmdir Most standard ONX utilities will work with DOS files provided that the DOS file structure allows for the functionality required by the utility Your own programs will also be able to process DOS files just as they process QNX files by using the standard I O functions such as open read write close seek etc When you read DOS directories they 11 be presented to you in QNX format Dosfsys has three invocation modes Dosfsys S s m dos drive gnx drive R Dosfsys i n node dos drive path Dosfsys x n node The i option lets you get information about the currently adopted DOS drives The x option terminates the Dosfsys server When this command is issued no new open requests will be accepted and the server will terminate once all active files i e files that are still open are closed If you don t specify i or x Dosfsys will start up and try to adopt the specified drives Chapter 5 Setting up a Second Filesystem 61 Setting up a DOS filesystem Starting Dosfsys Dosfsys name adoption DOS devices 62 When you start Dosfsys it performs the following actions e opens the specified drive s e adopts the root DOS name dos e registers the name qnx dosfsys with the local Process Manager If no options have been specified or if either S or s has been specified Dosfsys scans the dev directory
179. type Cylinder Cylinder Cylinders Blocks Dos 4 0 159 160 39165 QNX2 x 7 160 419 260 63700 77 420 854 435 106575 4 le mu Choose one of the partitions by typing the partition number OR moving the pointer with the UP DOWN arrows then choose one of the actions on the top line of the screen Drive dev hd0 Size 102 Mbytes Config 7 Heads Loader QNX 35 Sectors cyl 855 Cylinders 0 First 854 Last You ll see the available commands displayed at the top of the screen You select a command by typing its first letter or by moving the cursor to the command with the arrow keys and pressing lt Enter gt 142 Partil Managers Drivers 4 Utilities ONX Operating System 333933 393 9 3 3 3 9 1 3 3 3 3 BR DI TI I N DB I II I DD 3 Ji 3 33 3 3 1 31 3 3 3 3 3 3 PHI 13 3 3 3 3 3 PII FI IDI 3 3i3 1 Command mode Administrator s Guide fdisk create QNX disk partition QNX The commands are Next Prev 1 2 3 or 4 Change Delete Boot Unboot Restore Loader Save Quit Move the pointer to the next entry Move the pointer to the previous entry Move the pointer to the indicated entry Change the selected entry Delete the selected entry Turn on the boot flag for the selected entry Turn off the boot flag for the selected entry Restore the previous non QNX bootstrap loader Change the bootstrap loader to the QNX loader Save all changes and quit Quit without saving
180. utility e Pathnames are restricted to 256 characters e Appropriate privileges are required to copy special files e Blocks are reported in 512 byte quantities 0 Allinput files were copied 2 The utility encountered errors in copying or accessing files or directories An error will be reported for nonexistent files or directories or for permissions that don t allow the user to access the source or target files It is important to use the depth option of the find utility to generate pathnames for cpio This eliminates problems cpio could have trying to create files under read only directories Note also that the controlling terminal dev tty is used to prompt the user for information when the i or r options are specified pax tar cpio 123 CCECCECECECCCECCCGCECCCCCCGGCCCCCCCCCECECCCECCECECC 33333 333333 3 3333333 3 3 3 3 33 33 3 3333 3 31333 Dev device manager QNX Syntax Dev n max device amp Options n max device The maximum number of terminal devices to support default is 12 Examples Dev 6 Start Dev use defaults Dev n 100 Allow 100 devices Description The Dev manager is responsible for managing all terminal devices in a ONX system Once Dev is started you can then start individual driver processes which register themselves with Dev to support additional devices For example Driver Description Dev con console I O Dev par parallel O Dev ser serial I O Dev always su
181. ve a unique I O address and each adapter card must use a unique hardware interrupt The RS 232C asynchronous communications protocol defines the electrical and physical interface between Data Terminal Equipment DTE or terminals and Data Communications Equipment DCE or modems The following figure shows the cabling assignments of an RS 232 connection 25 pin connector 9 pin connector The host computer is usually configured as a DTE acting as a terminal device We assume that the computer will be connected to a modem device The RS 232 signals have the following names Tx transmit data Rx receive data RTS request to send CTS clear to send DSR data set ready DTR data terminal ready CD carrier detect RI ring indicator Chapter 3 Connecting Terminals Printers amp Modems 33 Serial devices Serial protocol Session control 34 Data is transmitted asynchronously using a bit protocol as shown below RUE DECEEE Data Parity Stop r bits bit bits Normally an RS 232 data line is in the SPACE 0 condition A transmitted character consists of bits in the following order 1 START bit always 1 2 5 to 8 data bits least significant bit first 3 parity bit optional 4 one or more STOP 0 bits The duration of each bit is defined by the baud rate which indicates the number of bits per second that can be transmitted Parity is optional but if used can be one of odd sum of
182. ve at one time See also buildqnx netnode netpoll sinit Utilities Reference netinfo 174 Part Il Managers Drivers amp Utilities QNX Operating System 1333333313331333 2113333 3 3 3 13333 3 31 31 331313 33 33 3 3339333 3 3 3 33 33 303 IE 1 3 3 BI I DI I 3 I III IB I III I IIIII I Syntax Options Examples Description Administrators Guide netnode display or change the Arcnet node permit bitmap QNX netnode ald nid end_nid a nid end_nid Allow qnx_vc_attach to node nid or to a range of nodes from nid to end_nid d nid end_nid Disallow qnx_vc_attach to node nid or to a range of nodes from nid to end nid To all of your etc config sysinit xxx files add the line net disallow Create a usr bin net_disallow script file which might look something like netnode d1 4 d7 d11 255 This would be for a 10 node network where nodes 1 2 3 4 and 7 are always running a different operating system nodes 11 through 255 are masked off because they are known to not exist The netnode utility lets you display or change the Arcnet node permit bitmap to optimize network response Arcnet internally maintains a bitmap of all 255 possible nodes which is used to determine whether or not a gnx vc attach is permitted to another node on the network When Arcnet first starts up by default all nodes are permitted The benefit of the node permit list is to speed up commands like sin net on
183. voiding conflict with dynamic memory refresh This may provide higher disk throughput Fsys aha is the driver for the Adaptec SCSI disk controllers including these models AHA 1540A 1542A AHA 1540B 1542B AHA 1642 These devices are generically referred to as AHA devices Adaptec Host Adapter Fsys aha 151 Fsys aha Adaptec SCSI host adapter QNX IS See also Caveats The Fsys aha driver e doesn t require any specification of drive parameters this information is provided by the drive s e uses the Direct Memory Access technology on the AHA controller to transfer data between memory and the SCSI device e allocates DMA buffers of maxsize x 512 for each fixed disk device it detects on the SCSI BUS The Fsys aha driver makes its code and data available to the local Filesystem Manager Fsys which then invokes that code and data via direct calls Once Fsys has adopted this code and data Fsys aha terminates as a process This driver works only with the Adaptec SCSI controllers and not with other manufacturers controllers Fsys ps2s Fsys drivers AHA 1540 1540A 1542A User s Manual IBM AT Technical Reference The AHA controller has configuration parameters for setting the transfer speed of its DMA circuitry the Fsys aha driver doesn t change these values Setting the transfer speed too high may affect operation of DMA based devices including the Fsys floppy driver Any driv
184. wd is the driver for the Fixed Disk interface defined by IBM for the PC AT computer This interface is based upon a Western Digital 1010 05 Winchester Disk Controller Many controllers are register level compatible with this controller including AT MFM RLL IDE WD1007ESDI etc In order to obtain drive parameters Fsys wd examines values established by the BIOS of your computer If necessary you can override these default parameters via the c option Fsys wd 163 Fsys wd driver for PC AT fixed disk interface QNX The m maxsize option defines the largest single read or write the driver will support The default value of 34 is appropriate for a non interleaved drive For other configurations you can alter this value For example you can specify 17 for a 2 1 interleave The Fsys wd driver makes its code and data available to the local Filesystem Manager Fsys which then invokes that code and data via direct calls Once Fsys has adopted this code and data Fsys wd terminates as a process See also Fsys Fsys drivers 164 Part Il Managers Drivers amp Utilities QNX Operating System 333939399993 9393993939 9 3393 3 9 3 3 3 3 3 3 3 3 3 9 9 1 I I I 9 9 9 DI 3313323333331 2113 33 3 3 3 1 3 I I I I I 1 3 1 1 I I 3 III license license software for use QNX Syntax Options Examples Description Administrator s Guide license source destination source The source of the serialnumber
185. x utility reads and writes archive files that conform to the archive interchange file format specified in IEEE Std 1003 1 1988 The utility can also read but not write a number of other file formats Support for these traditional file formats such as V7 tar and System V binary cpio format archives is provided for backward compatibility and to maximize portability The pax utility will also support traditional epio and System V tar interfaces ifinvoked with the name cpio or tar respectively The pax utility is capable of reading and writing archives that span multiple physical volumes Upon detecting an end of medium on an archive that is not yet completed pax will prompt you for the next volume of the archive and will let you specify the location of the next volume Combinations of the r and w command line arguments specify whether pax will read write or list the contents of the specified archive or will move the specified files to another directory When writing to an archive the standard input is used as a list of pathnames if no pathname operands are specified The format is one pathname per line Otherwise the standard input is the archive file pax 183 pax portable archive interchange POSIX Files Exit status Caveats See also which is formatted according to one of the format specifications in IEEE Std 1003 1 1988 The user ID and group ID of the process together with the appro
186. xed blessing Users of a QNX network will enjoy the ease of access to network resources The system administrator on the other hand must take steps to prevent misuse and uncontrolled access to some resources Some devices such as hard disks can be readily accessed by many users concurrently But other devices such as printers and modems can t be used by more than one user at a time Access to such resources therefore requires some sort of sequencing or spooling Print spooling QNX provides a set of spooling services to allow convenient access to shared resources such as printers Spooling is a simple process where data is written spooled into a disk file rather than directly to a hardware device This process can occur for many users simultaneously You can set up a system spooler process that takes print files and sends them to the printer one at a time The QNX print spooling server is lpsrvr The ONX print spooling utilities are lp send files to a printer lprm remove jobs from the printer gueue lpc control print spooler queue lpg display print gueue status The server lpsrvr is documented in Part II of this guide For documentation on the other print utilities see the Utilities Reference 46 Partl Installation amp Configuration QNX Operating System 1J33 133 33 3 3 333 3 3331 33 331 351 333 333 3 13131 313 3 3 3 3 3 3 3 3 I VID FI VI 3 3 3 3031 i3 3 3 3 3 3 3 3 3 0 3 3 3 Submitting print
187. ys ps2m examines values established by the BIOS of your computer If necessary you can override these default parameters via the c option Fsys ps2m 157 Fsys ps2m driver for the IBM PS 2 MFM Disk Controller QNX The Fsys ps2m driver makes its code and data available to the local Filesystem Manager Fsys which then invokes that code and data via direct calls Once Fsys has adopted this code and data Fsys ps2m terminates as a process 158 Part Il Managers Drivers 4 Utilities QNX Operating System 13313 33 3 31333333333 33333331133121 372131 331 331 31 7 33333333 3 3 333 3333333 33 3 33333 33 3 333 33333333 Syntax Options Description Administrators Guide Fsys ps2s driver for the PS 2 SCSI controller QNX Fsys ps2s a controller i interrupt m maxsize n name a controller The controller address default is 3540 hex i interrupt The interrupt level used by the controller default is 14 m maxsize The maximum number of blocks that will be transferred from the disk to memory in one operation default is 34 n name The name of the block special device associated with the hard disk The default is hd which yields a device name of dev hdn where n is a unit number assigned by Fsys Fsys ps2s is the driver the IBM PS 2 SCSI Disk Drive Adapter The Fsys ps2s driver e doesn t require any specification of drive parameters this information is provided by the drive s

Download Pdf Manuals

image

Related Search

Related Contents

Compact portable 2.0 active speaker system with built-in  Wiley AutoCAD 2010 For Dummies  

Copyright © All rights reserved.
Failed to retrieve file