QNX RTOS v4 Knowledge Base
QNX RTOS v4 Knowledge Base
Title |
What happens after "Press ESC to boot alternate OS" |
Ref. No. |
QNX.000009542 |
Category(ies) |
Configuration |
Issue |
What is the first line of code executed after "Press ESC to boot alternate OS." is displayed in QNX4?
|
Solution |
After this message, the secondary boot loader reads in the 'Root block' of the partition. This is the second block of a partition (or disk in the case of a floppy) and contains inode entries for /.boot and /.altboot (the two os images that are available to load from the root directory). It locates the second block using the parameters for heads and sectors/track that were stored as part of the secondary boot loader when it was writen to disk by the dinit utility. In the case of the shipped boot floppy, we can assume these values are correct; however if a driver was seeing a disk incorrectly when it was dinit'd, the secondary boot loader won't be looking for the root block, or subsequent blocks, in the correct place.
The boot loader then loops for 2 seconds waiting for a key to be pressed. If a key is pressed, it checks if it was the escape key. If it was the escape key, /.altboot is loaded. If any other key was pressed (or no key), /.boot is loaded.
The rest of the procedure follows the format of the QNX file system. If the image spans more than 1 extent (contiguous set of blocks), the boot loader finds subsequent extents by referencing a table in the extent block for the image. The initial inode entry for the image contains a location for the first extent block. For more information on the structure of a QNX filesystem, please consult the 'System Architecture' guide and the 'User's Guide'.
To accomplish all of the above, the following bios functions are used: int 12h (return number of contiguous 1K memory blocks) int 16h function 01h (read keyboard status) int 13h function 02h (read specific number of blocks) int 13h function 00h (reset disk drive controler) int 10h function 0Eh (to print a character to the screen)
|
|