Add externs to avoid multiple definitions, and then add missing definitions.
[rrq/maintain_lilo.git] / readme / README.pseudo
1                             03-Jun-2002
2                 Notes on booting arbitrary REAL mode
3                         binaries at 1000:0000
4
5
6 THIS IS NOT A PART OF THE STANDARD LILO DISTRIBUTION.
7
8 Arbitrary real mode binaries cannot be loaded directly by LILO.  However, if
9 they are made to look like a "kernel image loaded LOW," then LILO can be
10 induced to load them, thinking they are an out-of-date kernel image.
11
12 Such files are limited to 512K bytes; less if you have a very large Extended
13 BIOS Data Area (EBDA), which intrudes upon the 0x9000 segment.  The start
14 addresss of the file MUST be at offset 0 in the file.  It will be loaded at
15 0x1000:0000, and jumped to at that address (segment=0x1000, offset=0000) in
16 16-bit real mode.
17
18 In order to make the arbitrary binary, call it "foo.b", look like a kernel,
19 the file "pseudo.b", the pseudo kernel header, must be pre-pended; viz.,
20
21         cat pseudo.b foo.b >foo.img
22
23 "foo.img" is the bootable pseudo-kernel.
24
25 In the configuration file, usually '/etc/lilo.conf', the following lines
26 must be added:
27
28         image = foo.img
29             root = current
30
31 The root directory specification MUST be added (this is a "kernel" after
32 all), to avoid a fatal LILO error message (unspecified numeric value). 
33 Optionally, the arbitrary image may be given a name; viz.,
34
35             label = foo-test
36
37 The image should then be bootable from the LILO boot prompt.
38
39 EXAMPLE:  Add the LILO diagnostic program "test4.com" to the LILO boot menu.
40
41 The test program is created by "make floppy", which will write a floppy disk
42 image, but it also may be added to the LILO boot menu with the following
43 commands:
44
45         make all
46         cd diagnose
47         make test4.com
48         cd ..
49         cat pseudo.b diagnose/test4.com >/boot/test4.img
50
51 Then append the following lines to '/etc/lilo.conf':
52
53         image = /boot/test4.img
54           root = current
55           label = diagnostic
56
57 Now, install the boot loader with the new menu item:
58
59         /sbin/lilo
60
61 The last item on the boot menu should be "diagnostic", which will run
62 "test4.com" from the LILO boot prompt.
63
64 --John Coffman <johninsd@san.rr.com>
65 (end)
66
67