Advertisment

Setting up QNX

author-image
PCQ Bureau
New Update

Tips and Tricks

Keep the following handy:
  • A preformatted 1.44 MB floppy disk
  • Windows bootable floppy or CD-ROM
  • A partitioning utility like Partition Magic

Make sure that the hard disk you install QNX on is a primary master. Check the jumper settings on the hard disk and change if required.



Install QNX RTP on a primary partition and not an extended one.

Advertisment

There are several ways in which QNX RTP (real time platform) can be installed

on your mac- hine. It can be made to coexist with your current operating system,

drive itself on its own (on a native partition), or even run on your PC without

a hard disk. Let’s go about understanding the process.

Look Ma, no hard disk

They call it the Incredible 1.44 MB Demo. The system requirements for this

one are: a 386 or higher processor, at least a color VGA graphics card, a

minimum of 8 MB RAM, a serial or PS/2 mouse, and a network card. This demo boots

off a floppy disk and doesn’t need any hard disk to install. It’s a complete

install with the real-time OS, a graphical user interface, a Web browser, a

dialer, and TCP/IP. And there’s more. After your machine starts up, you can

even remove the demo floppy from the drive. Interesting? Let’s see how to do

it.

Advertisment

The QNX RTP installation package comes with the requisite software to create

the demo disk. If your current OS is Win 9x/ NT or DOS, you’ll need the zipped

qnxdemo file. If it’s Unix, Linux or QNX, you use the qnxdemo.tar file. Also,

depending on the type of connectivity you have to the Internet, that is, network

or modem, you’ll need to use the corresponding files. These are located in the

demodisk folder on the CD.

For

DOS, Win 9x/ NT Unzip demodisk.zip. Insert a preformatted 1.44 MB floppy in the

drive and run Install.bat. This creates the demo disk. Shutdown and reboot your

machine with this disk.

For Unix, Linux or QNX Do tar -xf qnxdemo.tar to extract the files from the

archive. Insert a preformatted 1.44 MB floppy into the drive and run the

makedemo command. Boot the machine from this floppy.

Advertisment

In both cases, the disk boots up the machine, mounts virtual file systems and

asks you for the display settings to be used. If you’re on a network, you have

the option of letting the machine get the required information from the DHCP

server, or manually configuring the settings. If you have a modem to dial up to

the Internet, the dial-up configuration wizard helps you through the process.

And just for fun’s sake, you can play Towers of Hanoi or look at the beauty

of a vector graphics sample application, all running simultaneously just in your

RAM.

For a full-fledged OS...

Advertisment

If you already have an OS installed, say Windows 95/ NT/ 2000/ ME or Linux,

you can still try out QNX. Here the options are either installing QNX as a file

within your existing Windows, or as a native QNX partition install. Currently,

QNX doesn’t install on NTFS or LinuxExt2 partitions. So, you need to have a

FAT partition to install QNX. Let’s start with installing QNX under your

existing OS.

Installing QNX as a file within Win 95/98

For installing QNX as a file in your existing Win 9x, run the Windows

executable qnxrtp.exe. This installs the OS under \Program Files\qnx

directory. During the installation, you’ll need to specify the size of the

root.qfs file; the default is 600 MB, but you can go up to 2 GB. This becomes

your workspace when you work in QNX. It’s better to allocate more space here,

so that you don’t fall short when you install more software later. The

installation asks for a root password and any user account details you may want

to give. It also gives you the option of creating a boot floppy in case your

system fails later. It makes changes to you config.sys file, which gives you the

option of booting into QNX or Windows at startup.

Advertisment

When you select to boot into QNX, the QNX image is loaded and takes control

of the hardware. An EIDE driver and a DOS file system are started, which mount

your Windows file system under QNX (as fs/hd0-dos, fs/hd0-dos-1, fs/hd0-dos-2,

etc). The QNX file system is then mounted on top of your existing DOS file

(remember where you installed QNX?). Other devices like the CD-ROM drive and

other file systems are also mounted under /fs. The OS then detects the graphics

card and asks for the display settings you want, and then shows the Photon GUI

login screen. You can select to always boot into the GUI or choose to remain at

the Command Prompt. You can go to the GUI when you want by typing ‘ph’ at

the Prompt.

On its own native partition with Win 95/98

If you want to have QNX as your primary OS, it’s better to install it on

its own native partition, which is a DOS type79 partition. For this, you’ll

have to create a separate partition before the installation. If your drive has a

single partition, you’ll have to use a third party utility like Partition

Magic to create the separate partition. After this, just pop this month’s PCQ

CD into your drive and boot off it. Ensure that your hard disk is configured to

be a primary master, otherwise the EIDE driver loaded during setup won’t

detect the disk properly and will exit the installation. Once the IDE driver

loads, it takes you to the setup and shows you the partition information on your

hard disk. Here, you can specify the partition that you want QNX to install on.

The setup also asks for the amount of space that you want QNX to use. In this

case too, it’s best to give as much space as possible to QNX

Advertisment

Now comes the important part. QNX allows you to use your existing boot loader

(if you have one) or you can install its own boot loader. Please read the

recommendations at this point very carefully. If you have Win 9x installed and

choose not to install the QNX boot loader, your PC will boot up from the active

partition. QNX installation, by default, sets the QNX partition as active. So to

boot into Windows, you’ll then have to use fdisk to set the Windows partition

as active. We’ll discuss how to make QNX and Win 9x coexist without using a

boot loader a little later.

Once all the parameters are specified, the drives are remounted, and the file

system restarted for initiating file copy. This doesn’t take very long. Once

it’s through, remove the CD and hit Enter to reboot when you’re prompted to

do so. Your machine then boots up into QNX.

Now let’s come back to the choice of booting into either OS without using a

third party boot loader or resorting to fdisk every time. The procedure is a bit

cumbersome, but once you understand the basics, there won’t be any problem. We’d

seen earlier that when QNX was installed as a file within Windows, it modified

the config.sys file to give you the option of booting into Windows or QNX. The

loadqnx.sys driver is the one that’s exploited to do this .

Advertisment

Now that you already have QNX installed on its own partition, use fdisk (by

booting off a Windows bootable CD or floppy) to set the Windows partition as

active. Reboot into Windows. Install QNX as a file into a Windows partition as

discussed earlier. This modifies the config.sys file. Now, effectively, you have

two boot images of QNX on your hard disk–one on the native partition, and one

within Windows. Go to the path where you installed QNX (\Program

Files\qnx) as a file within Windows. Here, in the fs directory, rename the QFS

files to something else, so that they’re not identified at the next bootup,

and reboot your machine. When prompted for the OS in the Windows startup menu

(which is derived from config.sys), choose to boot into QNX. And there you are,

booted into QNX that was installed on its native partition (because the renamed

QFS files within Windows are not identified). You can go a step further and

delete those renamed QFS files within Windows.

As far as performance goes, QNX documentation clearly specifies that there’s

no difference between an installation as a file in Windows and on a native

partition. So, the choice is yours.

QNX with Windows NT/2000/ME

For Windows machines with NTFS, you’ll need to allocate a FAT partition for

QNX to install. For this, use any of your existing free partitions after

converting them to FAT. Use a partitioning utility like Partition Magic to

resize your partitions to avoid losing data. You have to, however, keep certain

things in mind while doing this. The partition that you want to use for QNX

should preferably be a primary partition and should be bootable. The easiest way

to do this is dynamically resize your existing primary partition and allocate it

for QNX. Format this partition with a FAT file system.

Boot your machine with the CD. QNX should recognize the free partition. If it

doesn’t, look at the partition information and opt to delete the partition

that you allocated. When prompted for the amount of space to be used for QNX,

select ‘Complete’ and hit Enter. Also, choose to install the QNX Boot Loader

when asked for. The installation will do the rest, including converting the

partition into DOS type79 (which is essentially a non-DOS system) and copying

the OS files to it. Reboot the machine and you’ll boot into QNX. The QNX Boot

Loader waits for two seconds for you to enter your boot partition preference.

You have to make this choice really fast if you want to boot into Windows NT/

2000 or you might end up rebooting your machine a number of times.

If you use Linux as a primary OS, QNX can be installed there too. But you’ll

need to create a separate dedicated FAT partition for QNX, because the current

release of QNX doesn’t support the Linux Ext2 file system. Appropriate changes

will also be needed to LILO, the Linux boot loader.

Post-installation procedures

Now that you’ve installed the QNX RTP on your machine, how do you go about

installing more software? Installing software in QNX is done through what’s

called the Package Manager. Although software packages can also be installed the

way we do in Linux (untar archives, compile source codes, etc), Package Manager

makes the process of distribution and installation much easier. Package Manager

uses the concept of Repositories. These are basically directories where the

software and its information are stored. The contents of a Repository consist of

an index file (an ASCII text file that stores the names of packages), the

package manifest (an XML document with the extension QPM that stores information

about the package, its version, date, etc), and the data as a QPK file.

The Package Manager can be connected to such a valid repository for

installing the packages. The information is downloaded to the Package Manager

and then you can select the packages to be installed. By default, QNX shows up

two repositories–the CD-ROM Repository pointing to the stuff on the CD-ROM and

the WWW Repository which points to the repository on QNX’s Website server. You

can also manually add repositories by adding the paths of the corresponding

directories.

You’ll find additional installation information and troubleshooting FAQs at

http://qdn.qnx.com or from newsgroups at news://inn.qnx.com

Happy Real Timing.

Ashish Sharma

Advertisment