1 | This is FILO, a bootloader which loads boot images from local filesystem,
|
---|
2 | without help from legacy BIOS services.
|
---|
3 |
|
---|
4 | Expected usage is to flash it into the BIOS ROM together with LinuxBIOS.
|
---|
5 |
|
---|
6 | FEATURES
|
---|
7 |
|
---|
8 | - Supported boot devices: IDE hard disk and CD-ROM, and system memory (ROM)
|
---|
9 | - Supported filesystems: ext2, fat, jfs, minix, reiserfs, xfs, and iso9660
|
---|
10 | - Supported image formats: ELF and [b]zImage (a.k.a. /vmlinuz)
|
---|
11 | - Supports boot disk image of El Torito bootable CD-ROM
|
---|
12 | - Supports loading image from raw device with user-specified offset
|
---|
13 | - Console on VGA + keyboard, serial port, or both
|
---|
14 | - Line editing with ^H, ^W and ^U keys to type arbitrary filename to boot
|
---|
15 | - Full support for the ELF Boot Proposal (where is it btw, Eric?)
|
---|
16 | - Auxiliary tool to compute checksum of ELF boot images
|
---|
17 | - Full 32-bit code, no BIOS calls
|
---|
18 |
|
---|
19 | REQUIREMENT
|
---|
20 |
|
---|
21 | Only i386 PC architecture is currently supported.
|
---|
22 |
|
---|
23 | x86-64 (AMD 64) machines in 32-bit mode should also work.
|
---|
24 | (It looks like LinuxBIOS uses 32-bit mode and Linux kernel does
|
---|
25 | the transition to 64-bit mode)
|
---|
26 |
|
---|
27 | I'm using a VIA EPIA 5000 mini-ITX board, with a 2.5" IDE hard disk
|
---|
28 | and a 32x CD-RW, for testing, and Bochs and VMware for development.
|
---|
29 |
|
---|
30 | Recent version of GNU toolchain is required to build.
|
---|
31 | I have tested with Debian/woody (gcc 2.95.4, binutils 2.12.90.0.1,
|
---|
32 | make 3.79.1) and Debian/sid (gcc 3.3.2, binutils 2.14.90.0.6,
|
---|
33 | make 3.80).
|
---|
34 |
|
---|
35 | INSTALL
|
---|
36 |
|
---|
37 | First invocation of make creates the default Config file.
|
---|
38 | $ make
|
---|
39 | Edit this file as you like. It's fairly straightforward (I hope).
|
---|
40 | $ vi Config
|
---|
41 | Then running make again will build filo.elf, the ELF boot image of FILO.
|
---|
42 | $ make
|
---|
43 |
|
---|
44 | Use filo.elf as your payload of LinuxBIOS, or a boot image for
|
---|
45 | Etherboot.
|
---|
46 |
|
---|
47 | If you enable MULTIBOOT_IMAGE option in Config, you can
|
---|
48 | also boot filo.elf from GNU GRUB or other Multiboot bootloader.
|
---|
49 | This feature is intended for testing or development purpose.
|
---|
50 |
|
---|
51 | USING
|
---|
52 |
|
---|
53 | When FILO starts, it displays "boot:" prompt.
|
---|
54 | At "boot:" prompt, type the name of your boot image, and optionally
|
---|
55 | the kernel parameter, in the form:
|
---|
56 | DEVICE:FILENAME[ PARAM]
|
---|
57 | for example:
|
---|
58 | boot: hda1:/vmlinuz root=/dev/hda1
|
---|
59 |
|
---|
60 | Notation of DEVICE for IDE disk and CD-ROM is same as in Linux
|
---|
61 | (eg. hda1 means the first partition of master device on primary
|
---|
62 | IDE channel).
|
---|
63 |
|
---|
64 | FILENAME can be standard bzImage/zImage (vmlinuz) Linux kernels,
|
---|
65 | Linux-compatible images such as memtest.bin of Memtest86,
|
---|
66 | and any bootable ELF images, which include Linux kernel converted
|
---|
67 | by mkelfImage, Etherboot .elf and .zelf, Memtest86, FILO itself, etc.
|
---|
68 |
|
---|
69 | If AUTOBOOT_FILE is set in Config, FILO tries to boot this file
|
---|
70 | first, and falls back to boot: prompt if it fails.
|
---|
71 |
|
---|
72 | If AUTOBOOT_DELAY is also set, FILO waits for specified time in
|
---|
73 | seconds before booting AUTOBOOT_FILE. If <Esc> key is pressed
|
---|
74 | during this time period, automatic boot is canceled.
|
---|
75 | Pressing <Enter> key also cancels the delay, but in this case
|
---|
76 | AUTOBOOT_FILE is booted immediately.
|
---|
77 |
|
---|
78 | Even if AUTOBOOT_DELAY is not set, automatic boot can be disabled
|
---|
79 | by pressing <Esc> key beforehand.
|
---|
80 |
|
---|
81 | FILO can also load separate initrd images along with vmlinuz
|
---|
82 | kernels. (For ELF kernel, initrd images are embedded into the
|
---|
83 | ELF file and cannot be altered).
|
---|
84 | To do so, add "initrd=NAME" parameter to the kernel command line.
|
---|
85 | NAME uses the same notation as kernel image name.
|
---|
86 | (eg. boot: hda1:/vmlinuz initrd=hda1:/root.gz root=/dev/ram)
|
---|
87 |
|
---|
88 | To boot an image in the BIOS flash (or whatever is mapped in the system
|
---|
89 | memory space), use the notation "mem@OFFSET[,LENGTH]", like:
|
---|
90 | boot: mem@0xfffe0000
|
---|
91 | In this example, it loads the boot image from the last 128KB of BIOS
|
---|
92 | flash.
|
---|
93 |
|
---|
94 | The same notation can be used with IDE devices, eg:
|
---|
95 | boot: hda@512,697344 initrd=hda@1M,4M
|
---|
96 | In this case the 697344 bytes starting from second sector of IDE drive
|
---|
97 | is loaded as kernel, and 4M bytes of offset 1M bytes of the same disk
|
---|
98 | is loaded as initrd.
|
---|
99 | Note that when you load vmlinuz kernel or initrd this way,
|
---|
100 | you must specify the LENGTH parameter. You can omit it for ELF
|
---|
101 | images since they have segment length internally.
|
---|
102 | OFFSET and LENGTH parameters must be multiple of 512.
|
---|
103 |
|
---|
104 | BUG REPORTING
|
---|
105 |
|
---|
106 | If you have problem with FILO, set DEBUG_ALL in Config and send its
|
---|
107 | console output to me at <[email protected]>.
|
---|
108 |
|
---|
109 | ACKNOWLEDGEMENTS
|
---|
110 |
|
---|
111 | Filesystem code is taken from GNU GRUB and patches for it.
|
---|
112 | IDE driver is originally taken from Etherboot.
|
---|
113 | Steve Gehlbach wrote the original bzImage loader for FILO.
|
---|
114 |
|
---|
115 | Besides, I have taken pieces of code and/or learned concepts
|
---|
116 | from various standalone programs, including GNU GRUB, Etherboot,
|
---|
117 | polled IDE patch by Adam Agnew, Memtest86, LinuxBIOS, and Linux.
|
---|
118 | I must say thanks to all the developers of these wonderful software,
|
---|
119 | especially to Eric Biederman for his great development work in this area.
|
---|
120 |
|
---|
121 | LICENSE
|
---|
122 |
|
---|
123 | Copyright (C) 2003 by SONE Takeshi <[email protected]> and others.
|
---|
124 | This program is licensed under the terms of GNU General Public License.
|
---|
125 | See the COPYING file for details.
|
---|