The loader is basically a stripped-down kernel. The things that distinguish it from the kernel are:

The design goals of the loader are:

Using the loader

It is booted into memory by the bootblock. It will prompt for commands at the keyboard. If it doesn't get any within 5 seconds, it just goes ahead and boots the kernel using the parameters saved from before. You can manually change any of the parameters by typing in commands before it loads the kernel if you want. There is an HELP command you can type to list out what commands it has. Here is the output of the HELP command (today anyway):

  BARF                             - force access violation
  COPY <from> <to>                 - copy file
  DELETE <file>                    - delete file
  DEVICES [-FULL]                  - list out devices
  DIR <directory>                  - list out directory
  DISMOUNT <fsdevice>              - dismount filesystem device
  DUMP <file> <count> <startvbn>   - dump a file
  EXIT                             - continue boot process
  EXTRA <name> <value>             - set extra name's value
  EXTRAS                           - list out all extras
  HELP                             - print help message
  INIT <disk> <template> <volname> - initialize <disk> using <template> to <volname>
  LOGICALS                         - list out all logical names
  MKDIR <directory>                - create a directory
  MOUNT [-NOCACHE] [-READONLY] <disk> <template> - mount <disk> device on <template> filesystem
  SET <parameter> <value>          - set a parameter to the given value
  SHOW                             - display all the parameters
  TYPE <file>                      - display a file's contents
  WRITEBOOT <loaderimage> [<secpertrk> [<trkpercyl>]] - write bootblock for given loader image

There is also another version of the loader, oz_loader_linux. This will run as an user-mode program under linux. It is the same exact loader program with different drivers. It is used to create a boot disk.

One of the main purposes of the loader is so you can set system parameters before the kernel is loaded into memory. The SET and SHOW commands are provided to access the parameters.

The 'load_device' parameter may be left null. If this is the case, the loader will scan for disk drives (CDROM, floppy and hard) that:
  1. are online
  2. have media in them
  3. have enough blocks on them to contain the same blocks that the loader image was read in from
  4. contain the exact same initial parameter block, including signature, as the currently booted loader
The first (if any) that is found is used as the boot device and its name fills in the load_device parameter.