File references

This section describes the references among files involved in the boot procedures.

#displaymath577#

The boot sector contains the primary boot loader, the address of the default command line sector, the address of both descriptor table sectors and the addresses of the sectors of the secondary boot loader. The generic boot sector is copied from <#119#> boot.b<#119#>. The primary boot loader can store up to eight sector addresses of the secondary boot loader.

#displaymath579#

The map file consists of so-called sections and of special data sectors. Each section spans an integral number of disk sectors and contains addresses of sectors of other files. There are three exceptions: 1. If a ``hole'' is being covered or if the floppy boot sector of an unstripped kernel has been omitted, the address of the zero sector is used. This sector is part of the map file. 2. When booting a different operating system, the first sector is the merged chain loader that has been written to the map file before that section. 3. Each map section describing an image is followed by a sector containing the options line of that image. The last address slot of each map sector is either unused (if the map section ends in this sector) or contains the address of the next map sector in the section. The four sectors at the beginning of the map file are special: the first sector contains the default command line, the next two sectors contain the boot image descriptor table and the fourth sector is filled with zero bytes. This sector is mapped whenever a file contains a ``hole''.

#displaymath581#

A kernel image consists simply of a sequence of sectors being loaded. The descriptor also contains a pointer to a sector with parameter line options. This sector is stored in the map file. Images that are loaded from a device are treated exactly the same way as images that are loaded from a file.

#displaymath583#

When booting another operating system, the chain loader (<#400#> chain.b<#400#>) is merged with the patched partition table and written into the map file. The map section of this boot image starts after that sector and contains only the address of a dummy floppy boot sector (the zero sector, but its contents are irrelevant), the loader sector and the boot sector of the other operating system.