how to change the drive parameters like hd0 to hd1

Dear All,

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.

Thanks in advance.

With Regards,
Madhavi M.

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.

Mario, Thanks for your reply.

By the way, I did not find any information on this forum about this OR I overlooked. Could you please point to me that link?

One more issue, I am NOT able to open the .boot file in VI editor. Please let me know the way to open the .boot file.

Thanks and Regards,
Madhavi M.

Use spatch to edit the file.

openqnx.com/PNphpBB2-viewtopic-t1497-.html, check the second post. Hope that helps.

That being said if this will your normal setup.

Mario, Thanks again for the link.

I will try it and let you know all.

By the way, the QNX OS is copied into the IDE flash drive with the following commands.

  1. The IDE flash drive is formatted in Windows XP system in FAT32 mode.
  2. Then deleted the created FAT32 file system with the following command after connecting it to the QNX OS PC.
    fdisk /dev/hd0.1
  3. Created the single partition, QNX Loader, BOOT flag etc.
    fdisk /dev/hd0.1 add -f 1 QNX ALL BOOT QNX LOADER
  4. Enumerate the partition / view it
    mount -p /dev/hd0.1
  5. Initialize the file system
    dinit -h /dev/hd0.1t77
  6. Then, mounted the file system into a mount point.
    mount /dev/hd0.1t77 /mnt
  7. Mount the source IDE flash drive into an other mount point.
8) Copy the .boot and .altboot from source drive to destination drive.
  1. 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.
  2. 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.

Thanks and Regards,
Madhavi M.

I am not sure, but in you build file from “.boot” will build, you need start ide driver with IRQ:PORT of secondary slave drive… somthing like this…

qnxloader, thanks for the reply.

I did not understand your words. I am new to qnx. Could you please elaborate the statements? Please feel free to forward any links about this.

Thanks and Regards,
Madhavi M

As I right unestand: you install QNX on primary master IDE, than connect it to secondary slave IDE to boot from it?

Yes. Exactly correct.

Regards,
Madhavi M

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.

You will see string like this: Fsys.eide -n0=hd1. eide -a170 -i15 &
i15 - IRQ15
a170 -IOPORT 0x170

Dear qnxloader,

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)?

Thanks and Regards,
Madhavi M

en.kioskea.net/contents/pc/inter … q-dma.php3