Home
Developer Resources
QNX RTOS v4
QNX RTOS v4 Knowledge Base

QNX RTOS v4 Knowledge Base

Foundry27
Foundry27
QNX RTOS v4 project
Resources

QNX RTOS v4 Knowledge Base

Title How to install QNX4 onto a second drive
Ref. No. QNX.000003955
Category(ies) Installation, Configuration
Issue We are trying to install QNX4 on a PC which has two hard drives.  We would like to install on the 512MB second drive.

The install program keeps on checking the first hard drive only (/dev/hd0) while we would like to install on /dev/hd1.  Is there a way to install the QNX4 to the second drive?




Solution # Any part of this doc preceeded by a '#' is a comment not a command to type in
# The following steps allow you to create the QNX system on hd1 (drive D: in DOS)
# instead of the standard hd0 (drive C: in DOS)
# Note: BIOS only allows bootable partitions on fd0 and hd0, if you insist on installing QNX on another drive you must have a loader that can handle other drives, use a boot floppy, or set up a small 2Meg partition where you can put the bootable image which will mount the second hard-drive as /.
# The QNX loader can not handle booting off of other drives!
# Good Luck

# 0. Boot from the QNX Install Boot floppy
# This sets up a limited number of utilities on a RAM disk (/ram) that allow
# you to create the system.
# If you are installing onto hd0, the standard install script should suffice

# 1. Creating a QNX HardDisk Partition

# First determine the interface for Fsys to use
/bin/disktrap

# Start the filesystem using the command returned by disktrap
Fsys.eide

# Optional informational steps
fdisk /dev/hd1 QUERY FREE
fdisk /dev/hd1 QUERY QNX

# Create a partition for QNX to live in
fdisk /dev/hd1

# 2. Initializing the QNX File System

# mount the harddrive as a block-special device
mount -p /dev/hd1

# Note there are a series of steps that should be skipped if
# you are only updating files, but wish to keep your established
# setup (including your sysinit.node files and boot images)
# These steps will be marked with the following comment
# DO NOT PERFORM ON UPDATE, NEW INSTALL ONLY

# Initialize the structures (FAT) on the disk for the QNX filesystem
# The t77 stands for the QNX type partition(type 77) as shown by the
# fdisk utility
# DO NOT PERFORM ON UPDATE, NEW INSTALL ONLY
dinit -hq /dev/hd1t77

# mount the harddisk into the filesystem as the /hd "directory"
mount /dev/hd1t77 /hd
# Check the empty harddrive for bad blocks (physical imperfections)
# This is not inherently dangerous to your filesystem, but is usually
# skipped in upgrades because it takes a while to complete
# DO NOT PERFORM ON UPDATE, NEW INSTALL ONLY
dcheck -m /dev/hd1t77

# 3. Copying files from floppies to harddisk

# Install the new licence
/ram/license -q /dev/fd0 /hd/etc/licenses

# Decompress and install all the files
vol -b15360 -r /dev/fd0 | melt | pax -rv -s,^/,/hd/,

# 4. Making QNX boot from the harddisk
# Even if you are booting from a floppy, if this is the only complete QNX
# installation that your computer can depend on permanently having access
# to, DO THIS ANYWAY. It won't hurt your booting sequence, you set the
# partition to boot from earlier with fdisk, and you need these links.

# I really don't know what this does, but it must be done
# I think that it just sets up the next few commands
install_setup

# Change the prefix for the harddrive so that it is root (/) or the
# following commands will fail
/hd/bin/prefix -R /=/hd/

# Edit the make_links file, both the 32 and 16-bit
# Device managers are supported, you must add the lines to
# distinguish which ones you want to use.
# ADD TO THE END OF THE /etc/make_links FILE
/bin/ln -fs /bin/Dev32 /bin/Dev
/bin/ln -fs /bin/Dev32.ansi /bin/Dev.ansi
/bin/ln -fs /bin/Dev32.ser /bin/Dev.ser
/bin/ln -fs /bin/Dev32.par /bin/Dev.par
/bin/ln -fs /bin/Dev32.pty /bin/Dev.pty

# Set up the standard alias' by running the script:
/etc/make_links

# Compile the terminal information
tic /usr/lib/terminfo/terminfo.src

# Compile and Link the boot image
make b=hard.1 d=Fsys.eide h=/dev/hd1 t=t77

# Copy the boot image into the root directory, and rename it .boot
# DO NOT PERFORM ON UPDATE, NEW INSTALL ONLY
cp -t images/hard.1 /.boot

# Query the boot loader on the harddrive and ignore all the output
# (?)
# DO NOT PERFORM ON UPDATE, NEW INSTALL ONLY
fdisk /dev/hd1 QUERY BOOTLOADER > /dev/null

# Have fdisk install the QNX loader and make the QNX partition bootable
# This could be done manually too from within fdisk.
# DO NOT PERFORM ON UPDATE, NEW INSTALL ONLY
fdisk /dev/hd1 LOADER BOOT QNX

# 5. Create a system initialization (sysinit) file
# This is well documented in the QNX Installation and Configuration Guide
# A relatively standard sysinit file follows; You really ought to have
# a copy of the file as sysinit.node, where node is the node number of the
# computer. Make any changes in the sysinit.node file and you will always
# have a good sysinit to fall back on ( It defaults to the standard sysinit
# if you press <ESC> for the alternate boot at boot time)
TZ=utc00
rtc -l hw
Dev &
Dev.con -n 4 &
reopen
Dev.ser &
Dev.par &
emu87 &
netmap -f
tinit -t /dev/con1 -T /dev/con[2-4] &

# Note: This sysinit is far from complete, there are many other processes
# that you might wish to automatically start at boot time. For example,
# to enable QNX networking you can add the following before the netmap statement:
Net &
Net.ether1000 &

# Net.ether1000 is the driver for NE1000/2000 ethernet cards. To detect the driver
# type for a different type of card, run the following:
/bin/nettrap query

# When you reboot, the system will be fully setup.

ALSO:  Customers have reported success when using the newest Partition Magic with Windows 98 on one drive and QNX4 on the other.