3 A suite of bootloaders for Linux
5 Copyright (C) 1994-2005 H. Peter Anvin
7 This program is provided under the terms of the GNU General Public
8 License, version 2 or, at your option, any later version. There is no
9 warranty, neither expressed nor implied, to the function of this
10 program. Please see the included file COPYING for details.
12 ----------------------------------------------------------------------
14 SYSLINUX now has a home page at http://syslinux.zytor.com/
16 ----------------------------------------------------------------------
18 The SYSLINUX suite contains the following boot loaders
19 ("derivatives"), for their respective boot media:
21 SYSLINUX - MS-DOS/Windows FAT filesystem
22 PXELINUX - PXE network booting
23 ISOLINUX - ISO9660 CD-ROM
24 EXTLINUX - Linux ext2/ext3 filesystem
26 For historical reasons, some of the sections in this document applies
27 to the FAT loader only; see pxelinux.doc, isolinux.doc and
28 extlinux.doc for what differs in these versions.
30 Help with cleaning up the docs would be greatly appreciated.
33 ++++ CREATING A BOOTABLE LINUX FLOPPY +++
35 In order to create a bootable Linux floppy using SYSLINUX, prepare a
36 normal MS-DOS formatted floppy. Copy one or more Linux kernel files to
37 it, then execute the DOS command:
41 (or whichever drive letter is appropriate; the [] meaning -s is optional)
43 Use "syslinux.com" (in the dos subdirectory of the distribution) for
44 plain DOS (MS-DOS, DR-DOS, PC-DOS, FreeDOS...) or Win9x/ME.
46 Use "syslinux.exe" (in the win32 subdirectory of the distribution) for
49 Under Linux, execute the command:
51 syslinux [-s] [-o offset] /dev/fd0
53 (or, again, whichever device is the correct one.)
55 This will alter the boot sector on the disk and copy a file named
56 LDLINUX.SYS into its root directory.
58 The -s option, if given, will install a "safe, slow and stupid"
59 version of SYSLINUX. This version may work on some very buggy BIOSes
60 on which SYSLINUX would otherwise fail. If you find a machine on
61 which the -s option is required to make it boot reliably, please send
62 as much info about your machine as you can, and include the failure
65 The -o option is used with a disk image file and specifies the byte
66 offset of the filesystem image in the file.
68 On boot time, by default, the kernel will be loaded from the image named
69 LINUX on the boot floppy. This default can be changed, see the section
70 on the SYSLINUX config file.
72 If the Shift or Alt keys are held down during boot, or the Caps or Scroll
73 locks are set, SYSLINUX will display a LILO-style "boot:" prompt. The
74 user can then type a kernel file name followed by any kernel parameters.
75 The SYSLINUX loader does not need to know about the kernel file in
76 advance; all that is required is that it is a file located in the root
77 directory on the disk.
79 There are two versions of the Linux installer; one in the "mtools"
80 directory which requires no special privilege (other than write
81 permission to the device where you are installing) but requires the
82 mtools program suite to be available, and one in the "unix" directory
83 which requires root privilege.
86 ++++ CONFIGURATION FILE ++++
88 All the configurable defaults in SYSLINUX can be changed by putting a
89 file called SYSLINUX.CFG in the root directory of the boot floppy. This
90 is a text file in either UNIX or DOS format, containing one or more of
91 the following items (case is insensitive for keywords; upper case is used
92 here to indicate that a word should be typed verbatim):
94 All options here applies to PXELINUX, ISOLINUX and EXTLINUX as well as
95 SYSLINUX unless otherwise noted. See the respective .doc files.
98 A comment line. The whitespace after the hash mark is mandatory.
100 DEFAULT kernel options...
101 Sets the default command line. If SYSLINUX boots automatically,
102 it will act just as if the entries after DEFAULT had been typed
103 in at the "boot:" prompt.
105 If no configuration file is present, or no DEFAULT entry is
106 present in the config file, the default is "linux auto".
108 NOTE: Earlier versions of SYSLINUX used to automatically
109 append the string "auto" to whatever the user specified using
110 the DEFAULT command. As of version 1.54, this is no longer
111 true, as it caused problems when using a shell as a substitute
112 for "init." You may want to include this option manually.
115 Add one or more options to the kernel command line. These are
116 added both for automatic and manual boots. The options are
117 added at the very beginning of the kernel command line,
118 usually permitting explicitly entered kernel options to override
119 them. This is the equivalent of the LILO "append" option.
121 IPAPPEND flag_val [PXELINUX only]
122 The IPAPPEND option is available only on PXELINUX. The
123 flag_val is an OR of the following options:
125 1: indicates that an option of the following format
126 should be generated and added to the kernel command line:
128 ip=<client-ip>:<boot-server-ip>:<gw-ip>:<netmask>
130 ... based on the input from the DHCP/BOOTP or PXE boot server.
132 THE USE OF THIS OPTION IS NOT RECOMMENDED. If you have to use
133 it, it is probably an indication that your network configuration
134 is broken. Using just "ip=dhcp" on the kernel command line
135 is a preferrable option, or, better yet, run dhcpcd/dhclient,
136 from an initrd if necessary.
138 2: indicates that an option of the following format
139 should be generated and added to the kernel command line:
141 BOOTIF=<hardware-address-of-boot-interface>
143 ... in dash-separated hexadecimal with leading hardware type
144 (same as for the configuration file; see pxelinux.doc.)
146 This allows an initrd program to determine from which
147 interface the system booted.
152 IPAPPEND flag_val [PXELINUX only]
153 Indicates that if "label" is entered as the kernel to boot,
154 SYSLINUX should instead boot "image", and the specified APPEND
155 and IPAPPEND options should be used instead of the ones
156 specified in the global section of the file (before the first
157 LABEL command.) The default for "image" is the same as
158 "label", and if no APPEND is given the default is to use the
159 global entry (if any).
161 Starting with version 2.20, LABEL statements are compressed
162 internally, therefore the maximum number of LABEL statements
163 depends on their complexity. Typical is around 600. SYSLINUX
164 will print an error message if the internal memory for labels
167 Note that LILO uses the syntax:
172 ... whereas SYSLINUX uses the syntax:
177 Notes: Labels are mangled as if they were filenames, and must be
178 unique after mangling. For example, two labels
179 "v2.1.30" and "v2.1.31" will not be distinguishable
180 under SYSLINUX, since both mangle to the same DOS filename.
181 This is also true for "foo bar" and "foo baz".
183 The "kernel" doesn't have to be a Linux kernel; it can
184 be a boot sector or a COMBOOT file (see below.)
187 Append nothing. APPEND with a single hyphen as argument in a
188 LABEL section can be used to override a global APPEND.
190 LOCALBOOT type [ISOLINUX, PXELINUX]
191 On PXELINUX, specifying "LOCALBOOT 0" instead of a "KERNEL"
192 option means invoking this particular label will cause a local
193 disk boot instead of booting a kernel.
195 The argument 0 means perform a normal boot. The argument 4
196 will perform a local boot with the Universal Network Driver
197 Interface (UNDI) driver still resident in memory. Finally,
198 the argument 5 will perform a local boot with the entire PXE
199 stack, including the UNDI driver, still resident in memory.
200 All other values are undefined. If you don't know what the
201 UNDI or PXE stacks are, don't worry -- you don't want them,
204 On ISOLINUX, the "type" specifies the local drive number to
205 boot from; 0x00 is the primary floppy drive and 0x80 is the
206 primary hard drive. The special value -1 causes ISOLINUX to
207 report failure to the BIOS, which, on recent BIOSes, should
208 mean that the next boot device in the boot sequence should be
212 If flag_val is 0, do not load a kernel image unless it has been
213 explicitly named in a LABEL statement. The default is 1.
215 ALLOWOPTIONS flag_val
216 If flag_val is 0, the user is not allowed to specify any
217 arguments on the kernel command line. The only options
218 recognized are those specified in an APPEND statement. The
222 Indicates how long to wait at the boot: prompt until booting
223 automatically, in units of 1/10 s. The timeout is cancelled as
224 soon as the user types anything on the keyboard, the assumption
225 being that the user will complete the command line already
226 begun. A timeout of zero will disable the timeout completely,
227 this is also the default.
230 Indicates how long to wait until booting automatically, in
231 units of 1/10 s. This timeout is *not* cancelled by user
232 input, and can thus be used to deal with serial port glitches
233 or "the user walked away" type situations. A timeout of zero
234 will disable the timeout completely, this is also the default.
236 Both TIMEOUT and TOTALTIMEOUT can be used together, for
239 # Wait 5 seconds unless the user types something, but
240 # always boot after 15 minutes.
244 ONTIMEOUT kernel options...
245 Sets the command line invoked on a timeout. Normally this is
246 the same thing as invoked by "DEFAULT". If this is specified,
247 then "DEFAULT" is used only if the user presses <Enter> to
250 ONERROR kernel options...
251 If a kernel image is not found (either due to it not existing,
252 or because IMPLICIT is set), run the specified command. The
253 faulty command line is appended to the specified options, so
254 if the ONERROR directive reads as:
258 ... and the command line as entered by the user is:
262 ... SYSLINUX will execute the following as if entered by the
265 xyzzy plugh foo bar baz
267 SERIAL port [[baudrate] flowcontrol]
268 Enables a serial port to act as the console. "port" is a
269 number (0 = /dev/ttyS0 = COM1, etc.) or an I/O port address
270 (e.g. 0x3F8); if "baudrate" is omitted, the baud rate defaults
271 to 9600 bps. The serial parameters are hardcoded to be 8
272 bits, no parity, 1 stop bit.
274 "flowcontrol" is a combination of the following bits:
277 0x010 - Wait for CTS assertion
278 0x020 - Wait for DSR assertion
279 0x040 - Wait for RI assertion
280 0x080 - Wait for DCD assertion
281 0x100 - Ignore input unless CTS asserted
282 0x200 - Ignore input unless DSR asserted
283 0x400 - Ignore input unless RI asserted
284 0x800 - Ignore input unless DCD asserted
286 All other bits are reserved.
290 0 - No flow control (default)
291 0x303 - Null modem cable detect
292 0x013 - RTS/CTS flow control
293 0x813 - RTS/CTS flow control, modem input
294 0x023 - DTR/DSR flow control
295 0x083 - DTR/DCD flow control
297 For the SERIAL directive to be guaranteed to work properly, it
298 should be the first directive in the configuration file.
300 NOTE: "port" values from 0 to 3 means the first four serial
301 ports detected by the BIOS. They may or may not correspond to
302 the legacy port values 0x3F8, 0x2F8, 0x3E8, 0x2E8.
305 If flag_val is 0, disable output to the normal video console.
306 If flag_val is 1, enable output to the video console (this is
309 Some BIOSes try to forward this to the serial console and
310 sometimes make a total mess thereof, so this option lets you
311 disable the video console on these systems.
314 Load a font in .psf format before displaying any output
315 (except the copyright line, which is output as ldlinux.sys
316 itself is loaded.) SYSLINUX only loads the font onto the
317 video card; if the .psf file contains a Unicode table it is
318 ignored. This only works on EGA and VGA cards; hopefully it
319 should do nothing on others.
322 Install a simple keyboard map. The keyboard remapper used is
323 *very* simplistic (it simply remaps the keycodes received from
324 the BIOS, which means that only the key combinations relevant
325 in the default layout -- usually U.S. English -- can be
326 mapped) but should at least help people with AZERTY keyboard
327 layout and the locations of = and , (two special characters
328 used heavily on the Linux kernel command line.)
330 The included program keytab-lilo.pl from the LILO distribution
331 can be used to create such keymaps. The file keytab-lilo.doc
332 contains the documentation for this program.
335 Displays the indicated file on the screen at boot time (before
336 the boot: prompt, if displayed). Please see the section below
339 NOTE: If the file is missing, this option is simply ignored.
342 Prints the message on the screen.
345 If flag_val is 0, display the boot: prompt only if the Shift or Alt
346 key is pressed, or Caps Lock or Scroll lock is set (this is the
347 default). If flag_val is 1, always display the boot: prompt.
350 If flag_val is set to 1, ignore the Shift/Alt/Caps Lock/Scroll
351 Lock escapes. Use this (together with PROMPT 0) to force the
352 default boot alternative.
359 Displays the indicated file on the screen when a function key is
360 pressed at the boot: prompt. This can be used to implement
361 pre-boot online help (presumably for the kernel command line
362 options.) Note that F10 MUST be entered in the config file as
363 "F0", not "F10", and that there is currently no way to bind
364 file names to F11 and F12. Please see the section below on
367 When using the serial console, press <Ctrl-F><digit> to get to
368 the help screens, e.g. <Ctrl-F><2> to get to the F2 screen,
369 and <Ctrl-F><0> for the F10 one.
371 Blank lines are ignored.
373 Note that the configuration file is not completely decoded. Syntax
374 different from the one described above may still work correctly in this
375 version of SYSLINUX, but may break in a future one.
378 ++++ DISPLAY FILE FORMAT ++++
380 DISPLAY and function-key help files are text files in either DOS or UNIX
381 format (with or without <CR>). In addition, the following special codes
384 <FF> <FF> = <Ctrl-L> = ASCII 12
385 Clear the screen, home the cursor. Note that the screen is
386 filled with the current display color.
388 <SI><bg><fg> <SI> = <Ctrl-O> = ASCII 15
389 Set the display colors to the specified background and
390 foreground colors, where <bg> and <fg> are hex digits,
391 corresponding to the standard PC display attributes:
393 0 = black 8 = dark grey
394 1 = dark blue 9 = bright blue
395 2 = dark green a = bright green
396 3 = dark cyan b = bright cyan
397 4 = dark red c = bright red
398 5 = dark purple d = bright purple
400 7 = light grey f = white
402 Picking a bright color (8-f) for the background results in the
403 corresponding dark color (0-7), with the foreground flashing.
405 Colors are not visible over the serial console.
407 <CAN>filename<newline> <CAN> = <Ctrl-X> = ASCII 24
408 If a VGA display is present, enter graphics mode and display
409 the graphic included in the specified file. The file format
410 is an ad hoc format called LSS16; the included Perl program
411 "ppmtolss16" can be used to produce these images. This Perl
412 program also includes the file format specification.
414 The image is displayed in 640x480 16-color mode. Once in
415 graphics mode, the display attributes (set by <SI> code
416 sequences) work slightly differently: the background color is
417 ignored, and the foreground colors are the 16 colors specified
418 in the image file. For that reason, ppmtolss16 allows you to
419 specify that certain colors should be assigned to specific
422 Color indicies 0 and 7, in particular, should be chosen with
423 care: 0 is the background color, and 7 is the color used for
424 the text printed by SYSLINUX itself.
426 <EM> <EM> = <Ctrl-Y> = ASCII 25
427 If we are currently in graphics mode, return to text mode.
429 <DLE>..<ETB> <Ctrl-P>..<Ctrl-W> = ASCII 16-23
430 These codes can be used to select which modes to print a
431 certain part of the message file in. Each of these control
432 characters select a specific set of modes (text screen,
433 graphics screen, serial port) for which the output is actually
436 Character Text Graph Serial
437 ------------------------------------------------------
438 <DLE> = <Ctrl-P> = ASCII 16 No No No
439 <DC1> = <Ctrl-Q> = ASCII 17 Yes No No
440 <DC2> = <Ctrl-R> = ASCII 18 No Yes No
441 <DC3> = <Ctrl-S> = ASCII 19 Yes Yes No
442 <DC4> = <Ctrl-T> = ASCII 20 No No Yes
443 <NAK> = <Ctrl-U> = ASCII 21 Yes No Yes
444 <SYN> = <Ctrl-V> = ASCII 22 No Yes Yes
445 <ETB> = <Ctrl-W> = ASCII 23 Yes Yes Yes
449 <DC1>Text mode<DC2>Graphics mode<DC4>Serial port<ETB>
451 ... will actually print out which mode the console is in!
453 <SUB> <SUB> = <Ctrl-Z> = ASCII 26
454 End of file (DOS convention).
456 <BEL> <BEL> = <Ctrl-G> = ASCII 7
460 ++++ COMMAND LINE KEYSTROKES ++++
462 The command line prompt supports the following keystrokes:
464 <Enter> boot specified command line
465 <BackSpace> erase one character
466 <Ctrl-U> erase the whole line
467 <Ctrl-V> display the current SYSLINUX version
468 <Ctrl-W> erase one word
469 <Ctrl-X> force text mode
470 <F1>..<F10> help screens (if configured)
471 <Ctrl-F><digit> equivalent to F1..F10
472 <Ctrl-C> interrupt boot in progress
473 <Esc> interrupt boot in progress
476 ++++ COMBOOT IMAGES AND OTHER OPERATING SYSTEMS ++++
478 This version of SYSLINUX supports chain loading of other operating
479 systems (such as MS-DOS and its derivatives, including Windows 95/98),
480 as well as COMBOOT-style standalone executables (a subset of DOS .COM
481 files; see separate section below.)
483 Chain loading requires the boot sector of the foreign operating system
484 to be stored in a file in the root directory of the filesystem.
485 Because neither Linux kernels, boot sector images, nor COMBOOT files
486 have reliable magic numbers, SYSLINUX will look at the file extension.
487 The following extensions are recognized (case insensitive):
489 none or other Linux kernel image
490 .0 PXE bootstrap program (NBP) [PXELINUX only]
491 .bin "CD boot sector" [ISOLINUX only]
492 .bs Boot sector [SYSLINUX only]
493 .bss Boot sector, DOS superblock will be patched in [SYSLINUX only]
494 .c32 COM32 image (32-bit COMBOOT)
495 .cbt COMBOOT image (not runnable from DOS)
496 .com COMBOOT image (runnable from DOS)
497 .img Disk image [ISOLINUX only]
499 For filenames given on the command line, SYSLINUX will search for the
500 file by adding extensions in the order listed above if the plain
501 filename is not found. Filenames in KERNEL statements must be fully
505 ++++ BOOTING DOS (OR OTHER SIMILAR OPERATING SYSTEMS) ++++
507 This section applies to SYSLINUX only, not to PXELINUX or ISOLINUX.
508 See isolinux.doc for an equivalent procedure for ISOLINUX.
510 This is the recommended procedure for creating a SYSLINUX disk that
511 can boot either DOS or Linux. This example assumes the drive is A: in
512 DOS and /dev/fd0 in Linux; for other drives, substitute the
513 appropriate drive designator.
515 ---- Linux procedure ----
517 1. Make a DOS bootable disk. This can be done either by specifying
518 the /s option when formatting the disk in DOS, or by running the
519 DOS command SYS (this can be done under DOSEMU if DOSEMU has
520 direct device access to the relevant drive):
526 2. Boot Linux. Copy the DOS boot sector from the disk into a file:
528 dd if=/dev/fd0 of=dos.bss bs=512 count=1
530 3. Run SYSLINUX on the disk:
534 4. Mount the disk and copy the DOS boot sector file to it. The file
535 *must* have extension .bss:
537 mount -t msdos /dev/fd0 /mnt
540 5. Copy the Linux kernel image(s), initrd(s), etc to the disk, and
541 create/edit syslinux.cfg and help files if desired:
546 6. Unmount the disk (if applicable.)
550 ---- DOS/Windows procedure ----
552 To make this installation in DOS only, you need the utility copybs.com
553 (included with SYSLINUX) as well as the syslinux.com installer. If
554 you are on an WinNT-based system (WinNT, Win2k, WinXP or later), use
555 syslinux.exe instead.
557 1. Make a DOS bootable disk. This can be done either by specifying
558 the /s option when formatting the disk in DOS, or by running the
565 2. Copy the DOS boot sector from the disk into a file. The file
566 *must* have extension .bss:
570 3. Run SYSLINUX on the disk:
574 4. Copy the Linux kernel image(s), initrd(s), etc to the disk, and
575 create/edit syslinux.cfg and help files if desired:
581 ++++ COMBOOT EXECUTABLES ++++
583 SYSLINUX supports simple standalone programs, using a file format
584 similar to DOS ".com" files. A 32-bit version, called COM32, is also
585 provided. A simple API provides access to a limited set of filesystem
586 and console functions.
588 See the file comboot.doc for more information on COMBOOT and COM32
592 ++++ NOVICE PROTECTION ++++
594 SYSLINUX will attempt to detect booting on a machine with too little
595 memory, which means the Linux boot sequence cannot complete. If so, a
596 message is displayed and the boot sequence aborted. Holding down the
597 Ctrl key while booting disables this feature.
599 Any file that SYSLINUX uses can be marked hidden, system or readonly
600 if so is convenient; SYSLINUX ignores all file attributes. The
601 SYSLINUX installed automatically sets the readonly/hidden/system
602 attributes on LDLINUX.SYS.
605 ++++ NOTES ON BOOTABLE CD-ROMS ++++
607 SYSLINUX can be used to create bootdisk images for El
608 Torito-compatible bootable CD-ROMs. However, it appears that many
609 BIOSes are very buggy when it comes to booting CD-ROMs. Some users
610 have reported that the following steps are helpful in making a CD-ROM
611 that is bootable on the largest possible number of machines:
613 a) Use the -s (safe, slow and stupid) option to SYSLINUX;
614 b) Put the boot image as close to the beginning of the
615 ISO 9660 filesystem as possible.
617 A CD-ROM is so much faster than a floppy that the -s option shouldn't
618 matter from a speed perspective.
620 Of course, you probably want to use ISOLINUX instead. See isolinux.doc.
623 ++++ BOOTING FROM A FAT FILESYSTEM PARTITION ON A HARD DISK ++++
625 SYSLINUX can boot from a FAT filesystem partition on a hard disk
626 (including FAT32). The installation procedure is identical to the
627 procedure for installing it on a floppy, and should work under either
628 DOS or Linux. To boot from a partition, SYSLINUX needs to be launched
629 from a Master Boot Record or another boot loader, just like DOS itself
632 Under DOS, you can install a standard simple MBR on the primary hard
633 disk by running the command:
637 Then use the FDISK command to mark the appropriate partition active.
639 A simple MBR, roughly on par with the one installed by DOS (but
640 unencumbered), is included in the SYSLINUX distribution. To install
641 it under Linux, simply type:
643 cat mbr.bin > /dev/XXX
645 ... where /dev/XXX is the device you wish to install it on.
647 Under DOS or Win32, you can install the SYSLINUX MBR with the -m
648 option to the SYSLINUX installer, and use the -a option to mark the
649 current partition active:
653 Note that this will also install SYSLINUX on the specified partition.
656 ++++ HARDWARE INFORMATION +++
658 I have started to maintain a web page of hardware with known
659 problems. There are, unfortunately, lots of broken hardware out
660 there; especially early PXE stacks (for PXELINUX) have lots of
663 A list of problems, and workarounds (if known), is maintained at:
665 http://syslinux.zytor.com/hardware.php
668 ++++ BOOT LOADER IDS USED ++++
670 The Linux boot protocol supports a "boot loader ID", a single byte
671 where the upper nybble specifies a boot loader family (3 = SYSLINUX)
672 and the lower nybble is version or, in the case of SYSLINUX, media:
680 ++++ BUG REPORTS ++++
682 I would appreciate hearing of any problems you have with SYSLINUX. I
683 would also like to hear from you if you have successfully used SYSLINUX,
684 *especially* if you are using it for a distribution.
686 If you are reporting problems, please include all possible information
687 about your system and your BIOS; the vast majority of all problems
688 reported turn out to be BIOS or hardware bugs, and I need as much
689 information as possible in order to diagnose the problems.
691 There is a mailing list for discussion among SYSLINUX users and for
692 announcements of new and test versions. To join, or to browse the
695 http://www.zytor.com/mailman/listinfo/syslinux
697 Please DO NOT send HTML messages or attachments to the mailing list
698 (including multipart/alternative or similar.) All such messages will