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:
39 syslinux [-sfma][-d directory] a:
41 (or whichever drive letter is appropriate; the [] meaning 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 [-sf][-d directory][-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 (or a subdirectory, if the -d
59 The -s option, if given, will install a "safe, slow and stupid"
60 version of SYSLINUX. This version may work on some very buggy BIOSes
61 on which SYSLINUX would otherwise fail. If you find a machine on
62 which the -s option is required to make it boot reliably, please send
63 as much info about your machine as you can, and include the failure
66 The -o option is used with a disk image file and specifies the byte
67 offset of the filesystem image in the file.
69 For the DOS and Windows installers, the -m and -a options can be used
70 on hard drives to write a Master Boot Record (MBR), and to mark the
71 specific partition active.
73 On boot time, by default, the kernel will be loaded from the image named
74 LINUX on the boot floppy. This default can be changed, see the section
75 on the SYSLINUX config file.
77 If the Shift or Alt keys are held down during boot, or the Caps or Scroll
78 locks are set, SYSLINUX will display a LILO-style "boot:" prompt. The
79 user can then type a kernel file name followed by any kernel parameters.
80 The SYSLINUX loader does not need to know about the kernel file in
81 advance; all that is required is that it is a file located in the root
82 directory on the disk.
84 There are two versions of the Linux installer; one in the "mtools"
85 directory which requires no special privilege (other than write
86 permission to the device where you are installing) but requires the
87 mtools program suite to be available, and one in the "unix" directory
88 which requires root privilege.
91 ++++ CONFIGURATION FILE ++++
93 All the configurable defaults in SYSLINUX can be changed by putting a
94 file called "syslinux.cfg" in the root directory of the boot disk.
96 This is a text file in either UNIX or DOS format, containing one or
97 more of the following items (case is insensitive for keywords; upper
98 case is used here to indicate that a word should be typed verbatim):
100 Starting with version 3.35, the configuration file can also be in
101 either the /boot/syslinux or /syslinux directories (searched in that
102 order.) If that is the case, then all filenames are assumed to be
103 relative to that same directory, unless preceded with a slash or
106 All options here applies to PXELINUX, ISOLINUX and EXTLINUX as well as
107 SYSLINUX unless otherwise noted. See the respective .doc files.
110 A comment line. The whitespace after the hash mark is mandatory.
112 DEFAULT kernel options...
113 Sets the default command line. If SYSLINUX boots automatically,
114 it will act just as if the entries after DEFAULT had been typed
115 in at the "boot:" prompt.
117 If no configuration file is present, or no DEFAULT entry is
118 present in the config file, the default is "linux auto".
120 NOTE: Earlier versions of SYSLINUX used to automatically
121 append the string "auto" to whatever the user specified using
122 the DEFAULT command. As of version 1.54, this is no longer
123 true, as it caused problems when using a shell as a substitute
124 for "init." You may want to include this option manually.
127 Add one or more options to the kernel command line. These are
128 added both for automatic and manual boots. The options are
129 added at the very beginning of the kernel command line,
130 usually permitting explicitly entered kernel options to override
131 them. This is the equivalent of the LILO "append" option.
133 IPAPPEND flag_val [PXELINUX only]
134 The IPAPPEND option is available only on PXELINUX. The
135 flag_val is an OR of the following options:
137 1: indicates that an option of the following format
138 should be generated and added to the kernel command line:
140 ip=<client-ip>:<boot-server-ip>:<gw-ip>:<netmask>
142 ... based on the input from the DHCP/BOOTP or PXE boot server.
144 THE USE OF THIS OPTION IS NOT RECOMMENDED. If you have to use
145 it, it is probably an indication that your network configuration
146 is broken. Using just "ip=dhcp" on the kernel command line
147 is a preferrable option, or, better yet, run dhcpcd/dhclient,
148 from an initrd if necessary.
150 2: indicates that an option of the following format
151 should be generated and added to the kernel command line:
153 BOOTIF=<hardware-address-of-boot-interface>
155 ... in dash-separated hexadecimal with leading hardware type
156 (same as for the configuration file; see pxelinux.doc.)
158 This allows an initrd program to determine from which
159 interface the system booted.
164 IPAPPEND flag_val [PXELINUX only]
165 Indicates that if "label" is entered as the kernel to boot,
166 SYSLINUX should instead boot "image", and the specified APPEND
167 and IPAPPEND options should be used instead of the ones
168 specified in the global section of the file (before the first
169 LABEL command.) The default for "image" is the same as
170 "label", and if no APPEND is given the default is to use the
171 global entry (if any).
173 Starting with version 2.20, LABEL statements are compressed
174 internally, therefore the maximum number of LABEL statements
175 depends on their complexity. Typical is around 600. SYSLINUX
176 will print an error message if the internal memory for labels
179 Note that LILO uses the syntax:
184 ... whereas SYSLINUX uses the syntax:
189 Note: The "kernel" doesn't have to be a Linux kernel; it can
190 be a boot sector or a COMBOOT file (see below.)
192 Since version 3.32 label names are no longer mangled into DOS
193 format (for SYSLINUX.)
196 Append nothing. APPEND with a single hyphen as argument in a
197 LABEL section can be used to override a global APPEND.
199 LOCALBOOT type [ISOLINUX, PXELINUX]
200 On PXELINUX, specifying "LOCALBOOT 0" instead of a "KERNEL"
201 option means invoking this particular label will cause a local
202 disk boot instead of booting a kernel.
204 The argument 0 means perform a normal boot. The argument 4
205 will perform a local boot with the Universal Network Driver
206 Interface (UNDI) driver still resident in memory. Finally,
207 the argument 5 will perform a local boot with the entire PXE
208 stack, including the UNDI driver, still resident in memory.
209 All other values are undefined. If you don't know what the
210 UNDI or PXE stacks are, don't worry -- you don't want them,
213 On ISOLINUX, the "type" specifies the local drive number to
214 boot from; 0x00 is the primary floppy drive and 0x80 is the
215 primary hard drive. The special value -1 causes ISOLINUX to
216 report failure to the BIOS, which, on recent BIOSes, should
217 mean that the next boot device in the boot sequence should be
221 If flag_val is 0, do not load a kernel image unless it has been
222 explicitly named in a LABEL statement. The default is 1.
224 ALLOWOPTIONS flag_val
225 If flag_val is 0, the user is not allowed to specify any
226 arguments on the kernel command line. The only options
227 recognized are those specified in an APPEND statement. The
231 Indicates how long to wait at the boot: prompt until booting
232 automatically, in units of 1/10 s. The timeout is cancelled as
233 soon as the user types anything on the keyboard, the assumption
234 being that the user will complete the command line already
235 begun. A timeout of zero will disable the timeout completely,
236 this is also the default.
239 Indicates how long to wait until booting automatically, in
240 units of 1/10 s. This timeout is *not* cancelled by user
241 input, and can thus be used to deal with serial port glitches
242 or "the user walked away" type situations. A timeout of zero
243 will disable the timeout completely, this is also the default.
245 Both TIMEOUT and TOTALTIMEOUT can be used together, for
248 # Wait 5 seconds unless the user types something, but
249 # always boot after 15 minutes.
253 ONTIMEOUT kernel options...
254 Sets the command line invoked on a timeout. Normally this is
255 the same thing as invoked by "DEFAULT". If this is specified,
256 then "DEFAULT" is used only if the user presses <Enter> to
259 ONERROR kernel options...
260 If a kernel image is not found (either due to it not existing,
261 or because IMPLICIT is set), run the specified command. The
262 faulty command line is appended to the specified options, so
263 if the ONERROR directive reads as:
267 ... and the command line as entered by the user is:
271 ... SYSLINUX will execute the following as if entered by the
274 xyzzy plugh foo bar baz
276 SERIAL port [[baudrate] flowcontrol]
277 Enables a serial port to act as the console. "port" is a
278 number (0 = /dev/ttyS0 = COM1, etc.) or an I/O port address
279 (e.g. 0x3F8); if "baudrate" is omitted, the baud rate defaults
280 to 9600 bps. The serial parameters are hardcoded to be 8
281 bits, no parity, 1 stop bit.
283 "flowcontrol" is a combination of the following bits:
286 0x010 - Wait for CTS assertion
287 0x020 - Wait for DSR assertion
288 0x040 - Wait for RI assertion
289 0x080 - Wait for DCD assertion
290 0x100 - Ignore input unless CTS asserted
291 0x200 - Ignore input unless DSR asserted
292 0x400 - Ignore input unless RI asserted
293 0x800 - Ignore input unless DCD asserted
295 All other bits are reserved.
299 0 - No flow control (default)
300 0x303 - Null modem cable detect
301 0x013 - RTS/CTS flow control
302 0x813 - RTS/CTS flow control, modem input
303 0x023 - DTR/DSR flow control
304 0x083 - DTR/DCD flow control
306 For the SERIAL directive to be guaranteed to work properly, it
307 should be the first directive in the configuration file.
309 NOTE: "port" values from 0 to 3 means the first four serial
310 ports detected by the BIOS. They may or may not correspond to
311 the legacy port values 0x3F8, 0x2F8, 0x3E8, 0x2E8.
314 If flag_val is 0, disable output to the normal video console.
315 If flag_val is 1, enable output to the video console (this is
318 Some BIOSes try to forward this to the serial console and
319 sometimes make a total mess thereof, so this option lets you
320 disable the video console on these systems.
323 Load a font in .psf format before displaying any output
324 (except the copyright line, which is output as ldlinux.sys
325 itself is loaded.) SYSLINUX only loads the font onto the
326 video card; if the .psf file contains a Unicode table it is
327 ignored. This only works on EGA and VGA cards; hopefully it
328 should do nothing on others.
331 Install a simple keyboard map. The keyboard remapper used is
332 *very* simplistic (it simply remaps the keycodes received from
333 the BIOS, which means that only the key combinations relevant
334 in the default layout -- usually U.S. English -- can be
335 mapped) but should at least help people with AZERTY keyboard
336 layout and the locations of = and , (two special characters
337 used heavily on the Linux kernel command line.)
339 The included program keytab-lilo.pl from the LILO distribution
340 can be used to create such keymaps. The file keytab-lilo.doc
341 contains the documentation for this program.
344 Displays the indicated file on the screen at boot time (before
345 the boot: prompt, if displayed). Please see the section below
348 NOTE: If the file is missing, this option is simply ignored.
351 Prints the message on the screen.
354 If flag_val is 0, display the boot: prompt only if the Shift or Alt
355 key is pressed, or Caps Lock or Scroll lock is set (this is the
356 default). If flag_val is 1, always display the boot: prompt.
359 If flag_val is set to 1, ignore the Shift/Alt/Caps Lock/Scroll
360 Lock escapes. Use this (together with PROMPT 0) to force the
361 default boot alternative.
368 Displays the indicated file on the screen when a function key is
369 pressed at the boot: prompt. This can be used to implement
370 pre-boot online help (presumably for the kernel command line
371 options.) Note that F10 MUST be entered in the config file as
372 "F0", not "F10", and that there is currently no way to bind
373 file names to F11 and F12. Please see the section below on
376 When using the serial console, press <Ctrl-F><digit> to get to
377 the help screens, e.g. <Ctrl-F><2> to get to the F2 screen,
378 and <Ctrl-F><0> for the F10 one.
380 Blank lines are ignored.
382 Note that the configuration file is not completely decoded. Syntax
383 different from the one described above may still work correctly in this
384 version of SYSLINUX, but may break in a future one.
387 ++++ DISPLAY FILE FORMAT ++++
389 DISPLAY and function-key help files are text files in either DOS or UNIX
390 format (with or without <CR>). In addition, the following special codes
393 <FF> <FF> = <Ctrl-L> = ASCII 12
394 Clear the screen, home the cursor. Note that the screen is
395 filled with the current display color.
397 <SI><bg><fg> <SI> = <Ctrl-O> = ASCII 15
398 Set the display colors to the specified background and
399 foreground colors, where <bg> and <fg> are hex digits,
400 corresponding to the standard PC display attributes:
402 0 = black 8 = dark grey
403 1 = dark blue 9 = bright blue
404 2 = dark green a = bright green
405 3 = dark cyan b = bright cyan
406 4 = dark red c = bright red
407 5 = dark purple d = bright purple
409 7 = light grey f = white
411 Picking a bright color (8-f) for the background results in the
412 corresponding dark color (0-7), with the foreground flashing.
414 Colors are not visible over the serial console.
416 <CAN>filename<newline> <CAN> = <Ctrl-X> = ASCII 24
417 If a VGA display is present, enter graphics mode and display
418 the graphic included in the specified file. The file format
419 is an ad hoc format called LSS16; the included Perl program
420 "ppmtolss16" can be used to produce these images. This Perl
421 program also includes the file format specification.
423 The image is displayed in 640x480 16-color mode. Once in
424 graphics mode, the display attributes (set by <SI> code
425 sequences) work slightly differently: the background color is
426 ignored, and the foreground colors are the 16 colors specified
427 in the image file. For that reason, ppmtolss16 allows you to
428 specify that certain colors should be assigned to specific
431 Color indicies 0 and 7, in particular, should be chosen with
432 care: 0 is the background color, and 7 is the color used for
433 the text printed by SYSLINUX itself.
435 <EM> <EM> = <Ctrl-Y> = ASCII 25
436 If we are currently in graphics mode, return to text mode.
438 <DLE>..<ETB> <Ctrl-P>..<Ctrl-W> = ASCII 16-23
439 These codes can be used to select which modes to print a
440 certain part of the message file in. Each of these control
441 characters select a specific set of modes (text screen,
442 graphics screen, serial port) for which the output is actually
445 Character Text Graph Serial
446 ------------------------------------------------------
447 <DLE> = <Ctrl-P> = ASCII 16 No No No
448 <DC1> = <Ctrl-Q> = ASCII 17 Yes No No
449 <DC2> = <Ctrl-R> = ASCII 18 No Yes No
450 <DC3> = <Ctrl-S> = ASCII 19 Yes Yes No
451 <DC4> = <Ctrl-T> = ASCII 20 No No Yes
452 <NAK> = <Ctrl-U> = ASCII 21 Yes No Yes
453 <SYN> = <Ctrl-V> = ASCII 22 No Yes Yes
454 <ETB> = <Ctrl-W> = ASCII 23 Yes Yes Yes
458 <DC1>Text mode<DC2>Graphics mode<DC4>Serial port<ETB>
460 ... will actually print out which mode the console is in!
462 <SUB> <SUB> = <Ctrl-Z> = ASCII 26
463 End of file (DOS convention).
465 <BEL> <BEL> = <Ctrl-G> = ASCII 7
469 ++++ COMMAND LINE KEYSTROKES ++++
471 The command line prompt supports the following keystrokes:
473 <Enter> boot specified command line
474 <BackSpace> erase one character
475 <Ctrl-U> erase the whole line
476 <Ctrl-V> display the current SYSLINUX version
477 <Ctrl-W> erase one word
478 <Ctrl-X> force text mode
479 <F1>..<F10> help screens (if configured)
480 <Ctrl-F><digit> equivalent to F1..F10
481 <Ctrl-C> interrupt boot in progress
482 <Esc> interrupt boot in progress
485 ++++ COMBOOT IMAGES AND OTHER OPERATING SYSTEMS ++++
487 This version of SYSLINUX supports chain loading of other operating
488 systems (such as MS-DOS and its derivatives, including Windows 95/98),
489 as well as COMBOOT-style standalone executables (a subset of DOS .COM
490 files; see separate section below.)
492 Chain loading requires the boot sector of the foreign operating system
493 to be stored in a file in the root directory of the filesystem.
494 Because neither Linux kernels, boot sector images, nor COMBOOT files
495 have reliable magic numbers, SYSLINUX will look at the file extension.
496 The following extensions are recognized (case insensitive):
498 none or other Linux kernel image
499 .0 PXE bootstrap program (NBP) [PXELINUX only]
500 .bin "CD boot sector" [ISOLINUX only]
501 .bs Boot sector [SYSLINUX only]
502 .bss Boot sector, DOS superblock will be patched in [SYSLINUX only]
503 .c32 COM32 image (32-bit COMBOOT)
504 .cbt COMBOOT image (not runnable from DOS)
505 .com COMBOOT image (runnable from DOS)
506 .img Disk image [ISOLINUX only]
508 For filenames given on the command line, SYSLINUX will search for the
509 file by adding extensions in the order listed above if the plain
510 filename is not found. Filenames in KERNEL statements must be fully
514 ++++ BOOTING DOS (OR OTHER SIMILAR OPERATING SYSTEMS) ++++
516 This section applies to SYSLINUX only, not to PXELINUX or ISOLINUX.
517 See isolinux.doc for an equivalent procedure for ISOLINUX.
519 This is the recommended procedure for creating a SYSLINUX disk that
520 can boot either DOS or Linux. This example assumes the drive is A: in
521 DOS and /dev/fd0 in Linux; for other drives, substitute the
522 appropriate drive designator.
524 ---- Linux procedure ----
526 1. Make a DOS bootable disk. This can be done either by specifying
527 the /s option when formatting the disk in DOS, or by running the
528 DOS command SYS (this can be done under DOSEMU if DOSEMU has
529 direct device access to the relevant drive):
535 2. Boot Linux. Copy the DOS boot sector from the disk into a file:
537 dd if=/dev/fd0 of=dos.bss bs=512 count=1
539 3. Run SYSLINUX on the disk:
543 4. Mount the disk and copy the DOS boot sector file to it. The file
544 *must* have extension .bss:
546 mount -t msdos /dev/fd0 /mnt
549 5. Copy the Linux kernel image(s), initrd(s), etc to the disk, and
550 create/edit syslinux.cfg and help files if desired:
555 6. Unmount the disk (if applicable.)
559 ---- DOS/Windows procedure ----
561 To make this installation in DOS only, you need the utility copybs.com
562 (included with SYSLINUX) as well as the syslinux.com installer. If
563 you are on an WinNT-based system (WinNT, Win2k, WinXP or later), use
564 syslinux.exe instead.
566 1. Make a DOS bootable disk. This can be done either by specifying
567 the /s option when formatting the disk in DOS, or by running the
574 2. Copy the DOS boot sector from the disk into a file. The file
575 *must* have extension .bss:
579 3. Run SYSLINUX on the disk:
583 4. Copy the Linux kernel image(s), initrd(s), etc to the disk, and
584 create/edit syslinux.cfg and help files if desired:
590 ++++ COMBOOT EXECUTABLES ++++
592 SYSLINUX supports simple standalone programs, using a file format
593 similar to DOS ".com" files. A 32-bit version, called COM32, is also
594 provided. A simple API provides access to a limited set of filesystem
595 and console functions.
597 See the file comboot.doc for more information on COMBOOT and COM32
601 ++++ NOVICE PROTECTION ++++
603 SYSLINUX will attempt to detect booting on a machine with too little
604 memory, which means the Linux boot sequence cannot complete. If so, a
605 message is displayed and the boot sequence aborted. Holding down the
606 Ctrl key while booting disables this feature.
608 Any file that SYSLINUX uses can be marked hidden, system or readonly
609 if so is convenient; SYSLINUX ignores all file attributes. The
610 SYSLINUX installed automatically sets the readonly/hidden/system
611 attributes on LDLINUX.SYS.
614 ++++ NOTES ON BOOTABLE CD-ROMS ++++
616 SYSLINUX can be used to create bootdisk images for El
617 Torito-compatible bootable CD-ROMs. However, it appears that many
618 BIOSes are very buggy when it comes to booting CD-ROMs. Some users
619 have reported that the following steps are helpful in making a CD-ROM
620 that is bootable on the largest possible number of machines:
622 a) Use the -s (safe, slow and stupid) option to SYSLINUX;
623 b) Put the boot image as close to the beginning of the
624 ISO 9660 filesystem as possible.
626 A CD-ROM is so much faster than a floppy that the -s option shouldn't
627 matter from a speed perspective.
629 Of course, you probably want to use ISOLINUX instead. See isolinux.doc.
632 ++++ BOOTING FROM A FAT FILESYSTEM PARTITION ON A HARD DISK ++++
634 SYSLINUX can boot from a FAT filesystem partition on a hard disk
635 (including FAT32). The installation procedure is identical to the
636 procedure for installing it on a floppy, and should work under either
637 DOS or Linux. To boot from a partition, SYSLINUX needs to be launched
638 from a Master Boot Record or another boot loader, just like DOS itself
641 Under DOS, you can install a standard simple MBR on the primary hard
642 disk by running the command:
646 Then use the FDISK command to mark the appropriate partition active.
648 A simple MBR, roughly on par with the one installed by DOS (but
649 unencumbered), is included in the SYSLINUX distribution. To install
650 it under Linux, simply type:
652 cat mbr.bin > /dev/XXX
654 ... where /dev/XXX is the device you wish to install it on.
656 Under DOS or Win32, you can install the SYSLINUX MBR with the -m
657 option to the SYSLINUX installer, and use the -a option to mark the
658 current partition active:
662 Note that this will also install SYSLINUX on the specified partition.
665 ++++ HARDWARE INFORMATION +++
667 I have started to maintain a web page of hardware with known
668 problems. There are, unfortunately, lots of broken hardware out
669 there; especially early PXE stacks (for PXELINUX) have lots of
672 A list of problems, and workarounds (if known), is maintained at:
674 http://syslinux.zytor.com/hardware.php
677 ++++ BOOT LOADER IDS USED ++++
679 The Linux boot protocol supports a "boot loader ID", a single byte
680 where the upper nybble specifies a boot loader family (3 = SYSLINUX)
681 and the lower nybble is version or, in the case of SYSLINUX, media:
688 In recent versions of Linux, this ID is available as
689 /proc/sys/kernel/bootloader_type.
692 ++++ BUG REPORTS ++++
694 I would appreciate hearing of any problems you have with SYSLINUX. I
695 would also like to hear from you if you have successfully used SYSLINUX,
696 *especially* if you are using it for a distribution.
698 If you are reporting problems, please include all possible information
699 about your system and your BIOS; the vast majority of all problems
700 reported turn out to be BIOS or hardware bugs, and I need as much
701 information as possible in order to diagnose the problems.
703 There is a mailing list for discussion among SYSLINUX users and for
704 announcements of new and test versions. To join, or to browse the
707 http://www.zytor.com/mailman/listinfo/syslinux
709 Please DO NOT send HTML messages or attachments to the mailing list
710 (including multipart/alternative or similar.) All such messages will