OpenBoot 2.x Command Reference Manual

Using boot to Load from Hard Disk, Floppy Disk, or Ethernet

You can also load and execute a program with boot, the command normally used to boot the operating system. boot has the following format:


ok boot [device-specifier] [filename]  -h 

device-specifier is either a full device path name or a device alias. (See Chapter 1, Overview for information on device path names and aliases.)

For a hard disk or floppy partition, filename is relative to the resident file system. (See Appendix B, Building A Bootable Floppy Disk", for information on creating a bootable floppy disk.) For Ethernet, filename is relative to the system's root partition on its root server. In both cases, the leading / must be omitted from the file path.

The -h flag specifies that the program should be loaded, but not executed.

boot uses intermediate booters to accomplish its task. When loading from a hard disk or floppy disk, OpenBoot first loads the disk's boot block, which in turn loads a second-level booter. When loading over Ethernet, the firmware uses TFTP to load the second-level booter. filename and -h are passed to these intermediate booters.

Forth Programs

Forth programs are ASCII source files that must be converted to the file format required by the secondary boot program. A utility called fakeboot is available from the SBus Support Group at Sun to perform this conversion. After the file is loaded into memory, it can be executed using the command eval.

For instance, if the file is loaded to address 0x4010, and runs for 934 bytes, type:


ok 4010 d# 934 eval 

FCode Programs

FCode programs produced by a Tokenizer (which creates FCode programs) may need to be converted to the file format of the secondary boot program. fakeboot may be useful in this process. Once the file is in memory, execute it using the byte-load command.

For example, assuming the file is loaded to address 0x4030, type:


ok 4030 1 byte-load 

Binary Executables

A binary program other than the operating system can also be loaded and executed as follows:


ok go 

go is needed since the boot command includes -h.