QNX Admin Book
QNX Admin Book
0 Operating System
Administrator's Guide
Quantum Software Systems Ltd.
175 Terrence Matthews Crescent
Kanata, Ontario K2M 1W8
Canada
(613) 591-0931
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.
,_.,
,_.,
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: ,_,
cp.io, pax, and tar-developed by Mark H. Colburn and sponsored by The USENIX Association. ,.....
,.,.,.,
freeze and melt-Leonid A. Broukhis
,...
,...
Reference Example
command names ls
data types long
environment variables PATH
error numbers [EINTR]
filenames /dev/tty
functions system()
function arguments argl
global externals errno
headers <sys/stat.h>
options -c
option arguments -w width
operands file_name
parameters <directory pathname>
symbolic constants {_POSIX_VDISABLE}
Chapter 1 Installation 3
Installing QNX on a hard disk 4
B ooting QNX over a network 5
The system initialization file 8
Initial boot 8
B ase-level services10
Optional services 12
Setting your time zone 1 3
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
Building a Custom
Operating System Image (cont'd)
Selecting processes for an image 79
Disk images 80
The Mak:efile 80
Copying an image to /boot . 81
Network images 82
Embedded images 83
Index 207
In this Part...
Installation
Setting up User Accounts
Connecting Terminals, Printers, & Modems
Print Spooling
Setting up a Second Filesystem
Making Backups
Building a Custom Operating System Image
Disk & File Recovery
The Quantum Update System
Chapter 1
I nstal lation
In this Chapter...
Installing QNX on a hard disk
Booting QNX over a network
The system initialization file
Setting your time zone
Licensing
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.
install
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.
� Before you boot over the network, you must first install QNX 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.
�
� Step 1 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.
,_.,.,
�
Step2 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&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
� tolerance, 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 morning.
When a node boots, it sends a boot request to its boot server. When
the network manager receives a boot request message, it forwards
this request to the netboot utility, which must be running on the
boot server if the request is to be honored.
When you boot over the network, the operating system image loaded
will inherit the following from the boot server:
• the time
netboot &
2 f=build/ws
3 f=build/ws
4 f=build/ws2
5 f=build/ws
6 f=build/ws
7 F=imaqe s / special
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=imaqe s / 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.
You should now physically connect the new machine into the
network.
Note that you can still boot without creating a custom system
initialization me. If you boot without creating your own file, the
default me /etc/ confiq/sysinit will be used. That file should
contain generic commands suitable to start any machine.
The last process is the s init 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 ftle that runs in exactly the same manner as any other
shell file except that breaks are disabled.
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, s init 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). If the open succeeds, then s init will exec into the
Shell (/bin/ sh) with the file it opened as an operand. The Shell
replaces s init , whose job is now done.
If (and only if) sinit can't open this first file, it will attempt to open
the I etc/ confiq I sys ini t 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:
For any given node in the network, a total of three potential files may
be executed by s init:
• sys init.node
• sys init
sysinit .node 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 s init 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 .
al.t sys init This file is executed only if you boot from the local disk and specify
an alternate boot by pressing <Esc> when you are prompted to do so
just before the QNX loader loads the operating system image.
The al.t sysinit 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.
Note that the alt sysinit file is never used by a node that boots
over the network. In this case, you can correct any problems in a
modified sys init.node on the up-and-running boot server node.
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 sys init file. Once you're satisfied that the
machine is functional, you can then create a node-specific
initialization file.
Base-level The contents of each machine's system initialization file reflects the
services hardware on that machine and the services you wish to provide. The
following describes a base set of services that will be in most
initi alization files.
The following lines define the time zone (EST in this case) and get
the time from the realtime 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.
The following lines start the Device Manager and the console driver
with eight virtual consoles, then instruct the Shell to reopen its
standard 1/0 through the new console device.
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 COMl and COM2,
and a parallel driver. These drivers will terminate if they can't find
the needed hardware.
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 1 9200:
If your programs use floating point and you don't have an 80x87
chip, you need to start the floating point emulator:
emu87 &
The following line starts a login on the first console and arms all
other consoles. 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 &
Optional services 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.
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 it 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):
netboot &
If this is a machine that you hope will be available at all times, you
may select it as a global name server:
nameloc &
If this is a machine that you hope will be available at all times, you
may also select it as a cron server:
cron &
Start a clock that will continuously display the time in the upper right
- comer of the screen:
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.
Establishing the You should establish time zone information before setting the current
time zone 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.
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 , M1 0 . 5 . 0 / 3
where:
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 rtc utility to establish the current
the realtime clock date and time from the realtime clock. The following two lines would
accomplish this:
export TZ=EST5DST4 , M4 . 1 . 0 / 3 , M1 0 . 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:
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 rtc utility
with the 1 option:
-
rtc -1 hw
This invocation of rtc assumes that the realtime clock was set to
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.
Licensi ng
Operating QNX must b e licensed for each computer it runs on. This is true
system licensing whether you're using 10 standalone machines or 1 0 networked
machines.
You can use the s in utility to query the number of nodes your
network has been licensed for.
Typing:
sin info
Locators : 1 4
The number under the Nodes heading (in this case 10) indicates the
number of nodes licensed within this network.
Application Applications are usually licensed per node or per concurrent use.
licensing
Per node licensing Some applications are licensed per node in a QNX 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.
Concurrent use licensing 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.
Expanding your You expand your license size for the operating system or an
license application using the license utility. This utility installs license
serial numbers from floppies to your hard disk. Each QNX boot
diskette and application diskette contains a serial number license for
one node (or for one use).
license /dev/fdO
You can list the serial numbers you own by doing an ls 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 se1ial 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, & Utilities.
In this Chapter...
Security
Accounting file
Security
QNX provides mechanisms to control access to resources and critical
system functions. These mechanisms are based on the ability of the
system to identify a particular user.
The l.ogin utility The login utility should be started by tinit on all tty devices. The
login utility demands a usemame and password which it verifies in
the password database. If the user fails to enter a correct
usemame/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 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 pas swd util ity The pas swd 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 pas swd
utility will insist that the password consist of at least six characters
from at least two different character classes. Examples of character
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.
The pas swd 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:
• user name
• useriD
• initial password
• home directory
• shell
• 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 pas swd utility doesn' t provide any mechanism for deleting
accounts. This function may be performed using a text editor on the
/etc/pas swd, /etc/group, and /etc/ shadow files.
-
The newqrp utility The newqrp utility changes the current process 's real and effective
group ID. If invoked without arguments, newqrp 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.
User and group QNX uses two pieces of information to control access to resources :
IDs
• user ID
• group ID
The user ID should be unique-that is, no two users should share the
same user ID. This rule is enforced by the pas swd utility, but the
superuser can override this rule by editing the password file directly.
File permissions All files and directories in the QNX fllesystem have three sets of
access fields corresponding to:
• owner
• everyone else
All files and directories also have fields that identify the owner and
group of the me.
setuid and setgid 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.
The pas swd, login, su, and newqrp utilities are all "setuid" to
root ; these programs therefore run with the permissions of the
superuser.
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 .
• /etc/shadow
• /etc/group
/etc/passwd The I etc/pas swd file contains a set of lines in the following
format:
where :
-
Administrator 's Guide Chapter 2 • Setting up User Accounts 23
-
Security
-
-
where:
-
/etc/shadow The I etc/ shadow file contains lines in the following format:
where:
You may notice from the above permission list that /etc/pas swd 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 I etc/ shadow file, which is
readable only by the superuser. This is to inhibit unauthorized
attempts to decrypt the passwords by malevolent users. As a system
administrator, you should ensure that these permissions are
maintained. -
The first job, after the system is installed, is to set up passwords for
all the system accounts and to defme any user accounts. You
perform both of these functions with the pas swd utility. By
convention, user accounts have a user ID greater than or equal to 1 00.
Default The default /etc/pas swd file that was shipped with your QNX
password files system contains the following:
root : : O : O : : / : /bin/ sh
root : : 0 : root
Accou nting fi le
Accounting information i s logged t o the I etc/ accloq file. I f this
file doesn't exist, all accounting information will be discarded. This
is the normal mode of operation after QNX has been installed.
Enabling accounting To enable accounting, you create an empty I etc/ accloq file. You
can do this using the touch utility:
touch /etc/accloq
chmod q= , o= /etc/accloq
Note that only the superuser (user ID root) should create and
modify this file.
Record format Each record in this text file is of the form:
tttttttttt cc data...
This record shows that t init 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 log doesn't show a logout. The logout
is inferred, because in the final entry t init starts another modem
program.
The total connect time for the user (from successful login) can be
calculated thus:
Clearing the logfile Once you create I etc/ acc1og, 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).
mv /etc/acc1og /etc/acclogs / 9 1 0 6
touch /etc/acc1og
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 I etc/ acc1og directly.
Note also that other utilities (possibly third-party) may add their own
accounting records to the /etc/acc1og file. Utilities may also log
problems or unexpected events to the I etc/ sys 1og text file.
In this Chapter...
Starting device drivers
Parallel devices
Serial devices
Once Dev has been started, one or more of the following device
drivers may be started:
Started this way, the parallel driver will create a device called
/dev/par, which corresponds to the first parallel port found by the
BIOS (LPTl ) .
Multiple parallel If your machine has more than one parallel port, then you '11 need to
ports start an additional Dev . par for each extra port. You must provide a
unique name for the extra devices. For example:
Output buffers If you have the memory, you might find 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:
Serial devices
Hardware
adapters
1/0 addresses 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, 1 6450, or 1 6550 family of serial
controllers.
Each UART exists in the 1/0 address space of the computer at eight
consecutive addresses. The Dev . ser driver is informed of the 1/0
address range for each UART by command-line arguments when it is
started.
Hardware interrupt Just as important as the 1/0 address is the hardware interrupt
generated by each UART. Most microcomputers provide several
hardware interrupt signals on the bus, labelled IRQ2 through IRQ I S
(except for interrupts 0 , 1 , 8, 9, and 1 3 , which are used internally by
the system motherboard) .
Multi-port serial adapters You can usually configure multi-port serial adapters to respond to a
wide range of 1/0 addresses. The adapters may also give you
considerable flexibility in selecting hardware interrupts. A good
choice for 1/0 addresses is often the 280 through 2BF range.
CPU Bus
Adapter cards Serial devices
3F8
IRQ4 COM1
2F8
IRQ3
COM2
280
288 8-port
serial
adapter
288
card
IRQ5
For proper operation, each serial channe l must have a unique 1/0
address, and each adapter card must use a unique hardware interrupt.
,---- ,-----
2 Tx 1 CD
3 Rx 2 Rx
4 RTS 3 Tx
5 CTS 4 DTR
D . 6 DSR D D 5 Gnd D
-
T c T. c
E 7 Gnd E E 6 DSR E
B CD 7 RTS
20 DTR 8 CTS
� �
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.
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
·-----------------------
Mark
0 0 0 Space
Start Data Parity Stop
bit bits bit bit(s)
The duration of each bit is defined by the baud rate, which indicates
the number of bits per second that can be transmitted.
Session control 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.
Some modems will also indicate that they have detected (but not yet
answered) an incoming call by raising RI.
Flow control 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.
Configuring You use the stty utility to set the four major parameters that define
serial ports an RS-232 link.
Data bits QNX supports four character sizes . You choose the size of data
character with the stty utility:
stty bit s =5
stty bit s =6
stty bit s = 7 or
stty bit s = 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.
Stop bits 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=2
Parity To disable the transmission of parity bits, and suppress the checking
(in hardware) of received parity bits, you specify:
-
If parity is used, you specify one of the following values :
stty par=odd
stty par=even
stty par=mark
stty par=space
Baud rate You can specify the baud rate with the baud=number option of the
stty utility:
stty baud=number
Connecting
serial devices
High-speed ECC 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. 1 9200 baud) and
use the RTS/CTS handshaking lines to regulate the actual flow of data
over 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
Computer CTS
High-speed
modem
DSR
DTR
CD
Rl
Gncl
Tx
Rx
RTS
Computer CTS
Standard
modem
DSR
DTR
CD
Rl
Serial printers 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
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 --
Tx --
Rx --
X
RTS --
CTS -- X
DSR --
DTR -- X
CD --
Rl --
Termi nals 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.
---- Gnd --
X
---- Tx --
---- Ax --
- - - - - - - - - RTS
X
- - - ·
- - - - - - - - - CTS - - - ·
- - - - - - - - - DSR - - - -
- - - - - - - - - DTR - - - - X
- - - - - - - - - CD
- - - - - - - - - Rl
Simple example Assume a terminal, properly connected and configured, on the serial
port /dev/ serl . The simplest way of allowing a user sitting at that
terminal to log in is to use this command:
Automated login 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 I dev I serl and
ldevl ser2, you can use the following command:
Launching custom You don 't have to always start up login. You can specify any
applications program or even specify a different program on each device. In some
environments, a "canned" application is always expected on a given
terminal.
When the user either logs off or hangs up, t init will once again
launch a new modem, which will wait for another call.
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 with
several of these files, with names such as :
If you don't have a terminfo file for your type of terminal, there
are several things you can try :
• use infocomp and tic to make your own terminfo file based
on the reference manual for your terminal
Defining terminal type 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.
Troubleshooting The following table describes actions you can take if you encounter
serial device · some of the common problems involved in connecting serial devices.
problems
Data characters are Wrong baud rate or parity Use stty to set correct baud rate and/or
unrecognizable parity
Some characters are Wrong parity Try different parity using stty
fme, some aren't
No data can be sent or Wrong cable Check cables; use null-modem if necessary
received
Wrong 1/0 ports Check hardware settings and verify correct
parameters to Dev . ser
Data is received and Interrupt conflict Check hardware interrupts and Dev . ser
transmitted only when startup parameters; make sure that two
another serial port is in serial adapters are not using the same IRQ
use
Data is lost Flow control supported, Determine the type of flow control
occasionally but not enabled supported by the device, and enable with
stty {ihflow, ohflow, is flow, and
os flow)
Flow control not supported Reduce baud rates and/or increase stop bits;
if only received data is lost, specify larger
input buffer to Dev . ser ( - I option)
In this Chapter...
Sharing devices in a network
Print spooling
Configuring the spooler
Pri nt spoo l i ng
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.
lpsrvr
Submitting print Users submit jobs to the spooler using the lp utility. For example,
jobs 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 queue the submitted jobs
and will ship them to the actual printer one at a time.
Querying print A user may wish to examine the printer queue using the lpq utility.
jobs A sample output from the lpq utility might look like this :
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
lp utilities.
Cancelling print The lprm utility lets the user remove jobs from a print queue. Jobs
jobs may be removed by explicitly specifying the job ID number(s). If the
state of the system print queue was as shown above, steve 's job
(job #39) could be cancelled with the command:
lprm 3 9
lprm steve
Controlling the The lpc utility is a system administration tool for managing the
print q ueues 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:
Note that lpc 's functionality overlaps that of lprm and lpq. This is
for convenience, since lpc may be used in an interactive mode.
lpsrvr &
The lps rvr utility manages two primary objects: queues and
dequeues. Queues are intemal lists of data files that need to be
printed. Dequeues are the processes that actually print the data.
You can specify a program to run that will serve as a filter to control
how data is "copied in" to a queue, 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:
Jobs are submitted, via lp, 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 queue.
A dequeue will process data from a queue based upon priority, then
upon time of job submission.
Multiple dequeues may serve the same queue. In this case, the
spooler will select a dequeue based upon availability.
Spool When started, the spooler accesses a file to get its configuration
configuration file information. If no file is specified on the command line, the spooler
uses the /usr/spool./l.p/ . setup file. This configuration file
defmes queues, dequeues, and the relationships between them.
The name may contain only alphanumeric characters and slashes (1),
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.
key Boolean
key# number Numeric
key=string Character
\:
\\
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.
Example configuration The following example shows a set of queues that share a common
file dequeue. The three queues are named:
• ps (PostScript files)
txt
text2ps
._____
__ _.
1---· \ queue �
_
ps
_________ _ \ queue ir--r---. /dev/pa;r
-
gi:f2ps
__
._____ _.
1---• 1 queue � -
-
-
Users send files with the lp 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. -
-
-
-
-
First, notice that in 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.
A more complicated The following example is a further refinement of the above setup
example with some additional features required for a larger configuration .
There are n ow three laser printers, all PostScript, located at different
locations in the building (connected to I l l ldevlserl ,
I l 2 l devlserl, an d I l 3 ldevlserl ) . The configuration looks like
this:
txt
text2ps
�I queue
I rl I I l ldevlserl
�
ps
8----
Select
unused
dequeue
r-+ 1 ll2ldevlserl
�
gif
gif2ps
�E_j �� ll3ldevlserl
�
Chapter S
Sett i n g u p a Seco nd Fi lesystem
In this Chapter...
Partitioning the pathname space
Setting up a DOS filesystem
Introd uction
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 1/0 managers, which in tum map to disks and devices.
For more information on the prefix tree, see the chapter on "1/0
Namespace" in the Users Guide.
A hard disk and The hard disk is mounted as slash (/) and forms the root of the
a floppy filesystem. The floppy is mounted as l fdO :
mount ldevlhd0t 7 7 I
mount ldevl fdO l fdO
Two hard disks The first hard disk is mounted as slash (/) and forms the root of the
(same node) filesystem. The second hard disk is mounted as lusr2 :
-
mount ldevlhd0t 7 7 I
mount ldevlhdlt 7 7 lusr2
-
Any reference to a pathname starting with lusr2 will be directed to
a QNX filesystem on the second hard drive. For example:
Two or more You can have three QNX partitions on a single hard drive. The
QNX partitions 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 ldevlhd0t77 I
mount ldevlhd0t7 8 lusr2
Local and In a local area network, you might have disks with QNX filesystems
remote hard on more than one machine. You may configure these filesystems to
disks be:
-
• independent
• primary/secondary
• linked independent
Primary/secondary 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 lusr2 . Node 1 boots from hard disk and has
-
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 :
Node 2 boots over the network from node 1 and has its filesystem
root set to /=/ / 1 / using the -r option of the s init utility built into
the operating system. Its system initialization file would invoke the
mount utility to mount the local filesystem as follows:
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 I and the
filesystem on node 2 as /usr2 .
On node 1 : On node 2 :
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).
In the examples in this section, you ' 11 notice that local fllesystems
are associated with block special files (e.g. /dev/hd0t 7 7), while
remote filesystems are associated with pathname prefix mappings.
This prefix mapping redirects requests to a remote fllesystem that
will be associated with a remote block special flle.
You can create flles 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 QNX utilities, such as
mkdir, l. s , 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 flles just as they
process QNX files, by using the standard 1/0 functions such as
open(), read(), write(), close(), seek(), etc. When you read DOS
directories, they 'll be presented to you in QNX format.
Dos fsys [ - S 1 s ]
- [ -m] [dos_drive=qnx_drive [ , R] ] ... &
Dosfsys -x [ -n node ]
The - i option lets you get information about the currently adopted
DOS drives. The -x option terminates the Dos fsys 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, Dos fsys will start up and try to adopt
the specified drives.
Starting Dos fsys When you start Dos fsys , it performs the following actions:
• registers the name qnx/dos fsys with the local Process Manager
Dos fsys name Dosfsys can adopt up to eight drives (a to h). As mentioned above,
adoption 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 floppy diskette
The same could be done with a hard disk partition. Dos fsys will
-
handle these images just as it would the actual device.
DOS version The Dos fsys manager supports all DOS partitions formatted with
support DOS 2. 1 or later, including standard primary DOS partitions and DOS
large partitions (DOS 4.0 >32M). Hard disks, 5 W' floppies, and 3 W'
floppies are supported.
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/hd0t5t l
The ending t l indicates that this is a type 1 DOS partition within the
type 5 extended partition-this is the way DOS handles extended
partitions.
Dosfsys - s e=/dev/hd0t5t l
DOS partition These are the standard DOS hard disk partition types :
types
Partition type: Description:
DOS text files DOS uses a structure for text files that's different from the one used
in QNX (by text files we mean line-oriented files containing lines of
ASCII text separated by line separator sequences). In DOS , each line
of a text file is terminated with a carriage return sequence (CR/LF) ,
while in QNX 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 character of the file. This is
also treated as is.
DOS binary files Since Dos fsys doesn 't translate the contents of files, binary files
may be copied to or from the QNX/DOS partitions as is.
QNX to DOS DOS doesn't permit certain characters within a filename; it also
character and doesn't allow certain filenames.
name mapping
In DOS, you can't include any of these characters in a filename:
I \ * + = ?
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 volume DOS uses the concept of a volume label, which is an actual directory
labels entry at the root of a DOS filesystem. To distinguish between the
volume label and an actual DOS file, Dos fsys places an equal sign
(=) as the first character of the volume label name. Dos fsys treats
this directory entry as a zero-length, read-only file whose
permissions cannot be changed.
DOS/QNX DOS doesn't support all of the permission bits that QNX does. The
permission DOS attribute bits are as follows:
mapping
READ_ONLY
HIDDEN
SYSTEM
VOLUME_LABEL
DIRECTORY
ARCHIVE
Dos fsys uses the following mapping logic to handle the QNX to
DOS attribute-bit translations:
• if the entry is a file, and if all of the QNX WRITE bits are off, set
the DOS READ_ONLY bit
• set the QNX READ permission bits for user, group, and other
• if the entry isn 't a volume label, and if the entry isn 't read only,
set the QNX WRITE permission bits for user, group, and other
File ownership 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()
library 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.
Error codes If a request made to Dos fsys isn't supported, the EOPNOTSUPP
returned by error code will be returned to the application making the request.
Dos fsys Examples of requests not supported by Dos fsys include:
LINK
BLOCK_READ
BLOCK_WRITE
MOUNT_PARTITION
MOUNT_RAMDISK
PIPE
DISK_GET_ENTRY
RECORD LOCKING
The DOS ftlesystem 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) .
r-.
�
<-"
�
�
,...,
(1"1'1
r-"1
r-"1
r-"1
�
f""J,
,..,
�
�
�
�
r-"1
r'-1
r'-1
�
�
,.,..
�
f!-1
�
,...,
�
,...,
�
,...,
,...,
�
�
,...,
,...,
r'-1
r'-1
,...,
,..,
�
,...,
Chapter 6
Maki ng Backu ps
In this Chapter...
Introduction
When to back up
Backup formats
Backup media
Compression
Archive examples
Introd uction
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!
When to back up
You should back up often enough so that you c an 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 fmancial 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:
• archives
• regular filesystems
• cpio
• tar
• pax
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.
If you wish to save data for restoration on a UNIX system other than
QNX, don 't use free ze 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.
Backup med ia
Your choice of backup media will b e determined b y available
hardware and cost. There are four common choices:
• floppy
• tape
• removable disk
• fixed disk
Floppy Floppies are the most widely available device for backups. Their
major shortcoming is their limited size. Since the QNX pax and vol
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.
I f you use a n 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:
You may now treat the floppy as a QNX filesystem mounted as / fdO .
Tape QNX provides a driver for the QIC-02 interface standard. This is a
standard Y4-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 . qic02 . For most people, the following command line will
start the driver, which will then create a block special file for the tape:
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.
tape erase
Removable disk 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 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.
Fixed disk 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.
Com pression
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 1 0%. Although compressing may save media
space, it has two side effects:
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
Tape archive Start a new tape archive and save all flies onto a QIC-02 tape :
tape erase
pax -w I >/dev/qic02
Append flies that have changed since the date of the file last save
to the end of an existing archive tape. After the save, update the time
of last save:
tape forward
find I -newer last save I pax -w >ldevlqic02
touch last save
Restore all the files on a tape that are under the directory
lusrlrobo:
tape rewind
pax -r " lusrlrobol * " <ldevlqic02
Cartridge/optical Copy all files from the filesystem on node 1 to the filesystem on
node 2:
cp -Rp 1 1 1 1 1 1 2 1
cp -Rp 1 1 1 1 / l 2 1 fri
cp -Rp -a date I 1 1 1 I l 2 lmon
cp -Rp -a date I 1 1 1 I l2 1tue
In this Chapter...
Introduction
Constructing a build file
I ntrod uction
QNX is a modular operating system composed o f a microkemel 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
processes that provide these services into a custom-built operating
system image. You create this image with the buildqnx utility. The
image can be booted from disk by the QNX partition loader or booted
over the network using the netboot utility.
Constructi ng a bu i ld fi le
The buildqnx utility takes a text file containing a list o f 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.
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.
/bin/Fsys
$ 0 Fsys -x 2
Setting the heap When an image is created for a process, space is reserved in the
size 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, & Utilities.
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 QNX 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
required processes:
If you want to use the QNX network, you 'll also need to include the
Network Manager (/bin/Arcnet)
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 defmed:
-
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 imaqes / buildfile image file
$p p=parameters none hard disk parameters
FILES = @build/ $b
d = Fsys . wd
h = /dev/hdO
= $b
$b : images/$b
make b=hard
Copying an Once you've built an image, it won't become the new boot image
image to . /boot until you copy it to the I . boot file. However, before you do this,
you should make a backup of the current I . boot file by copying it
to the I . al tboot file:
cp / . boot / . altboot
If for any reason your new image doesn't work properly, you can
press <Esc> when prompted during the boot process and load the
. I al tboot 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/alt sys init file. You should ensure that the
-
alt sys init file contains the latest copy of your working sysinit
file:
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.
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.
Network images 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 / image s /ws :
make b=ws
In this Chapter...
Introduction
Overview of QNX 4 disk structure
File maintenance utilities
Disk recovery procedures
What to do if your system will no longer boot
Recovering lost files and directories
Introd uction
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.
-
If you have a C development package, the header file <sys/fsys.h>
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.
Partition A QNX filesystem may be an entire disk (in the case of floppies) or it
components may be one of many partitions on a hard disk. Within a disk partition,
a QNX filesystem contains the following components:
Loader
Root block
-
- -
Bitmap
-
r-
-
r-
- Root directory
- -
-
-
�
Other data
1 1
1) loader block
2) root block
3) bitmap blocks
4) root directory
Loader block The first block of a QNX partition, the loader block contains the
- bootstrap loader that loads the QNX OS into memory.
Root block 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.
Bitmap blocks 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).
Bit assignments start with the least significant bit of byte 0 of the
first bitmap block-which corresponds to QNX block # 1 .
Root directory The root directory follows the bitmap blocks. The root directory i s a
"normal" directory (see "Directories," below). It is initially created
by the dinit utility with enough room for 32 directory entries (4
blocks).
I
,---
I
f--
I
r---
.bitmap J
r---
.inodes I
f--
.boot I
1----
.altboot I
r---
Directories 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:
Offset
dUname [16)
0
d_size
16
di first x1nl
20
di_xblk
28
di_ftime
one physical block 32
di_mlime
of a directory 36
di_atime
40
44
di_ctime
0 di_rwm_xln1s
48
1 50
dl mode
52
di uid
2 di..,!lid
54
3 56
di_nlink
58
di_zero [4)
4 di_lype
62
d status
5 63
6
7
The first directory entry is always for the file " . " and includes a
directory signature ("I • 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.
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 (Ox08) of the
_
d status field being set.
_
For these files, a portion of the directory entry is moved into the
I . inodes file.
b--J
0 0
48
dljnode_blk
16 Lsize
52
dl_inode_ndx
20
l_first Xb1l
dl_spare [10] l_xblk
53 28
d_status Ulima
63 32
l_mtime
36
l_atime
40
44
I_clime
l_num xtnts
48
50 Lmode
52
l_uid
54
LIJid
56
i nlink
58 I_zero
62 I_type
63 I_status
Extent blocks Extent blocks are used for any file that has more than a single extent.
The directory entry di xbl.k points to one of these extent blocks,
_
which in turn defmes where the second and subsequent extents are to
be found.
xblk_next_xblk
0
xblk__prev_xblk
4
xblk_num_xtnts
8
xblk_spare [3)
9
xblk_num_blocks
12
xblk_xtnts [0]
� +m d
16
lk_ ]
24
• forward/backward pointers
• a count of extents
• a count of all the blocks in all the extents defined by this extent
block
• a signature ("lamXblk")
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.
Signatures
"'QNX In "do1" entry of
each dii8Cloly.
fam)(ljk In header of
each elden! blod<
Extent blocks
extent!
IJ
• £di sk
• dinit
• chkfsys
• zap
• spatch
fdi s k The £di sk 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, £di sk can create it.
dinit The dinit utility creates (but Fsys maintains) the following:
• boot block
• root block
• bitmap blocks
• root directory
The chkfsys utility assumes that the root block is valid. If the root
block isn't valid, chkfsys will complain and give up-you'll need
to try restoring the root block with the dinit utility.
zap 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:
• 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.
spat ch The spat ch 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 spat ch.
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, chkfsys 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.
• fix the file size in a directory entry to match the real data
When to run chkfsys 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.
If you " zap" any files for any reason-possibly because chkfsys
suggested you do so--you' ll need to run chkfsys at some point to
recover the lost blocks on the disk.
Using chkfsys in a live If you're running an application that can't afford downtime, you
system 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 - £ /dev/hd0t 7 7
The - fix mode won't b e able t o correct problems, but i t 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:
chkfsys -R /dev/hd0t 7 7
Remember that you must not use "Rambo" mode unless you are sure
that:
• the affected files will not be opened during the rebuild process
• 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:
• the directory entry for that (now deleted) file must not be reused
• the disk blocks previously used by the file must not 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
Recovering from Hard disks occasionally develop bad blocks as they age. In some
a bad block in cases, you might be able to recover most or even all the data in a file
the middle of a containing a bad block.
file
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 procedure 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 I bad blks file), then
.
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 chkfsys .
The following steps can help you identify the problem. Where
possible, corrective actions are suggested.
I f you do have a If you have a network to boot over, try booting your machine over
network. . . the network. Once the machine is booted, you'll need to start up a
local fllesystem:
Fsys &
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 1 dev /hdO that
represents the entire hard disk.
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/hdO
At this point, you still don 't know the health of the fllesystem on the
QNX partition. Your goal now is to run the chkfsys utility on the
disk to determine-and possibly fix-the fllesystem. But first you ' ll
need to create a mount point for a QNX fJJ.e system. 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:
If the mount fails 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 fJJ.e system).
In this case, you can use the dinit utility to overlay sufficient good
information onto the disk to satisfy Fsys :
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 fJJ.e system called /hd.
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 the disk is If, for any reason, your disk is completely unrecoverable, read the
unrecoverable 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 the filesystem If your filesystem is intact, yet the machine still refuses to boot from
is intact hard disk, then either of the following is probably damaged:
dinit -b /dev/hd0t 7 7
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 for the spatch utility (see the Utilities Reference).
The lost+found The spatch utility can take a range of disk blocks and link them into
directory 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 1 26 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.
Using spat ch The spatch utility has a special menu item, called Mark, that allows
you to identify a range of disk blocks.
The first time you select 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:
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 xblk 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 containing
just these blocks.
�
�
I'-'
�
�
�
(i""'
�
�
rw-.
fM!!">
(WI
,_,
("&.
�
�
fii""t
,_,
,_,
(WJI
�
,_,
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
1'-1
r-.
Chapter S
The Quantu m U pdate System
In this Chapter...
Introduction
Reporting bugs
Free software
Electronic mail
Conferencing system
About our hardware
How to phone us
Logging in
Using QUICS
Introd uction
The Quantum update system, called QUICS, runs 24 hours per day on
a computer that you may call via modem to :
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 sign 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.
Electron ic mai l
You can use the private mail facility to communicate privately with
Quantum employees or with any other user of QUICS .
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.
The modems are on a hunt group with the following primary number:
3020 8570 1 4 1 6
How to phone us
Since qtal.k i s shipped with every system, we describe how to
contact us from within qtalk. We assume that your modem is
connected to the QNX device I dev I serl . If it isn't, you 'll have to
tell qtal.k where your modem is.
Set your serial port settings to the following values. Refer to the
section on configuring modems if you need help with this.
par=none
bit s=B
You'll also need to set your baud rate to whatever rate your modem
will support.
OR
Logg ing i n
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.
Logi n : newuser
Next you 'll be asked to enter information about you 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:
j sbach
From now on, you log in with your user ID (instead of newuser)
each time you access QUICS .
Using QUICS
After logging in, you ' 11 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.
(613) 59 1 094 1
Ma n agers, Drivers,
net node display or change the Arcnet node permit bitmap (QNX) 1 75
Options : - i irq The interrupt line to use (IRQ). This option overrides
automatic IRQ detection.
Arcnet
Arcnet - i 3
Set the QNX Arcnet board to use IRQ 3 ; set its memory segment to be
located at CEOO hex:
Arcnet - i 3 -m CEO O
Description: The Arcnet network manager communicates directly with the QNX
Arcnet network board. It provides the low-level services the Process
Manager and Kernel require 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
sys init file or at the command line.
Automatic IRQ detection does not work on IRQ 2. To use IRQ 2, you
must specify the - i irq option.
Options : -v Be verbose.
Examples: cd /boot
buildqnx build/ws images /ws . 4 0 0
Description : You use the buildqnx utility to build a QNX boot image. A boot
image is a collection of individual processes packed into a single flle
-
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.
-
For example, let's say you've booted from disk and the boot image
- didn't contain the DOS fllesystem manager (Dosfsys). At this point
you're getting your flles and commands from a local QNX
- ·
filesystem. You could start Dos fsys by typing its name on the
command line and running it as a background process, as follows:
Dosfsys &
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 loading 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.
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
sys /Proc
$ 3 8 0 0 0 Proc
sys / Slib
$ 1 Slib
/bin/Fsys
$ 1 6 0 0 0 Fsys
/bin/Fsys . wd
$ 1 0 0 0 Fsys . wd
/bin/mount
$ 4 0 0 0 mount -p /dev/hdO /dev/hd0t 7 7 I
/bin/Arcnet
$ 1 0 0 0 Arcnet
/bin/s init
$ 2 0 0 0 sinit
sys /Proc
$ 3 8 0 0 0 P roc
sys /Slib
$ 1 Slib
/bin/Arcnet
$ 1 0 0 0 Arcnet
/bin/s init
$ 2 0 0 0 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 s init
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/sys init file.
export TZ=EST5DST4 , M4 . 1 . 0 / 3 , Ml 0 . 5 . 0 /3
rtc hw
Dev &
Dev . con -n 3 &
reopen /dev/ conl
Dev . ser &
Fsys . floppy &
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 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, t init , 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:
cd /boot
make b=test
cp / . boot / . altboot
cp /boot / images/test / . boot
Write an archive:
cpio -o [Bacv]
Copy files:
-f Copy i n all files except those in patterns. Can b e used only with
the -i option.
-1 (the letter "el") Whenever possible, link files rather than copy
them. Can be used only with the -p option.
[pattern ]
Simple regular expression given in the name-generating
notation of the shell.
directory
The destination directory.
Examples: Copy out the files listed by the ls utility and redirect them to the file
newfile:
Use the output file archive from the cpio -o utility, extract those
files that match the patterns memo/a/ and memo!b*, create the
directories below the current directory, and place the files in the
appropriate directories :
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:
Description: 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) extracts files from the standard input, which
is assumed to be the product of a previous cpio -o. Only files with
names that match patterns are selected. Multiple patterns may be
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.
(1"""1
�
�
(i"""\
(�"""\
(1"""1
�
(1"""1
(i"""\
�
(i"""\
(!""'i\
�
�·
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
(i"""\
(i"""\
(i"""\
�
(�"""\
(�"""\
�
Dev
device manager (QNX)
Description: The Dev manager is responsible for managing all terminal devices in
a QNX 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
Description: 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.
�
�
r-'1
r-'1
r-'1
�
r-'1
�
rr-,
rr-,
�
�
r-'1
�
�
�
r
r-'1
�
t-o
�
�
�
�
�
�
�
�
�
�
�
�
�
�
r-.
�
�
�
Dev. pa r
parallel device driver (QNX)
Description: 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 1/0 ports, Dev . par
uses the first parallel port found by the system BIOS (LPTl ) . 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.se r
�
serial device driver (QNX}
""""'
I<M\
Syntax: Dev . ser [ options ] &
�
� Options : port [ , irq] A serial I/O port (in hex) and its corresponding
� interrupt (in decimal).
""""
- c number The size of the canonical input buffer
""""
(default is 256).
""""
11M\
-R Set initial state of RTS to off.
""""
"""'
-b number The initial baud rate for subsequent ports
"""""
(default is 9600) .
� -d Set initial state of DSR to on.
"""""
"""" -e Set all subsequent ports to "edited" mode.
11M\
-f Enable hardware flow control on all subsequent
�
ports (default).
""""
""""
_,
Set port at 3F8 as a raw device at 1 200 baud, and port at 2F8 as an
edited device at 9600 baud:
Description : 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 (COM I) or a port at 2F8
(COM2), or both. If COM l is present, Dev . ser assumes that it uses
interrupt IRQ 4; if COM2 is present, Dev . ser assumes that it uses
interrupt IRQ 3. If the scan shows that neither of COMl nor COM2 is
present, Dev . ser terminates.
Remember that you can start Dev . ser only after the Device
Manager (Dev) has been started.
Dosfsys -x [ -n node ]
-n node
The node the Dos fsys manager resides on.
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.)
qnx_drive
The name of the QNX drive or file to open (e.g.
/dev/hd0t4). The drive or file can be local or it can
reside on another node in the network.
Examples : 1) Scan the /dev directory and mount the corresponding drives:
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 QNX utilities, such as
mkdir, l s , 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 1/0 functions such as
open(), read(), write(), close(), seek(), etc. When you read DOS
directories, they'll 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 Dos fsys 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, Dos fsys will start up and try to adopt
the specified drives.
Exit status: If an error occurs at startup, Dos fsys displays an appropriate error
message, then exits with one of the following exit codes :
emu87 &
Description: The emu87 process traps 80287 and 80387 floating point instructions
and emulates them through software. By default, the emulator will
quietly terminate if you attempt to start it on a machine equipped
with floating point hardware. You can force the emulator to remain
active by using the - f 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.
slay emu87
feat
�
�
Syntax: feat [filename . . . ]
�
�
�
""""
�
""""
""""
,_.,
,_.,
""""
f'1""'
Administrator's Guide feat 1 39
�.
fd isk
create ONX disk partition (ONX)
• loader
• show
Description: The £disk 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.
To create a QNX partition for the first time you must first start the
filesystem and hard disk driver. For example:
Fsys &
Fsys . wd &
fdisk /dev/hdO
It's important to realize that the fdi sk command only displays and
updates the partition information on the disk. It doesn't directly
affect your access to the drive (see mount).
FDISK
I g n o r e Next P r e v 1 2 3 4 C h a n g e D e l e t e Boot Unboot R e s t o r e L o a d e r S ave Qu i t
OS_ Start End _ _Number__ Size Boot
name type Cy l i n der C y l inder C y l inders Blocks
1 . DOS ( 4) 0 159 160 3 9 1 65 19 MB
2 . QNX2 . x ( 7) 160 419 260 63700 3 1 MB
3. QNX ( 77) 420 854 435 1 0 6575 52 MB
4 . ------ ( --- )
Choose one of the part i t i on s , by : typing the p a rt i t i o n number OR moving t h e
p o i n t e r w i t h t h e U P / DOWN a r rows ; then, choose one o f the act ions on t h e top line
of the s c reen .
D r ive : /dev/hdO
Size : 1 0 2 Mby t e s Con f i g : 7 Heads
Loade r : QNX 35 Sectors / c y l
8 5 5 Cyl inders
0 == First
854 � Last
You '11 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 arro w keys), and pressing <Enter>.
fd isk
create QNX disk partition (QNX)
-
Unboot Tum off the boot flag for the selected entry.
Restore Restore the previous non-QNX bootstrap loader.
- Loader Change the bootstrap loader to the QNX loader.
-
Save Save all changes and quit.
Quit Quit without saving changes.
-
Add a new partition entry of the size and type specified. If
£disk cannot locate sufficient un-allocated disk space to
satisfy your request, it will allocate the largest available portion
of the disk (if any).
Boot will tum on the boot flag for the indicated partition. If
another partition was already flagged as the primary boot
partition, the flag will be turned off for it.
loader
show
Exit with a return code which is the size of the indicated entry
in megabytes.
t77 QNX 4
t 7 , t 8 , or t 9 QNX 2
t l , t 2 , t3, or t 4 DOS
If you wish your disk to contain both QNX and DOS partitions, we
recommend that you create the DOS partition first, using DOS
commands.
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.
+nl , . . . , nB
freeze *
mel.t * . [ ch ] . F
feat * . F I more
-
Description : The free ze 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 -f 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 -f option, and you run free ze in the
foreground, you're prompted as to whether the file should be
overwritten.
melt freeze -d
feat free ze -cd
You can restore compressed files to their original form through either
of two ways:
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.
1 An error occurred.
- f 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).
- r ramdisk size
The size of an optional ramdisk, in units of lK. The
minimum size is 4K; the maximum size is 8 1 92K. There is
no default size.
-x cacheyroportion
The maximum proportion of the cache that may be used for
caching load modules. For example, -x 2 would fill up to
1h the cache with load files. The default is 0 , which will not
cache load modules.
defined as a block special file with the name I dev I ram. To defme
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, QNX filesystems don't cache load modules. But you can
use the -x option to specify that up to Vn 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 the 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.
-x on [ , off ] Specify the bus on time and bus off time. The
default values are 5 IJ.sec and 9 jlsec, 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 1 1 and 4, respectively, are
appropriate for avoiding conflict with dynamic
memory refresh. This may provide higher disk
throughput.
Description: Fsys . aha is the driver for the Adaptec SCSI disk controllers,
including these models:
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.
Caveats: 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 drive detected on the SCSI BUS is labeled with its physical unit
number. Thus, it's possible to have ldevlhd2 without having a
I devlhdl or a I dev lhdO . The current version of Fsys . aha
supports only PUNs (Physical Unit Number); later versions will
support LUNs (Logical Unit Number) as well.
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 5 1 2 bytes upon startup.
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.
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 qnx ioctl() C
function.
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.
Description: Fsys . ps2e is the driver for the IBM PS(2 ESDI Fixed Disk Drive
Adapter.
• uses the PS/2 DMA controller to transfer data between the Adapter
and the system memory
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 PS(2 ESDI, and not with the PC/AT
ESDI controllers.
Description: Fsys . ps2m is the driver for the IBM PS/2 MFM Disk Controller.
• transfers data between the drive and memory using the PS/2 DMA
Controller
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.
Description : Fsys . ps2s is the driver the IBM PS/2 SCSI Disk Drive Adapter.
• uses the PS/2 SCSI DMA controller to transfer data between the
Adapter and the system memory
The Fsys . ps 2 s 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.
�
�
f"""\
(-I
�
r-'1
�
r-.
�
�
�
("""'
("""'
�
("""'
("""'
,...,
("""'
�
�
("""'
�
,.,
�
("""'�
,...,
("""�
("""�
�
�
("""'
("""'
("""'�
("""'
("""�
("""'
("""'
("""'
("""i
("""'
("""'
Fsys.q i c02
QIC-02 tape d river (QNX)
-"t ?l:{ type The type of QIC-02 unit, where type can be
one of:
archive
tecmar internal
tecmar external
Description: Fsys. qic 02 is the driver for tape controllers conforming to the
QIC-02 specification.
The Fsys . qic0 2 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 . qic0 2 terminates as a process.
Description: Fsys . 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 l O l 0-05 Winchester Disk Controller. Many controllers are
register-level compatible with this controller, including AT MFM,
RLL, IDE, WD 1007ESDI, etc.
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 1 7 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.
Options : source The source of the serial number, which can be one of:
Examples: Copy the serial number from the floppy diskette in drive 0 to the
I etc/ licenses directory:
Copy the serial number from the floppy diskette in drive 0 on node
10 to the /etc/licenses directory:
Description : 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 I etc/ licenses directory.
Before you run the license utility, make sure the floppy driver has
been started.
The utility will copy the serial number 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.
Options: -L logfile Print log information into logfile rather than to standard
error.
Description: The lpsrvr utility is the print server. The utility accepts requests for
printing, rescheduling, and examination of print j obs. When lpsrvr
starts, it scans the configuration file to find out about existing
printers, then scans for any residual work from a previous invocation.
-
Syntax: Mouse [ -b [ - i interrupt] [ -p address ] ] [ -g number]
[ -n name ] [ - s baud] [ -x ] [ -y] type <serial_yort &
Mouse test
-x Reverse x motions.
-y Reverse y motions.
Mouse test
Description: The Mouse driver manages the mouse on a QNX system. 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
-
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.
use mouse
Options: - f netfile The name of the network configuration file. This file
contains information on each node that can boot
over the network. The default is :
/etc/ config/netboot
qnx/arcnet
Description: 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.
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.
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 buildqnx to activate any new modules. -
You may run netboot on more than one machine in the network.
-
This is advisable in larger networks to speed up booting when many
requests are active at one time.
Examples: To all of your /etc/config/ sys init . xu files, add the line
net di sallow
Description: The netnode utility lets you display or change the Arcnet node
permit bitmap to optimize network response.
The benefit of the node permit list is to speed up commands like sin
net on a network containing a mix of nodes in which some are
running QNX 4.0 and others aren't. If an application on a QNX 4.0
node attempts to attach a virtual circuit to a node that isn't running
QNX 4.0, the destination node would normally accept the low-level
control packet from the QNX 4.0 node, but not recognizing the
packet, would discard it. The application on the QNX 4.0 node,
patiently waiting for a response, is eventually released by the QNX
4.0 self-polling, but this typically happens slowly.
-
Administrator's Guide netnode 1 75
netnode
display o r change the Arcnet node permit bitmap (ONX)
QNX 4.0 nodes that aren't on the node permit list cannot
communicate with each other.
net po l l
display or change default polling parameters of a node (QNX)
netpoll -p 2 - i 2 -n 5
netpoll -p 2 0 -i 20 -n 10
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.
Read an archive:
Write an archive:
Copy files:
-b blocking
Block the output at blocking bytes per write to the archive file.
A k suffix multiplies blocking by 1024, a b suffix multiplies
blocking by 5 1 2, and an m suffix multiplies blocking by
1 048576 ( 1 megabyte). In QNX, the maximum buffer size is
32K- 1 . If not specified, blocking is automatically determined
on input and is ignored for -rw (copy files).
-
-f 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.
-
Administrator's Guide pax 1 79
pax
portable archive interchange ( POSIX)
-p 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 ]
-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.
-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:
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
-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
Examples: Copy the contents of the current directory to the floppy drive:
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:
Description : The pax utility reads and writes archive files that conform to the
archive/interchange file format specified in IEEE Std. 1 003. 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 cpio and System V tar
interfaces if invoked 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.
Note that the options -a, -c, -d, -i, 1 -p, -t, -u, and -y are
- ,
Files : The controlling terminal (/dev/tty) is used to prompt the user for
information when the - i or -y options are specified.
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.
counts are listed as zero since the ustar archive format doesn't keep
link count information.
-d num dev
The number of major device numbers supported (default is
32).
- m num_shared_segs
The number of shared segments (managed by the
qnx segment() . . . family of functions) that will be available
in this operating system image
(default is 300).
-n num names
The maximum number of names that can be registered
locally by the qnx_name_attach() function
(default is 30).
-p num_yrocs
The total number of real processes, virtual circuits, and
proxies that can exist at any time (default is 1 50).
-r prefix_len
The size of the system prefix space (default is 400
characters).
- s num sessions
The maximum number of sessions that will be supported
(default is 32).
-t 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.
-v level
Set the verbosity level (0 to 2; default is 1 ) . Messages are
always displayed on the console in the form:
Description: 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, P roc is a required system process in all operating
images that are built. You cannot start Proc after booting.
heap = num_dev x 2
+ num_shared_segs x
+ num _names x 8 + (total length of registered names)
+ num_JJrocs x 1 48 + (total length of unique command names)
+ each_code or data_segment x 1 2
+ prefix_len
+ num sessions x 20
+ num timers x 24
+ 8000
Options : - i initfile Open this system initialization file (for defaults, see the
Description below).
Examples: sinit -r / / 1 /
sinit - s /bin/myshell
Description: The s init utility sets up the initial operating system environment
immediately after boot. It is usually bound to the operating system
by means of the buildqnx utility.
The s init 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 s init 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:
It's usually a good idea to keep the sys init file generic and create
custom sys init . node files for each node as required. The
alt sys init file is usually a backup of the sysinit . node file for
the node that boots from its own hard disk.
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 sys init . node or
altsysinit by specifying an explicit filename with the -i initfile
option.
forward Position the tape to just after the next file mark.
retens ion Position the tape to the beginning, then to the end,
then back to the beginning.
Examples: 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:
Position the tape such that the first archive may be read:
tape bot
r
r
�
�
�
,-.,
�
�
�
�
�
,-.,
�
�
f'-l
�
r'"'-1
r
�
r-1
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
tar
read and write tape archive files (UN IX)
Options -b 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.
-f Use the next argument o n the command line as the name o f 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.
-1 (lowercase letter "el") Report i f all o f the links t o 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.
filename
Make an archive, backup . tar, of all the C source and header files
in the current directory:
Description: The tar utility reads and writes archive files that conform to the
Archive/Interchange File Format specified in IEEE Std. 1 003 . 1 - 1 988.
Files: The controlling terminal (/dev/tty) is used to prompt the user for
information when either or both the - i or -y options are specified.
Description: The termdef utility prompts the user for their terminal type. You
should fmd termdef useful as a front-end process on dial-up lines.
,_.,
('-"1
�
�
�
,...,
,....
�
('WI
f!-1
,...,
,_.,
�
r-.
�
�
,_,
,...,
�
(*I
�
�
�
�
,...,
{'*I
�
�
,....
�
,_,
�
,...,
�
,...,
�
,...,
,...,
1'*1
,...,
,...,
�
,.,.,
vo l
manage multi-volume archives (QNX}
Examples: Use pax to archive everything under the current directory and let
vol. split the data across as many diskettes (/dev/ fdO) as required:
Description: 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 sequence number of the
volume-this helps you detect out-of-sequence diskettes.
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.
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.
This appendix describes the various rules used for establishing time
zones and time changes (e.g. daylight savings time). You'll fmd a
time zone chart* and a map at the end of this appendix.
where:
* The time zone chart was excerpted from OAG® Desktop Flight Guide-Worldwide Edition
(May 1 9 9 1 , Vol. 16, No. 3 pp. 1278-1279), published by Official Airline Guides, Inc., Oak
Brook, lliinois.
std and dst 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 of the daylight savings time zone. If
dst is omitted, then daylight savings time isn't used in
this locale.
offset Indicates the value you must add to the local time to
arrive at UTC. The form for offset is:
HH [ : MM [ : SS ] ]
I�
,_
� ,_
S/sndsnl Time: Legal lime for eacll country lilted by IBw and based on /he lheorelical tHIIision ol lhe
::s world's surface into 24 zones eacll of 15" longitude wilh certain deviations due to frontiers or loall f::: #,.��"f'=� �.,::c':.f:'c"::/:. �lies remain on Standard Time au year. ,_..
nr C, Sa.tng Time (DSTJ: Modified (advanced} /egBl time adopted by certain counllies for part of year, • - Excepl Broken Hill. N.S. W.; follows Soulh Australia limes.
• - Amapa, Amazonas. Para, Rondenia, Roraime, Stales of BrazH do not observe OST.
Joot especially during loall summer. E - Eslimsled Dale Based On Previous Year.
,_.
::s
a
1-' •
CGun1ry - Time
- Time at -
DaJilglll Saving Time
--
Country Slancta!d Timo
- Tlmo al -
O.,HgMSawlng Time
E- Perlad
,...
a
t'D
Aruba
-
LM/IIowtl/s.
-4
+ 1 0 1/2
08 00
22 30
Mot
Mana
+S
GMT
+1
1 7 00
1 2 00
1 3 00 +2 Mar. 31-Sop. 28, 1991
,...,
--- + 10 22 00 Martinique -4 08 00 ,...,
�erriiJJry
+ 9 1/2 21 30 M- GMT 12 00
n
+10 22 00 Maurillus +4 1 6 00
Bsjii
ffBtss� �J::k, Psr81/61}
- A- C8pild TerriiJJry (A. C. T./ +10 22 00
� - Ausllllll8 +8 20 00 -8 04 00
,...
t,��ng Tlllks and Caicos Islands)
Austria +1 13 00 +2 Mar. 31-Sop. 28. 1991 of OunJngD. CoahuiiB. Msro Leon. -6 08 00
Joot
J::: ::r' Slates of Campeche,
-5 07 00 -4 Apr. 7--()ct. 26, 1991
- +3 1 S OO Mexi<o. -8 06 00
+6 1 8 00 OuinlanB Roo and Yucatan ,_
-4 08 00 Cities of Ensensda. MexiCBII, SSn Felipe, -8 04 00 -7 Apr. 7--()ct. 26, 1991
+1 13 00 +2 Mar. 31-Sop. 28. 1991 rljuana
,_ Rap. (Oal1omey)
t::.u. -6
+1
06 00
=
Island -11 01 00 ,...,
1 3 00 +1 1 3 00 +2 Mar. 30E-Sop. 29, 1991 E
-4 06 00 -3 Apr. 7--()ct. 28, 1991 Mongolla (Ulan Salor) +6 20 00
Bhulall
-
+6
-4
1 8 00
06 00
- GMT 1 2 00 ,...
- +2 1 4 00
err.:; Ear. (lnduding All Coast and
llolswana +2
-3
14 00
09 00
Myamnar
Namlbia
Nauru, Republic Of
+ 6 112
+2
+ 12
1 6 30
1 4 00
23 S9 ,...
- -4 06 00 Napa! + S 314 1 7 4S
-s
TerriiJJry ofAr:ttl
- De - -- 2
07 00
1 0 00
Netherlands
Netherlands Anliles �nd. Soulhem St. Maarten)
+1
-4
1 3 00
06 00
+2 Mar. 31 -llep. 28. 1991
,..,
=:=::s
-4 06 00 New Caledonia +11 23 00
�=Faso
+8
+2
GMT
20 00
14 00
12 00
+3 Mar. 31-Sep. 28, 1991 Chattrem/s.
New Zealand (El«::uding Ch.- ls.)
Nicaragua
+ 12
+ 12 3/4
-6
23 S9
00 4S
06 00
,...
- +2 1 4 00 Niger +1 1 3 00
CBmboclla +7 1 9 00 Nigeria +1 13 00 ,_,
+1 1 3 00 Niue Island -11 01 00
=:...� (lslandol) - 3 1/2 0630 - 2 1/2 Apr. 7--()ct, 28. 1991 Notfolll lsland + 1 1 112 23 30
Allatrllc ,_,..
Oman
-4 06 00 -3 Apr. 7--()ct. 28. 1991 Notway +1 13 00 +2 Mar. 31 -llep. 28, 1991
E8slem -s 07 00 -4 Apr. 7--()ct. 26. 1991 +4 1 6 00
centniJ -6 06 00 -s Apr. 7-0ct. 26. 1991 Pac!fic lslands Trust Territory
- -7 os oo -6 Apr. 7 -0ct. 28. 1 99 1 � Is. (Excluding Poi/ape Is., KIIRill, +11 22 00 ,...
� - /s. (ExchltRng
PscUit:
=-
-8 04 00 -7 Apr. 7--()ct. 26. 1991
��� -6
-1
04 00
1 1 00
-7 Apr. 7-0<1. 26. 1991
Kwrjs/Bin/
+12 23 S9
,...
=�:Rapublic -s
+1
07 00
1 3 00 =lsiBIId (Exc/uding Gul}lm
-12
+10
00 01
22 00
QI&CI +1 1 3 00 l'lllau lsiBIId
Q;fe Ponape lsiBIId
+9
+11
21 00
23 00 ,....
C«rrin6nnaa -4 06 00 Pakistan +S 1 7 00
E8sl8f lsiBIId -6 06 00 -s
p=:..Gf.r (And r-,
Panama 07 00
China. People's Repu�� Of +B 20 00 +9 Apr. 14-llep. 14, 1991 +10 22 00
�uay
aano' - + 6 1/2 1 6 30
=: -s 07 00 -4 06 00
Comoros t-o
Rapublic Of -s
+3 1 S OO 07 00
g:r_ +1
-10
13 00
02 00
PNiippines,
Poland
+8
+1
20 00
13 00 +2 Mar. 31-Sop. 26, 1991
Coala Rica ,_
Po=.
-6 06 00
COfe D'Ivoile GM7 1 2 00 -1 1 1 00 GMT Mar. 31-Sop. 28, 1991
Cuba -s 07 00 -4 2 - GMT 1 2 00 +1 Mar. 31-Sop. 26. 1991
=- +2
+1
14 00
1 3 00
+3
+2
�-��- �-�Js1
Mar. 31-sep. 28, 1991
-
Puerlo Rico
GMT
-4
1 2 00
06 00
+1 Mar. 31-sej>. 28. 1991 �
- +1 1 3 00 +2 Mar. 31-llep. 28. 1991 Qatar +3 1S OO
lljil>ouli
lliJrnUilcan Repubtic
+3 1 S OO - +4 16 00 ,_.
R
-4 08 00 Romania +2 14 00 +3 Mar. 31-Sop. 28. 1991
Ecu- w- +2 14 00
Ctlntitrerrl8l -s 07 00 Saint i'Mirre and - --3 09 00 -2 Apr. 7-0ct. 26, 1991 ,_.
���-
-6 06 00 Saint Vmcent and the Grenadines -4 06 00
+2 1 4 00 +3 May 1 -llep. 30, 1991 samoa -11 01 00
�Guinea
.
-6
+1
+3
06 00
1 3 00
1 S OO
and PrinCipe Is.
+1
GMT
13 00
12 00 ,....
+3 1 S OO
F-..cl ,_ GMT 12 00
,_.,
F::l:::r -4
GMT
06 00
1 2 00
-3
+1
Sop. 9, 1990E-Apr. 20, 1991E
Mar. 31-Sop. 28. 1991
+4
GMT
16 00
12 00
� +12
+2
23S9
1 4 00 +3 Mar. 31-Sop. 28, 1991
smg_.
SoiOmon lslands (Excluding &ouga;nolle Is.)
+8
+11
20 00
23 00 ,..,
France +1 1 3 00 +2 Mar. 31-llep. 26. 1991 SOmal'm +3 1S OO
F
Francll Guiana -3 09 00
Spa in
South Africa +2 1 4 00
r:_� -9 03 00 Cllna>y ts. GMT 1 2 00 +1 Mar. 31 -Sop. 28, 1991
,..,
.,.,_., Is. - 9 1/2 0230 c.n-. Batsaric and - tstands +1 1 3 00 +2 Mar. 31 -llep. 28, 1991
a-
liodfly ls., Tu/Julli /s., T- /s., T- - 10
+1
02 00
1 3 00
-
Sri Lanka
+1
+ S 1/2
1 3 00
1 7 30
+2 Mar. 31-Sop. 28. 1991 ('*A.
�- - Rop. Of
Gembia GMT 1 2 00 St. Helena GMT 1 2 00
+1
GM7
1 3 00
1 2 00
+2 Mar. 31-llep. 28. 1991 Sudan
Suriname, Republic Of
+2
-3
14 00
09 00
,_,
- +1 1 3 00 +2 Mar. 31-llap. 28. 1991 Swaziland +2 14 00
Greece Sweden
Greenland
+2 14 00 +3 Mar. 31-llep. 28. 1991
Swi1zarland
+1
+1
13 00
13 00
+2
+2
Mar. 31-Sep. 28, 1991
Mar. 31-Sop. 28, 1991
,...,
� BIId W. CDast -3 09 00 -2 Mar. 30-Sep. 28. 1991 Syria +2 14 00 +3 Apr. 1-liep. 29, 1991
�
,._
GMT
-1
-4
12 00
1 1 00
06 00
+1
GMT
-3
Mar. 30-Sop. 28.
Mar. 30-Sep. 28.
Mar. 30-llep. 28.
1991
1991
1991
T&MM
nz
Ta an;a
Tha<1anc1
+6
+3
+7
20 00
1S OO
19 00
,...,
� St Martin)
Guadeloupe lind. St. Barlhelemy, -4 06 00 Togo GMT
+ 13
1 2 00
01 00 �
+ 10 22 00 �� and Tobago -4 06 00
Guatomxla -6 06 00 -s Mar. 23-Sop. 11. 1991 Tunisia +1 13 00
Guinea GMT 12 00 Turl<ey +2 1 4 00 +3 Mar. 31-5eo. 28. 1991 ,...
,_
,....
,..,
,...,
,-.
.......
eachofcountry
each fixed by law and based on the lheorelicaf division of the
t5' longitude with certain deviations due to frontiers or local =:s
f:: t:/,Z:,:.a:c:::.:::.n::.'!fb. :: =�ties remain on Slmldard Tnne aN year.
StsndJJtd Time: Legal time for
world's surface into 24 zones
�t saving rune (DST): Modified (advanced} leg;Ji tima adopted by r:eriJJin COIHitries for part of year,
* - Except Broken HiH, N.S.W.; follows SOuth Australia Nmes.
• - Arnapa, Amazonas. Para, RondJJnia, Roraima, Ststes of BrazH do not observe DST. nr
especiaHy during local summer. E - Estimated Date Based On Previous Year. ....
=:s
Country Standard Time Dayfigh! SaWigTane Country Slanclani Tlme
--
Darfight Saving Time
..
.... .
Hours
!rom
Time al
12DD hrs
GMT
-Hours Effac:tlve Pellocl
(!bat and laat .,, -
Hours
GMT
Time at
1200 homs
GMT
-
Hours
GMT
(lirll and .... ...,, Q
=:s
GMT GMT
Guinea-Bissau GMT 1 2 00 Turks and Caicos t5. -5 07 00 -4 Apt. 7-0ct. 26, 1991
I»
�1ana
Honc!uras
··3
-5
-6
09 00
07 00
06 00
-4 Apt. 7-0ct.. 26, 1991
Tuvalu
u��'::'���.\::,1""" ·
Ug -
Dubai.
+ 12
+3
+4
23 59
1 5 00
1 6 00
-
�
Hong Kong +8 20 00
= .... .
+1 1 3 00 +2 Mar. 31-Sep. 28. 1991 UnlledKl� GMT 1 2 00 +1 Mar. 31-0ct. 26. 1991
GMT 1 2 00 U.S.A.-Eislem Time.:> -5 07 00 -4 Apt. 7-0ct. 26. 1991
e
India (incl. Andaman Is.) + 5 1/2 1 7 30 C6nlni/ T..,. -6 06 00 -5 Apt. 7-0ct. 26, 1991
Indonesia Mountllin rtiJJ«!! -7 05 00 -8 Apt. 7-0ct. 26. 1991
C..tral f8 20 00 Pllcllii: Trne -8 04 00 -7 Apt. 7-0ct.. 26, 1991
East +9 21 00 Alllslra feK<BP/ Aitiulilln IslandS W. 169.30 -9 03 00 -8 Apt. 7-0ct.. 26, 1991 ft)
West (Jakarla} +7 1 9 00 Dsg.J
Iran (The Islamic Rep. of) _ ,_ 169.30/ong. w. to Wsstem Apt. 7-0ct.. 26. 1991
(")
i3 1/2 1 5 30 - 10 02 00 -9
Iraq
Ireland. Rep. 01
+3
GMT
15 00
+1 � -7
1:1"
1 2 00 Mar. 31-oct. 28, 1991 05 00
Israel Hawaiiall fslandS
�: �==: � :;;:
+2 1 4 00 +3 -10 02 00
llaly + 1 1 3 00 +2 -5 07 00
Jamaica I»
....
..5 07 00 -4 08 00
uw i
Korea, RepubliC 01
K at
+9
+3
21 00
1 5 00
Windward bland$
Gmnada. SI. LIICIB -4 08 00
Laos
IlVia
Yemen, Repu�ic o1
��
+7 19 00 +3 1 5 00
Lebanon +2 14 00 +3 May 1-0ct. 15, 1991 +1 1 3 00 +2 Mar. 31-sep. 28, 1991
Leewarel lstancls
Anligua. Dominica. Mcnlsetrat. SI.
Clvistopher. 51. Kills. Nevi$, Anguilla
-4 08 00
Kssai, Kivu,
Zambia
Hauf.Zllire, ShsiJa
Kinshasa Mbandatul +1
+2
+2
1 3 00
1 4 00
1 4 00
Zimbabwe +2 14 00
Index
archive utilities
A cpio 7 1
access control utilities pax 7 1
loqin 20 tar 7 1
newqrp 2 1 vol 7 1
pas swd 20 archives 7 1
su 20 compressing data 74
access fields 22 examples 75 - 76
accessing resources 20 see also backups
accounting file 25 - 27
clearing 27
compressing 27 8
creating 25
discarding information 25 backup formats 70 - 7 1
format 25 archive backups 7 1
interpreting 25 filesystem backups 72
typical example 26 backup media 72 - 73
accounts fixed disks 74
adding 20 floppies 72
creating without password, removable disks 74
home directory, shell, or group 21 tape 73
deleting 2 1 backup utilities
restriction o n who can add t o system 20 see archive utilities
setting up 1 9 - 27 backups
adapter cards 32 compressing data 74
see also serial adapters when to back up 70
altsys init file 9 see also archives
see also system initialization file
dinit 93
fdi sk 93
G
spatch 94, 97, 102 global name server
zap 94, 96 selecting a machine as 12
file permissions 22 greenwich mean time
filenames see time zones, UTC
DOS 65 group IDs 2 1
longer than 16 characters 90
files
access fields 22 H
accounting file 25 - 27
blocks, examining 97 hard disk booting
deleted 96 see booting
DOS text files 64 hard disks
executable files 22 see disks
extent blocks 9 1 hardware adapters 3 1
links 90 hardware interrupt generated by each UART 31
maintenance utilities 93
multiple extents 91
permissions 22 I
recovering 85 - 103
images
recovering if deleted 96
build file, constructing 78 - 83
recovering if lost 101 - 1 03
buildqnx utility 78
removing without returning used blocks 94
creating through buildqnx or
structure 92
the Makefile 78
filesystems
disk images 80
backups 72
embedded images 83
how data is stored on disk 86
heap size, setting 79
restoring 94
image file location 78
setting up second system 57 - 67
local memory, allocating 79
see also DOS filesystems; partitions
network images 82
fixed disks, backing up to or restoring from 74
processes required for hard disk booting 80
see also backups
processes, selecting 79
floating point emulator 1 1
installing
floppies, backing up to or restoring from 72
on a hard disk 4
see also backups
interrupt generated by each UART 3 1
floppy driver, starting 1 2
free software 1 06
freeze utility 75
high-speed, error-correcting 36
L standard 37
licensing 1 5 - 17 terminal type, querying user for 42
application licensing 16
expanding your license 1 7
license utility 17 N
operating system licensing 15
links 90 name server
loader block 87 see global name server
login utility 20 network
login, automated 40 sharing devices 46
login, starting on consoles 1 1 network booting 5 - 7
lost+found directory 102 netboot configuration file 6
lp utility 47 network card
lpc utility 48 removing, effects of 10
lpq utility 47 network images 82
lprm utility 47 node numbers
lpsrvr utility 48 - 55 changing, effects of 10
M 0
mail operating system images
see QUICS, email see images
Makefile output buffers, specifying 31
examples 80
location 80
macros for changing defaults 80 p
melt utility 75
parallel devices 30
modem utility 40
multiple parallel ports 30
modems
output buffers, specifying 3 1
configuring 40
single parallel port 30
connecting 36 - 37
parallel driver
detecting incoming call 35
starting 1 1 , 30
dial-up access 40
parity bits 35
establishing connection with
partitioning pathname space 58 - 60
another modem 35
partitions
flow control between terminals
bitmap blocks 88
and modems 35
directory structure, checking 93
hardware handshaking 37
r-'1
'---'
filii\ I ndex
'--
�"""�
�
v
ilili'l vol utility 1 2, 7 1
�
fliliil
fiiiS\ z
IR\
z ap utility 94 - 96
�
�
'----
�
'- -
�
�
(aii)
�"""�
fiRi!\
lli!!il\
�
lli!!il\
'--
tS"'
,...,
(aii)
f'illill
�
-
�
(ii!iii>,
fiiiS\
fiiiS\
fiiiS\
tili>\
(a\
r-1
'--
fiOi'l
fiOi'l
fiOi'l
!"""'�
Administrator's Guide Index 21 5
l'i'i)