The invention provides tools and techniques for running pre-boot code on a computer
from a file stored in a file system on the computer. The pre-boot code may include
an operating system which is not otherwise installed on the system. For instance,
the pre-boot code may be used to boot a DOS operating system on a computer which
lacks a DOS hard disk partition. The pre-boot code may contain code to perform
operations that are difficult to perform after the operating system is booted,
such as code for monitoring the boot process to help debug it. The pre-boot code
is obtained from the file without using booted file system code, and is then executed.
The code may be obtained by redirecting floppy drive I/O to read the pre-boot code
from a copy in memory, or to read it as needed from one or more files on the hard disk.