Update copyrights to 1999
[profile/ivi/syslinux.git] / syslinux.doc
1                                SYSLINUX
2                              Version 1.43
3                             March 19, 1999
4
5               A bootloader for Linux using MS-DOS floppies
6
7                 Copyright (C) 1994-1999 H. Peter Anvin
8
9 This program is provided under the terms of the GNU General Public
10 License, version 2 or, at your option, any later version.  There is no
11 warranty, neither expressed nor implied, to the function of this
12 program.  Please see the included file COPYING for details.
13
14 SYSLINUX is a boot loader for the Linux operating system which
15 operates off an MS-DOS/Windows FAT filesystem.  It is intended to
16 simplify first-time installation of Linux, and for creation of rescue-
17 and other special-purpose boot disks.
18
19 SYSLINUX can be used, when properly set up, completely eliminate the
20 need for distribution of raw diskette images for boot floppies.  A
21 SYSLINUX floppy can be manipulated using standard MS-DOS (or any other
22 OS that can access an MS-DOS filesystem) tools once it has been
23 created.
24
25    ++++ WHAT SYSLINUX IS NOT ++++
26
27 SYSLINUX is probably not suitable as a general purpose boot loader.
28 It can only boot Linux from a FAT filesystem, and not, for example,
29 ext2.  Since a native Linux implementation will typically use ext2,
30 another boot loader (e.g. LILO) is probably more suitable.  In a
31 system which actually contains DOS or Windows, LOADLIN may be simpler
32 to use.
33
34 However, SYSLINUX has shown itself to be quite useful in a number of
35 special-purpose applications.
36
37    ++++ CREATING A BOOTABLE LINUX FLOPPY +++
38
39 In order to create a bootable Linux floppy using SYSLINUX, prepare a
40 normal MS-DOS formatted floppy.  Copy one or more Linux kernel files to
41 it, then execute the DOS command:
42
43         syslinux [-s] a:
44
45 (or whichever drive letter is appropriate; the [] meaning -s is optional) 
46
47 or the Linux command:
48
49         syslinux [-s] /dev/fd0
50
51 (or, again, whichever device is the correct one.)
52
53 This will alter the boot sector on the disk and copy a file named
54 LDLINUX.SYS into its root directory.
55
56 The -s option, if given, will install a "safe, slow and stupid"
57 version of SYSLINUX.  This version may work on some very buggy BIOSes
58 on which SYSLINUX would otherwise fail.
59
60 WARNING: There seems to be a bug in some recent experimental Linux
61          kernels that causes floppy disk corruption when using the
62          Linux syslinux installer.  This bug exists in kernels
63          2.1.79-2.1.86; as far as I know the bug is fixed in 2.1.87.
64
65 On boot time, by default, the kernel will be loaded from the image named
66 LINUX on the boot floppy.  This default can be changed, see the section
67 on the SYSLINUX config file.
68
69 If the Shift or Alt keys are held down during boot, or the Caps or Scroll
70 locks are set, SYSLINUX will display a LILO-style "boot:" prompt.  The
71 user can then type a kernel file name followed by any kernel parameters.
72 The SYSLINUX loader does not need to know about the kernel file in
73 advance; all that is required is that it is a file located in the root
74 directory on the disk.
75
76    ++++ CONFIGURATION FILE ++++
77
78 All the configurable defaults in SYSLINUX can be changed by putting a
79 file called SYSLINUX.CFG in the root directory of the boot floppy.  This
80 is a text file in either UNIX or DOS format, containing one or more of
81 the following items (case is insensitive for keywords; upper case is used
82 here to indicate that a word should be typed verbatim):
83
84 DEFAULT kernel options...
85         Sets the default command line.  If SYSLINUX boots automatically,
86         it will act just as if the entries after DEFAULT had been typed
87         in at the "boot:" prompt, except that the option "auto" is
88         automatically added, indicating an automatic boot.
89
90         If no configuration file is present, or no DEFAULT entry is
91         present in the config file, the default is kernel name "linux",
92         with no options.
93
94 APPEND options...
95         Add one or more options to the kernel command line.  These are
96         added both for automatic and manual boots.  The options are
97         added at the very beginning of the kernel command line,
98         usually permitting explicitly entered kernel options to override
99         them.  This is the equivalent of the LILO "append" option.
100
101 LABEL label
102   KERNEL image
103   APPEND options...
104         Indicates that if "label" is entered as the kernel to boot,
105         SYSLINUX should instead boot "image", and the specified APPEND
106         options should be used instead of the ones specified in the
107         global section of the file (before the first LABEL command.)
108         The default for "image" is the same as "label", and if no
109         APPEND is given the default is to use the global entry (if any).
110         Up to 128 LABEL entries are permitted.
111
112         Note that LILO uses the syntax:
113         image = mykernel
114           label = mylabel
115           append = "myoptions"
116
117         corresponding to the SYSLINUX:
118         label mylabel
119           kernel mykernel
120           append myoptions
121
122         Notes:  Labels are mangled as if they were DOS filenames, and must be
123                 unique after mangling.  For example, two labels
124                 "v2.1.30" and "v2.1.31" will not be distinguishable.
125
126                 The "image" doesn't have to be a Linux kernel; it can
127                 be a boot sector or a COMBOOT file (see below.)
128
129   APPEND -
130         Append nothing.  APPEND with a single hyphen as argument in a
131         LABEL section can be used to override a global APPEND.
132
133 IMPLICIT flag_val
134         If flag_val is 0, do not load a kernel image unless it has been
135         explicitly named in a LABEL statement.  The default is 1.
136
137 TIMEOUT timeout
138         Indicates how long to wait at the boot: prompt until booting
139         automatically, in units of 1/10 s.  The timeout is cancelled as
140         soon as the user types anything on the keyboard, the assumption
141         being that the user will complete the command line already
142         begun.  A timeout of zero will disable the timeout completely,
143         this is also the default.
144
145         NOTE: The maximum possible timeout value is 35996; corresponding to
146         just below one hour.
147
148 FONT filename
149         Load a font in .psf format before displaying any output
150         (except the copyright line, which is output as ldlinux.sys
151         itself is loaded.)  SYSLINUX only loads the font onto the
152         video card; if the .psf file contains a Unicode table it is
153         ignored.  This only works on EGA and VGA cards; hopefully it
154         should do nothing on others.
155
156 KBDMAP keymap
157         Install a simple keyboard map.  The keyboard remapper used is
158         *very* simplistic (it simply remaps the keycodes received from
159         the BIOS, which means that only the key combinations relevant
160         in the default layout -- usually U.S. English -- can be
161         mapped) but should at least help people with AZERTY keyboard
162         layout and the locations of = and , (two special characters
163         used heavily on the Linux kernel command line.)
164
165         The included program keytab-lilo.pl from the LILO distribution
166         can be used to create such keymaps.  The file keytab-lilo.doc
167         contains the documentation for this program.
168
169 DISPLAY filename
170         Displays the indicated file on the screen at boot time (before
171         the boot: prompt, if displayed).  This option takes the place of
172         the LINUXMSG.TXT and BOOTMSG.TXT files in SYSLINUX 1.0.  Please
173         see the section below on DISPLAY files.
174
175         NOTE: If the file is missing, this option is simply ignored.
176
177 PROMPT flag_val
178         If flag_val is 0, display the boot: prompt only if the Shift or Alt
179         key is pressed, or Caps Lock or Scroll lock is set (this is the
180         default).  If flag_val is 1, always display the boot: prompt.  This
181         option takes the place of testing for the LINUXMSG.TXT file in
182         SYSLINUX 1.0.
183
184 F1 filename
185 F2 filename
186    ...etc...
187 F9 filename
188 F0 filename
189         Displays the indicated file on the screen when a function key is
190         pressed at the boot: prompt.  This can be used to implement
191         pre-boot online help (presumably for the kernel command line
192         options.)  Note that F10 MUST be entered in the config file as
193         "F0", not "F10", and that there is currently no way to bind
194         file names to F11 and F12.  Please see the section below on
195         DISPLAY files.
196
197 Blank lines, and comment lines beginning with a hash mark (#) are ignored.
198
199 Note that the configuration file is not completely decoded.  Syntax
200 different from the one described above may still work correctly in this
201 version of SYSLINUX, but may break in a future one.
202
203    ++++ LARGE KERNELS AND INITIAL RAMDISK SUPPORT ++++
204
205 This version of SYSLINUX supports large kernels (bzImage format),
206 eliminating the 500K size limit of the zImage kernel format.  bzImage
207 format kernels are detected automatically and handled transparently to
208 the user.
209
210 This version of SYSLINUX also supports a boot-time-loaded ramdisk
211 (initrd).  An initrd is loaded from a DOS file if the option
212 "initrd=filename" (where filename is the filename of the initrd image;
213 the file must be located in the root directory on the boot floppy) is
214 present on the processed command line (after APPEND's have been added,
215 etc.).  If several initrd options are present, the last one has
216 precedence; this permits user-entered options to override a config
217 file APPEND.  Specifying "initrd=" without a filename inhibits initrd
218 loading.  The file specified by the initrd= option will typically be a
219 gzipped filesystem image.
220
221 NOTE: One of the main advantages with SYSLINUX is that it makes it
222 very easy to support users with new or unexpected configurations,
223 especially in a distribution setting.  If initrd is used to
224 extensively modularize the distribution kernel, it is strongly
225 recommended that a simple way of adding drivers to the boot floppy be
226 provided.  The suggested manner is to let the initrd system mount the
227 boot floppy and look for additional drivers in a predetermined
228 location.
229
230 To bzImage and recent zImage kernels, SYSLINUX 1.30 and higher will
231 identify using the ID byte 0x31.  The ID range 0x32-0x3f is reserved
232 for future versions of SYSLINUX.
233
234    ++++ DISPLAY FILE FORMAT ++++
235
236 DISPLAY and function-key help files are text files in either DOS or UNIX
237 format (with or without <CR>).  In addition, the following special codes
238 are interpreted:
239
240 <FF>                                    <FF> = <Ctrl-L> = ASCII 12
241         Clear the screen, home the cursor.  Note that the screen is
242         filled with the current display color.
243
244 <SI><bg><fg>                            <SI> = <Ctrl-O> = ASCII 15
245         Set the display colors to the specified background and
246         foreground colors, where <bg> and <fg> are hex digits,
247         corresponding to the standard PC display attributes:
248
249         0 = black               8 = dark grey
250         1 = dark blue           9 = bright blue
251         2 = dark green          a = bright green
252         3 = dark cyan           b = bright cyan
253         4 = dark red            c = bright red
254         5 = dark purple         d = bright purple
255         6 = brown               e = yellow
256         7 = light grey          f = white
257
258         Picking a bright color (8-f) for the background results in the
259         corresponding dark color (0-7), with the foreground flashing.
260
261 <SUB>                                   <SUB> = <Ctrl-Z> = ASCII 26
262         End of file (DOS convention).
263
264    ++++ COMBOOT IMAGES AND OTHER OPERATING SYSTEMS ++++
265
266 This version of SYSLINUX supports chain loading of other operating
267 systems (such as MS-DOS and its derivatives, including Windows 95/98),
268 as well as COMBOOT-style standalone executables (a subset of DOS .COM
269 files; see separate section below.)
270
271 Chain loading requires the boot sector of the foreign operating system
272 to be stored in a file in the root directory of the filesystem.
273 Because neither Linux kernels, boot sector images, nor COMBOOT files
274 have reliable magic numbers, SYSLINUX will look at the file
275 extension.  The following extensions are recognized:
276
277         none or other   Linux kernel image
278         .CBT            COMBOOT image (not runnable from DOS)
279         .BSS            Boot sector (DOS superblock will be patched in)
280         .BS             Boot sector
281         .COM            COMBOOT image (runnable from DOS)
282
283 For filenames given on the command line, SYSLINUX will search for the
284 file by adding extensions in the order listed above if the plain
285 filename is not found.  Filenames in KERNEL statements must be fully
286 qualified.
287
288    ++++ BOOTING DOS ++++
289
290 This is the recommended procedure for creating a SYSLINUX disk that
291 can boot either DOS or Linux.  This example assumes the drive is A: in
292 DOS and /dev/fd0 in Linux; for other drives, substitute the
293 appropriate drive designator.
294
295    ---- Linux procedure ----
296
297 1. Make a DOS bootable disk.  This can be done either by specifying
298    the /s option when formatting the disk in DOS, or by running the
299    DOS command SYS (this can be done under DOSEMU if DOSEMU has
300    direct device access to the relevant drive):
301
302         format a: /s
303    or
304         sys a:
305
306 2. Boot Linux.  Copy the DOS boot sector from the disk into a file:
307
308         dd if=/dev/fd0 of=dos.bss bs=512 count=1
309
310 3. Run SYSLINUX on the disk:
311
312         syslinux /dev/fd0
313
314 4. Mount the disk and copy the DOS boot sector file to it.  The file
315    *must* have extension .bss:
316
317         mount -t msdos /dev/fd0 /mnt
318         cp dos.bss /mnt
319
320 5. Copy the Linux kernel image(s), initrd(s), etc to the disk, and
321    create/edit syslinux.cfg and help files if desired:
322
323         cp vmlinux /mnt
324         cp initrd.gz /mnt
325
326 6. Unmount the disk (if applicable.)
327
328         umount /mnt
329  
330    ---- DOS procedure ----
331
332 To make this installation in DOS only, you need the utility copybs.com
333 (included with SYSLINUX) as well as the syslinux.com installer.
334
335 1. Make a DOS bootable disk.  This can be done either by specifying
336    the /s option when formatting the disk in DOS, or by running the
337    DOS command SYS:
338
339         format a: /s
340    or
341         sys a:
342
343 2. Copy the DOS boot sector from the disk into a file.  The file
344    *must* have extension .bss:
345
346         copybs a: a:dos.bss
347
348 3. Run SYSLINUX on the disk:
349
350         syslinux a:
351
352 4. Copy the Linux kernel image(s), initrd(s), etc to the disk, and
353    create/edit syslinux.cfg and help files if desired:
354
355         copy vmlinux a:
356         copy initrd.gz a:
357  
358    ++++ COMBOOT EXECUTABLES ++++
359
360 A COMBOOT file is a standalone executable in DOS .COM format.  They
361 can, among other things, be produced by the Etherboot package by
362 Markus Gutschke and Ken Yap.  The following requirements apply for
363 these files to be sufficiently "standalone" for SYSLINUX to be able to
364 load and run them:
365
366   * The program must not execute any DOS calls (since there is no
367     DOS), although it may call the BIOS.  The only exception is that
368     the program may execute INT 20h (Terminate Program) to return to
369     the SYSLINUX prompt.  Note especially that INT 21h AH=4Ch, INT 21h
370     AH=31h or INT 27h are *not* supported.
371   * Only the following fields in the PSP are supported:
372     - pspInt20 at offset 00h;
373     - pspNextParagraph at offset 02h;
374     - pspCommandTail at offset 80h (contains the arguments from the
375       SYSLINUX command line).
376
377     All other fields will contain zero.
378   * The program must not modify any main memory outside its 64K
379     segment if it returns to SYSLINUX via INT 20h.
380
381 SYSLINUX requires that COMBOOT files end in ".COM" or ".CBT".  Files
382 ending in .COM can be run from the DOS command line, files ending in
383 .CBT cannot, otherwise there is no difference.  SYSLINUX will prefer a
384 .CBT file over a similarly named .COM.
385
386 SYSLINUX currently doesn't provide any form of API for the use of
387 COMBOOT files.  If there is need, a future version may contain an INT
388 interface to some SYSLINUX functions; please contact me if you have a
389 need or ideas for such an API.
390
391    ++++ NOVICE PROTECTION ++++
392
393 SYSLINUX will attempt to detect if the user is trying to boot on a 286
394 or lower class machine, or a machine with less than 608K of low ("DOS")
395 RAM (which means the Linux boot sequence cannot complete).  If so, a
396 message is displayed and the boot sequence aborted.  Holding down the
397 Ctrl key while booting disables this feature.
398
399 The compile time and date of a specific SYSLINUX version can be obtained
400 by the DOS command "type ldlinux.sys".  This is also used as the
401 signature for the LDLINUX.SYS file, which must match the boot sector.
402
403 Any file that SYSLINUX uses can be marked hidden, system or readonly if
404 so is convenient; SYSLINUX ignores all file attributes.  The SYSLINUX
405 installed automatically sets the readonly attribute on LDLINUX.SYS.
406
407    ++++ NOTES ON BOOTABLE CD-ROMS ++++
408
409 SYSLINUX can be used to create bootdisk images for El
410 Torito-compatible bootable CD-ROMs.  However, it appears that many
411 BIOSes are very buggy when it comes to booting CD-ROMs.  Some users
412 have reported that the following steps are helpful in making a CD-ROM
413 that is bootable on the largest possible number of machines:
414
415         a) Use the -s (safe, slow and stupid) option to SYSLINUX;
416         b) Put the boot image as close to the beginning of the
417            ISO 9660 filesystem as possible.
418
419 A CD-ROM is so much faster than a floppy that the -s option shouldn't
420 matter from a speed perspective.
421
422    ++++ BOOTING FROM A FAT FILESYSTEM PARTITION ON A HARD DISK ++++
423
424 SYSLINUX can boot from a FAT12 or FAT16 filesystem partition on a hard
425 disk (FAT32, introduced in Windows 95 OSR-2, is not supported,
426 however.)  The installation procedure is identical to the procedure
427 for installing it on a floppy, and should work under either DOS or
428 Linux.  To boot from a partition, SYSLINUX needs to be launched from a
429 Master Boot Record or another boot loader, just like DOS itself would.
430
431 Under DOS, you can install a standard simple MBR on the primary hard
432 disk by running the command:
433
434         FDISK /MBR
435
436 Then use the FDISK command to mark the appropriate partition active.
437
438    ++++ KNOWN BUGS ++++
439
440 SYSLINUX is unsafe to use on any filesystem that extends past cylinder
441 1024.  This is a fundamental limitation of the standard BIOS API.
442
443 SYSLINUX will not work (and will refuse to install) on filesystems
444 with a cluster size of more than 16K (typically means a filesystem of
445 more than 1 GB.)
446
447    ++++ COMPATIBILITY WITH SYSLINUX 1.0 ++++
448
449 The following combinations of options can be used to mimic the behaviour
450 of SYSLINUX 1.0 with LINUXMSG.TXT or BOOTMSG.TXT present, respectively:
451
452 # Mimic SYSLINUX 1.0 with LINUXMSG.TXT file present:
453 display linuxmsg.txt
454 prompt 1
455
456 # Mimic SYSLINUX 1.0 with BOOTMSG.TXT file present:
457 display bootmsg.txt
458
459    ++++ BUG REPORTS ++++
460
461 I would appreciate hearing of any problems you have with SYSLINUX.  I
462 would also like to hear from you if you have successfully used SYSLINUX,
463 *especially* if you are using it for a distribution.
464
465 If you are reporting problems, please include all possible information
466 about your system and your BIOS; the vast majority of all problems
467 reported turn out to be BIOS or hardware bugs, and I need as much
468 information as possible in order to diagnose the problems.
469
470 There is a mailing list for discussion among SYSLINUX users and for
471 announcements of new and test versions.  To join, send a message to
472 majordomo@linux.kernel.org with the line:
473
474 subscribe syslinux
475
476 in the body of the message.  The submission address is
477 syslinux@linux.kernel.org.