Secondary loader, sometimes refered as a boot sector, is a small (not more than 510 bytes due to the sector size limitation) program which actually loads the operating system. It knows the underlaying file system in order to find the OS image on the partition. It also knows some details about OS image in order to correctly transfer control to the image. It usually gets control from primary loader which is located in MBR. But sometimes, if partitioning of hard drive is not necessary, secondary loader could be placed in MBR and gets control directly from BIOS.
QNX6 for x86 systems with BIOS provides two types of the secondary loaders. ipl-diskpc2-flop is the secondary loader utilizing INT 13h function 2 (read sector) to read the OS image. This reading method is most compatible and allows to read the floppy disks as well as the hard disks. There is some limitation of this method. INT 13h function 2 uses old cylinder/head/sector (CHS) addressing model and cannot access the hard disk beyond 1024 cylinder. ipl-diskpc2 reads the disk by INT 13h function 42h (extended read). This is modern reading method utilizing 64-bit addressing model for the disk block to be read. Drawback of this method is in unsupporting of floppy drives. It worth to mention, the loader does not use all 64 bits of address, but 32 bits only, effectively limiting your hard drive space to 2048GB (anyway, most modern BIOSes still have more severe limitations).
There are two possible error messages from the secondary loader in QNX6.
If you had just installed the loader and got this message, this probably means your BIOS does not support extended read function (AH=42h INT 13h). "Extended" disk I/O functions were added to BIOS years after the original PC/AT systems hit the market. These functions do not use the old fashion CHS addressing model and they are free of the related limitations. These functions do not work with floppy drives. In this case, boot off the rescue floppy and install ipl-diskpc2-flop loader supplied with QNX distributive or ipl-diskpc2-uniq from this site. Generally speaking this error message means that the BIOS function was not able to successfully read all requested data.
After loading the OS image into memory, the secondary loader scans through first 32K of the image to find out the image header signature. That place in memory is a reference point for the loader that allows the loader to put the physical memory address of just loaded image into the image header. Pre-boot code of image (first 128K) is a 16-bit real mode code and it is located in low memory. Loader transfers control to this pre-boot code and it uses this address in header to find the complete OS image in high memory for transfering control to the 32-bit protected mode code later when all real-mode job has been done. This is the way how QNX6 system starts. This error message means that that signature was not found and booting is impossible. This can happen if image file or whole QNX file system got corrupted. In this case try to boot .altboot image or boot off the rescue floppy. Check the file system and replace the .boot file from the system backup.
Any of these errors could be indicated or system can behave unexpectedly during start up if boot sector itself got corrupted. Also there is possibility that there is a confusion between how the disk geometry treated by BIOS and by dinit (or dloader). Don’t be afraid to reboot computer into BIOS Setup and check translation method used for your hard drive, likely you need LBA mode turned on.
If nothing of above helps, you may want to send me all information about your hardware and BIOS version, provided that you are using some custom loader downloaded from this site. I will not help you, but it might help me to improve the loader.
QNX may keep two boot images .boot and .altboot on the QNX partition and QNX secondary loader allows to select which OS image you want to boot. It is a very useful feature, although the implementation has a huge drawback. Even if you want to boot default .boot image, you have to wait while timeout for keyboard input expires or strike a key as soon as possible. In other words, QNX6 computer without someone standing near by will waste about 2 seconds while rebooting. The problem could be solved by patching the standard loader in order to reduce the timeout, there is an excellent patcher’s guide at Rob Krten’s home page. Second solution might be a custom loader. To keep the useful feature in and rid of the timeout, I changed the way of choosing the boot image. Now, you have to do nothing for booting .boot, and you have to press Shift key and hold it down while booting computer for .altboot. Most BIOSes will not complain about Shift key held down. If your BIOS complains about Shift, try to hold Alt or Control key. If it still complains, try to set "Ignore keyboard errors" in BIOS Setup. If it does not help, you need a different custom loader, sorry.
Some other reasons for writting the custom loaders provided here:
Downloading any of these loaders you do take all risks and responsibilities. I am not responsible for any loss or damage you may incur because of use or not use or misuse of these loaders and information provided on this page. I am not liable whatsoever happens.
Right-click on a "Download..." link provided below in this document and choose "Save Target As..." in the drop-down menu. Some anti-virus software may complain about this file saying it contains a new modificated virus. Temporarily disable anti-virus monitoring while copying the file to the QNX partition in this case. As you might know what is virus in DOS (Windows) is not necessarily virus in QNX.
Be aware these loaders do not work with QNX 6.0 (aka QNXRTP). Download these loaders to /x86/boot/sys directory. Keeping loaders in this directory you may use short names of the loaders, for example "pc2-uniq" instead of "/x86/boot/sys/ipl-diskpc2-uniq". Note that QNX versions prior 6.2 do not handle short names correctly. Use dinit or dloader to install one of them into boot sector. Note that "dinit -B loader..." does not work correctly. It writes "pc2" loader even if you specify -F option without initializing the file system in version 6.1, and it only writes loader regardless of -b option in version 6.2.1. Examples:
# dloader /dev/hd0t79 pc2-f16
# dloader -d0x81 /dev/hd1t79 ./ipl-diskpc2-quiet
Do not use -m option of dinit if for some reason you want to change the greeting message. It simply did not work in QNX versions prior 6.2, but in the later QNX releases it works for standard loaders only. To locate the greeting message and patch it, dinit looks for string "Hit Esc". Since no one loader provided here has the message starting from that string, this method does not work. The greeting message is a null terminated ASCII string, and if you feel confident in hex editing use the spatch utility:
# spatch /x86/boot/sys/ipl-diskpc2-uniq
Now, when you have carefully read all information above, here are loaders.
This loader combines reading methods used in both standard loaders ipl-diskpc2 and ipl-diskpc2-flop. This is the only loader here which is suitable for a floppy disk and/or an old BIOS. It performs multisector read, although the data chunks for the CHS read may be smaller in order to avoid "multitrack" read (some BIOSes do not support that). It checks BIOS for the extended read support and if the extended function is not available it tries to read image using CHS method. Hold the Alt key down during start up for loading .altboot.
This loader works with a hard disk only and BIOS INT 13h extention has to be supported. Therefore, it’s will not work with a many years old BIOS or a floppy disk. It reads as many sectors as possible in one INT 13h call.
This loader inherits all advantages of its ancestor pc2-fast plus:
This is yet another successor of pc2-fast. As everyone can guess, this loader follows up the old *nix concept to be quiet if everything is going well. No greetings, no fancy dots. If you need to boot alternative image, you still have to press and hold down the Shift key during boot up.
Thanks to quiet nature of this loader and space that became available because of shorter code, the error messages of this loader are in more human readable form ever:
This loader does not provide any performance improvement over standard one ipl-diskpc2. It reads sector by sector. It does not check the BIOS extention availability. It reports about errors in the same poorly way, i.e. prints D when experiences disk I/O error and S when cannot find the QNX image signature. Finally, it does not even support greeting message. Simply there is no greeting message in this loader but stylish QNX logo. It is a sorta programming art, that’s why it is called TrueQNX loader. Screenshot is available here.
/etc | Photographs | QNX Corner | Home |
©2004-2009, Eduard Kromskoy