Table of Contents

Remote IPL/Bootable IFS

This chapter describes the OS/2 Version 2.0 boot architecture and extensions to the installable file system mechanism (IFSM) to enable booting from an FSD-managed volume, referred to as Bootable IFS (BIFS). If the volume is on a remote system, it is referred to as Remote IPL (RIPL).

The mini-FSD is similar to the FSD defined in this document. However, it has additional requirements for to allow reading of the boot drive before the base device drivers are loaded. These requirements are fully defined in the two interface sections of this chapter.

To satisfy its I/O requests, the mini-FSD may call the disk device device driver imbedded in OS2KRNL (BIFS case) or it may provide its own driver (RIPL case).

Along with the mini-FSD, the IFS SYS Utility is required to initialize an FSD-managed volume with whatever is required to satisfy the requirements of the mini-FSD and this document.

The IFS mechanism includes some additional calls which the mini-FSD may need while it is linked into the IFS chain.

Operational Description

FAT Boot Procedure

The following figure represents the major stages of the OS/2 Version 2.0 FAT boot procedure.

  1. POST
  2. BOOT SECTOR
  3. OS2BOOT (OS2LDR loader)
  4. OS2LDR
  5. stage1 OS2KRNL
  6. stage2
  7. stage3

Figure 4-1. OS/2 Version 2.0 FAT boot procedure

BIFS Boot Procedure

The following figure represents the major stages of the OS/2 Version 2.0 BIFS boot procedure.

  1. POST
  2. BlackBox (MicroFSD)
  3. OS2LDR
  4. stage1 OS2KRNL
  5. stage2
  6. stage3

Figure 4-2. OS/2 Version 2.0 BIFS boot procedure

Interfaces

BlackBox/OS2LDR interface

When initially transferring control to OS2LDR from a “black box”, the following interface is defined:

DH boot mode flags:

bit 0 (NOVOLIO) on indicates that the mini-FSD does not use MFSH_DOVOLIO.
bit 1 (RIPL) on indicates that boot volume is not local (RIPL boot)
bit 2 (MINIFSD) on indicates that a mini-FSD is present.
bit 3 (RESERVED)
bit 4 (MICROFSD) on indicates that a micro-FSD is present.
bits 5-7 are reserved and MUST be zero.

DL drive number for the boot disk. This parameter is ignored if either the NOVOLIO or MINIFSD bits are zero.

DS:SI is a pointer to the BOOT Media's BPB. This parameter is ignored if either the NOVOLIO or MINIFSD bits are zero.

ES:DI is a pointer to a filetable structure. The filetable structure has the following format:

struct FileTable {
    unsigned short ft_cfiles; /* # of entries in this table             */
    unsigned short ft_ldrseg; /* paragraph # where OS2LDR is loaded     */
    unsigned long  ft_ldrlen; /* length of OS2LDR in bytes              */
    unsigned short ft_museg;  /* paragraph # where microFSD is loaded   */
    unsigned long  ft_mulen;  /* length of microFSD in bytes            */
    unsigned short ft_mfsseg; /* paragraph # where miniFSD is loaded    */
    unsigned long  ft_mfslen; /* length of miniFSD in bytes             */
    unsigned short ft_ripseg; /* paragraph # where RIPL data is loaded  */
    unsigned long  ft_riplen; /* length of RIPL data in bytes           */
 
    /* The next four elements are pointers to microFSD entry points     */
 
    unsigned short (far *ft_muOpen)
                     (char far *pName, unsigned long far *pulFileSize);
    unsigned long (far *ft_muRead)
                     (long loffseek, char far *pBuf, unsigned long cbBuf);
    unsigned long (far *ft_muClose)(void);
    unsigned long (far *ft_muTerminate)(void);
}

The microFSD entry points interface is defined as follows:

mu_Open - is passed a far pointer to name of file to be opened and a far pointer to a ULONG to return the file's size. The returned value (in AX) indicates success(0) or failure(non-0).
mu_Read - is passed a seek offset, a far pointer to a data buffer, and the size of the data buffer. The returned value(in DX:AX) indicates the number of bytes actually read.
mu_Close - has no parameters and expects no return value. It is a signal to the micro-FSD that the loader is done reading the current file.
mu_Terminate - has no parameters and expects no return value. It is a signal to the micro-FSD that the loader has finished reading the boot drive.

The loader will call the micro-FSD in a Open-Read-Read-….-Read-Close sequence with each file read in from the boot drive.

miniFSD/OS2KRNL interface

Figure 4-3 on page 4-6 shows the functions called during a typical boot sequence:

  1. stage1
    1. MFS_INIT
    2. MFS_OPEN
    3. MFS_READ
    4. MFS_CHGFILEPTR
    5. MFS_CLOSE
  2. stage2
    1. FS_INIT
    2. FS_MOUNT/ATTACH
    3. FS_OPEN
    4. FS_READ
    5. FS_CHGFILEPTR
  3. stage3
    1. MFS_TERM

Figure 4-3. Typical boot sequence

Stage 1 interfaces

The following functions must be made available by the mini-FSD. These functions will be called only during stage 1.

The following helper functions are available to the mini-FSD. These functions may be called only during stage 1.

Stage 2 interfaces

Stage 3 Interfaces

Imbedded Device Driver Helpers

The following helper functions are available to the mini-FSD and may be called during stage 1, 2, or 3. These helpers are counterparts for some of the device help functions and are intended for use by a device driver imbedded within the mini-FSD.

Special Considerations

The size of the mini-FSD file image plus the RIPL data area may not exceed 62K. In addition, the memory requirements of the mini-FSD may not exceed 64K.

The mini-FSD is only required to support reading of a file. Therefore, any call to DosWrite (or other non-supported functions) which becomes redirected to the mini-FSD may be rejected. For this reason, it is required that the IFS= command which loads the FSD which will replace the mini-FSD be the first IFS= command in CONFIG.SYS. Also, only DEVICE= commands which load device drivers required by that FSD should appear before the first IFS= command.

If the mini-FSD needs to switch to real mode, it must use the MFSH_CALLRM function. This is required to keep OS/2 informed of the mode switching.

Each FSD which is bootable is required to provide their “black box” to load OS2LDR and the mini-FSD into memory before OS2LDR is given control.

Additionally, these FSDs are required to provide a single executable module in order to support the OS/2 SYS utility. The executable provided will be invoked by this utility when performing a SYS for that file system. The command line that was passed to the utility will be passed unchanged to the executable.

The supplied executable must do whatever is required to make the partition bootable. At the very least, it must install a boot sector. It also needs to install the “black box”, mini-FSD, OS2LDR and OS.