I have a Single Board Computer (SBC) with a set of peripheral ports on it, such as serial, PS2, VGA port etc. along with IDE flash drive of 64 MB. The QNX 4.25 version is loaded into this 64 MB IDE flash drive. When I insert this SBC board into chassis, I am able to boot into the QNX 4.25 and I got the login prompt. The IDE flash drive is connected to this SBC as Primary IDE.
I have also another SBC, with a different version, where I am able to connect this IDE flash drive to a secondary IDE cable. I am able to boot from this board too using the above 64 MB IDE flash drive. However I end up with the following errors.
[color=red]Fsys cannot configure drive 1 (no ide controller present)
Please review your hardware configuration
mount -p: open () on /dev/hd0 failed: No such file or directory
By looking at those messages, I thought that the QNX OS loaded into the flash drive while the IDE flash drive connected as a Primary IDE. That is the reason, it is looking into hd0 and drive 0 instead of hd1 (secondary IDE) and drive1. Here my question is, how can I configure this already loaded QNX OS to boot from a secondary IDE cable instead of primary IDE cable. Where can I change these drive parameters from hd0 to hd1?
FYI, I have looked at the /etc/config/sysinit and /etc/config/sysinit.1 files. But there is no much luck for me. I tried to look at the .boot file also. However, I am not able to open the .boot file with the existing VI editor. The VI editor shows the following error message.
[color=red]File too big. Limit is approx 2048 K bytes only.
Even I tried to open it in the PED, which is a Photon Application, but there is also no luck. Please let me know, how can I open the .boot file and is there any parameters that I can modify for my above requirement.
Sorry for such a lengthy email. I want to explain to you all in detail and it is.
You can use spatch, and yes there is a way to boot from the second HD, however I do not remember what byte you need to modify in the .boot file. Im sure its somewhere on this forum.
By the way, the QNX OS is copied into the IDE flash drive with the following commands.
The IDE flash drive is formatted in Windows XP system in FAT32 mode.
Then deleted the created FAT32 file system with the following command after connecting it to the QNX OS PC.
fdisk /dev/hd0.1
Created the single partition, QNX Loader, BOOT flag etc.
fdisk /dev/hd0.1 add -f 1 QNX ALL BOOT QNX LOADER
Enumerate the partition / view it
mount -p /dev/hd0.1
Initialize the file system
dinit -h /dev/hd0.1t77
Then, mounted the file system into a mount point.
mount /dev/hd0.1t77 /mnt
Mount the source IDE flash drive into an other mount point.
Copy the .boot and .altboot from source drive to destination drive.
Then copy the entire content with the following command.
cp -cpvRX /source-drive /destination-drive
where X copy only file that do not exists, thus preserving .bitmap and .inodes etc.
Then unmount the drives and reboot.
Then, I am inserting the copied flash drive in a SBC board as a slave disk to the secondary IDE cable.
Please let me know if there are any concerns / comments.
When you install QNX4.25, install script detect in what IDE you boot device (primary/secondary/master/slave), and build .boot file with this parameters(IRQ/IOPORT). You need use “buildqnx” utility to build “.boot” file with IDE driver parameters for secondary slave (IRQ/IOPORT see it in user manual(i don’t remember it) for most computers usualy it’s standarts).
When you install QNX you may see it for primary master, when go device detection. If you try install to secondary slave you may see this parameters.
I have seen the following statements in sysinit files which are exists in /etc/config/ directory.
Fsys.eide -n0=hd1. eide -a170 -i15 &
i15 - IRQ15
a170 -IOPORT 0x170
Can I need to change any parameters in the above statements to boot from the secondary IDE cable (as you said IRQ number and IOPORT)?