Write a boot loader to a disk
dloader [-v] [-d drive_number] [-F|H] [device loader] ...
Neutrino
x86
If you don't specify this option or any of the other override options (-F, -H), a heuristic based on disk size and removability determines whether the drive is for a fixed or floppy disk. The order of precedence used to determine the drive number to be patched into the loader code is:
The dloader utility writes a boot loader to a disk.
The dloader utility starts by looking for the loader you specified. If your loader name contains a / (slash), dloader assumes it is a complete pathname and looks for the loader using the path you gave; if not, dloader looks in the processor family subdirectory of QNX_TARGET (under QNX Neutrino, this would be $QNX_TARGET/x86/boot/sys). To see the loaders provided in the default path, type dloader without any options.
The naming of QNX loaders provides a framework for specifying QNX and custom loaders. This framework consists of a loader name and a method of specifying optional variants.
Currently, QNX Neutrino provides the following two standard loader names:
Along with these two standard loaders, we also provide loader variants named pc1-flop and pc2-flop. These variants provide alternative loaders that are designed to work with floppy diskettes (or a hard disk with a capacity less than 8 Gbytes in an old PC with an old BIOS).
Similarly, users who wish to create and use their own loaders can specify them using unique variant names.
The device names for our loaders are prefixed with ipl-disk. So if you look in /x86/boot/sys/ under QNX Neutrino, you will see the following loaders:
If you write your own loaders, make sure you use this ipl-disk prefix.
If the loader is in the /x86/boot/sys/ path, you don't need to specify the ipl-disk prefix on the command line because dloader adds it for you. If your loader is in a different directory, you have to specify the exact path, including the prefix. |
Assuming you specified a device and loader correctly, dloader opens the device in the path you specified and, if you selected the verbose option, displays its disk and partition information.
The specified loader data is then put together and written to the disk.
The floppy (-F] and hard disk (-H] override options let you force dloader to treat a fixed device (e.g. a hard disk) as if it was a removable device (e.g. a floppy), and vice-versa. |
To see a list of available disk loaders:
dloader
To write a PC partition loader to a hard disk:
dloader /dev/hd0 pc1
To write a custom partition loader to a hard disk:
dloader /dev/hd0 /home/joe/ipl-diskpc1-tst
To write a QNX-specific second-stage PC loader to a QNX partition:
dloader /dev/hd0t79 pc2
To write a QNX loader to a floppy disk :
dloader /dev/fd0 pc2-flop
When an error occurs, dloader sends a description of the error to stderr.