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.)
195 LINUX image - Linux kernel image (default)
196 BOOT image - Bootstrap program (.bs, .bin)
197 BSS image - BSS image (.bss)
198 PXE image - PXE Network Bootstrap Program (.0)
199 FDIMAGE image - Floppy disk image (.img)
200 COMBOOT image - COMBOOT program (.com, .cbt)
201 COM32 image - COM32 program (.c32)
202 CONFIG image - New configuration file
203 Using one of these keywords instead of KERNEL forces the
204 filetype, regardless of the filename.
206 CONFIG means restart the boot loader using a different
210 Append nothing. APPEND with a single hyphen as argument in a
211 LABEL section can be used to override a global APPEND.
213 LOCALBOOT type [ISOLINUX, PXELINUX]
214 On PXELINUX, specifying "LOCALBOOT 0" instead of a "KERNEL"
215 option means invoking this particular label will cause a local
216 disk boot instead of booting a kernel.
218 The argument 0 means perform a normal boot. The argument 4
219 will perform a local boot with the Universal Network Driver
220 Interface (UNDI) driver still resident in memory. Finally,
221 the argument 5 will perform a local boot with the entire PXE
222 stack, including the UNDI driver, still resident in memory.
223 All other values are undefined. If you don't know what the
224 UNDI or PXE stacks are, don't worry -- you don't want them,
227 On ISOLINUX, the "type" specifies the local drive number to
228 boot from; 0x00 is the primary floppy drive and 0x80 is the
229 primary hard drive. The special value -1 causes ISOLINUX to
230 report failure to the BIOS, which, on recent BIOSes, should
231 mean that the next boot device in the boot sequence should be
235 If flag_val is 0, do not load a kernel image unless it has been
236 explicitly named in a LABEL statement. The default is 1.
238 ALLOWOPTIONS flag_val
239 If flag_val is 0, the user is not allowed to specify any
240 arguments on the kernel command line. The only options
241 recognized are those specified in an APPEND statement. The
245 Indicates how long to wait at the boot: prompt until booting
246 automatically, in units of 1/10 s. The timeout is cancelled as
247 soon as the user types anything on the keyboard, the assumption
248 being that the user will complete the command line already
249 begun. A timeout of zero will disable the timeout completely,
250 this is also the default.
253 Indicates how long to wait until booting automatically, in
254 units of 1/10 s. This timeout is *not* cancelled by user
255 input, and can thus be used to deal with serial port glitches
256 or "the user walked away" type situations. A timeout of zero
257 will disable the timeout completely, this is also the default.
259 Both TIMEOUT and TOTALTIMEOUT can be used together, for
262 # Wait 5 seconds unless the user types something, but
263 # always boot after 15 minutes.
267 ONTIMEOUT kernel options...
268 Sets the command line invoked on a timeout. Normally this is
269 the same thing as invoked by "DEFAULT". If this is specified,
270 then "DEFAULT" is used only if the user presses <Enter> to
273 ONERROR kernel options...
274 If a kernel image is not found (either due to it not existing,
275 or because IMPLICIT is set), run the specified command. The
276 faulty command line is appended to the specified options, so
277 if the ONERROR directive reads as:
281 ... and the command line as entered by the user is:
285 ... SYSLINUX will execute the following as if entered by the
288 xyzzy plugh foo bar baz
290 SERIAL port [[baudrate] flowcontrol]
291 Enables a serial port to act as the console. "port" is a
292 number (0 = /dev/ttyS0 = COM1, etc.) or an I/O port address
293 (e.g. 0x3F8); if "baudrate" is omitted, the baud rate defaults
294 to 9600 bps. The serial parameters are hardcoded to be 8
295 bits, no parity, 1 stop bit.
297 "flowcontrol" is a combination of the following bits:
300 0x010 - Wait for CTS assertion
301 0x020 - Wait for DSR assertion
302 0x040 - Wait for RI assertion
303 0x080 - Wait for DCD assertion
304 0x100 - Ignore input unless CTS asserted
305 0x200 - Ignore input unless DSR asserted
306 0x400 - Ignore input unless RI asserted
307 0x800 - Ignore input unless DCD asserted
309 All other bits are reserved.
313 0 - No flow control (default)
314 0x303 - Null modem cable detect
315 0x013 - RTS/CTS flow control
316 0x813 - RTS/CTS flow control, modem input
317 0x023 - DTR/DSR flow control
318 0x083 - DTR/DCD flow control
320 For the SERIAL directive to be guaranteed to work properly, it
321 should be the first directive in the configuration file.
323 NOTE: "port" values from 0 to 3 means the first four serial
324 ports detected by the BIOS. They may or may not correspond to
325 the legacy port values 0x3F8, 0x2F8, 0x3E8, 0x2E8.
328 If flag_val is 0, disable output to the normal video console.
329 If flag_val is 1, enable output to the video console (this is
332 Some BIOSes try to forward this to the serial console and
333 sometimes make a total mess thereof, so this option lets you
334 disable the video console on these systems.
337 Load a font in .psf format before displaying any output
338 (except the copyright line, which is output as ldlinux.sys
339 itself is loaded.) SYSLINUX only loads the font onto the
340 video card; if the .psf file contains a Unicode table it is
341 ignored. This only works on EGA and VGA cards; hopefully it
342 should do nothing on others.
345 Install a simple keyboard map. The keyboard remapper used is
346 *very* simplistic (it simply remaps the keycodes received from
347 the BIOS, which means that only the key combinations relevant
348 in the default layout -- usually U.S. English -- can be
349 mapped) but should at least help people with AZERTY keyboard
350 layout and the locations of = and , (two special characters
351 used heavily on the Linux kernel command line.)
353 The included program keytab-lilo.pl from the LILO distribution
354 can be used to create such keymaps. The file keytab-lilo.doc
355 contains the documentation for this program.
358 Displays the indicated file on the screen at boot time (before
359 the boot: prompt, if displayed). Please see the section below
362 NOTE: If the file is missing, this option is simply ignored.
365 Prints the message on the screen.
368 If flag_val is 0, display the boot: prompt only if the Shift or Alt
369 key is pressed, or Caps Lock or Scroll lock is set (this is the
370 default). If flag_val is 1, always display the boot: prompt.
373 If flag_val is set to 1, ignore the Shift/Alt/Caps Lock/Scroll
374 Lock escapes. Use this (together with PROMPT 0) to force the
375 default boot alternative.
382 Displays the indicated file on the screen when a function key is
383 pressed at the boot: prompt. This can be used to implement
384 pre-boot online help (presumably for the kernel command line
385 options.) Note that F10 MUST be entered in the config file as
386 "F0", not "F10", and that there is currently no way to bind
387 file names to F11 and F12. Please see the section below on
390 When using the serial console, press <Ctrl-F><digit> to get to
391 the help screens, e.g. <Ctrl-F><2> to get to the F2 screen,
392 and <Ctrl-F><0> for the F10 one.
394 Blank lines are ignored.
396 Note that the configuration file is not completely decoded. Syntax
397 different from the one described above may still work correctly in this
398 version of SYSLINUX, but may break in a future one.
401 ++++ DISPLAY FILE FORMAT ++++
403 DISPLAY and function-key help files are text files in either DOS or UNIX
404 format (with or without <CR>). In addition, the following special codes
407 <FF> <FF> = <Ctrl-L> = ASCII 12
408 Clear the screen, home the cursor. Note that the screen is
409 filled with the current display color.
411 <SI><bg><fg> <SI> = <Ctrl-O> = ASCII 15
412 Set the display colors to the specified background and
413 foreground colors, where <bg> and <fg> are hex digits,
414 corresponding to the standard PC display attributes:
416 0 = black 8 = dark grey
417 1 = dark blue 9 = bright blue
418 2 = dark green a = bright green
419 3 = dark cyan b = bright cyan
420 4 = dark red c = bright red
421 5 = dark purple d = bright purple
423 7 = light grey f = white
425 Picking a bright color (8-f) for the background results in the
426 corresponding dark color (0-7), with the foreground flashing.
428 Colors are not visible over the serial console.
430 <CAN>filename<newline> <CAN> = <Ctrl-X> = ASCII 24
431 If a VGA display is present, enter graphics mode and display
432 the graphic included in the specified file. The file format
433 is an ad hoc format called LSS16; the included Perl program
434 "ppmtolss16" can be used to produce these images. This Perl
435 program also includes the file format specification.
437 The image is displayed in 640x480 16-color mode. Once in
438 graphics mode, the display attributes (set by <SI> code
439 sequences) work slightly differently: the background color is
440 ignored, and the foreground colors are the 16 colors specified
441 in the image file. For that reason, ppmtolss16 allows you to
442 specify that certain colors should be assigned to specific
445 Color indicies 0 and 7, in particular, should be chosen with
446 care: 0 is the background color, and 7 is the color used for
447 the text printed by SYSLINUX itself.
449 <EM> <EM> = <Ctrl-Y> = ASCII 25
450 If we are currently in graphics mode, return to text mode.
452 <DLE>..<ETB> <Ctrl-P>..<Ctrl-W> = ASCII 16-23
453 These codes can be used to select which modes to print a
454 certain part of the message file in. Each of these control
455 characters select a specific set of modes (text screen,
456 graphics screen, serial port) for which the output is actually
459 Character Text Graph Serial
460 ------------------------------------------------------
461 <DLE> = <Ctrl-P> = ASCII 16 No No No
462 <DC1> = <Ctrl-Q> = ASCII 17 Yes No No
463 <DC2> = <Ctrl-R> = ASCII 18 No Yes No
464 <DC3> = <Ctrl-S> = ASCII 19 Yes Yes No
465 <DC4> = <Ctrl-T> = ASCII 20 No No Yes
466 <NAK> = <Ctrl-U> = ASCII 21 Yes No Yes
467 <SYN> = <Ctrl-V> = ASCII 22 No Yes Yes
468 <ETB> = <Ctrl-W> = ASCII 23 Yes Yes Yes
472 <DC1>Text mode<DC2>Graphics mode<DC4>Serial port<ETB>
474 ... will actually print out which mode the console is in!
476 <SUB> <SUB> = <Ctrl-Z> = ASCII 26
477 End of file (DOS convention).
479 <BEL> <BEL> = <Ctrl-G> = ASCII 7
483 ++++ COMMAND LINE KEYSTROKES ++++
485 The command line prompt supports the following keystrokes:
487 <Enter> boot specified command line
488 <BackSpace> erase one character
489 <Ctrl-U> erase the whole line
490 <Ctrl-V> display the current SYSLINUX version
491 <Ctrl-W> erase one word
492 <Ctrl-X> force text mode
493 <F1>..<F10> help screens (if configured)
494 <Ctrl-F><digit> equivalent to F1..F10
495 <Ctrl-C> interrupt boot in progress
496 <Esc> interrupt boot in progress
499 ++++ COMBOOT IMAGES AND OTHER OPERATING SYSTEMS ++++
501 This version of SYSLINUX supports chain loading of other operating
502 systems (such as MS-DOS and its derivatives, including Windows 95/98),
503 as well as COMBOOT-style standalone executables (a subset of DOS .COM
504 files; see separate section below.)
506 Chain loading requires the boot sector of the foreign operating system
507 to be stored in a file in the root directory of the filesystem.
508 Because neither Linux kernels, boot sector images, nor COMBOOT files
509 have reliable magic numbers, SYSLINUX will look at the file extension.
510 The following extensions are recognized (case insensitive):
512 none or other Linux kernel image
513 .0 PXE bootstrap program (NBP) [PXELINUX only]
514 .bin "CD boot sector" [ISOLINUX only]
515 .bs Boot sector [SYSLINUX only]
516 .bss Boot sector, DOS superblock will be patched in [SYSLINUX only]
517 .c32 COM32 image (32-bit COMBOOT)
518 .cbt COMBOOT image (not runnable from DOS)
519 .com COMBOOT image (runnable from DOS)
520 .img Disk image [ISOLINUX only]
522 For filenames given on the command line, SYSLINUX will search for the
523 file by adding extensions in the order listed above if the plain
524 filename is not found. Filenames in KERNEL statements must be fully
527 If this is specified with one of the keywords LINUX, BOOT, BSS,
528 FDIMAGE, COMBOOT, COM32, or CONFIG instead of KERNEL, the filetype is
529 considered to be the one specified regardless of the filename.
532 ++++ BOOTING DOS (OR OTHER SIMILAR OPERATING SYSTEMS) ++++
534 This section applies to SYSLINUX only, not to PXELINUX or ISOLINUX.
535 See isolinux.doc for an equivalent procedure for ISOLINUX.
537 This is the recommended procedure for creating a SYSLINUX disk that
538 can boot either DOS or Linux. This example assumes the drive is A: in
539 DOS and /dev/fd0 in Linux; for other drives, substitute the
540 appropriate drive designator.
542 ---- Linux procedure ----
544 1. Make a DOS bootable disk. This can be done either by specifying
545 the /s option when formatting the disk in DOS, or by running the
546 DOS command SYS (this can be done under DOSEMU if DOSEMU has
547 direct device access to the relevant drive):
553 2. Boot Linux. Copy the DOS boot sector from the disk into a file:
555 dd if=/dev/fd0 of=dos.bss bs=512 count=1
557 3. Run SYSLINUX on the disk:
561 4. Mount the disk and copy the DOS boot sector file to it. The file
562 *must* have extension .bss:
564 mount -t msdos /dev/fd0 /mnt
567 5. Copy the Linux kernel image(s), initrd(s), etc to the disk, and
568 create/edit syslinux.cfg and help files if desired:
573 6. Unmount the disk (if applicable.)
577 ---- DOS/Windows procedure ----
579 To make this installation in DOS only, you need the utility copybs.com
580 (included with SYSLINUX) as well as the syslinux.com installer. If
581 you are on an WinNT-based system (WinNT, Win2k, WinXP or later), use
582 syslinux.exe instead.
584 1. Make a DOS bootable disk. This can be done either by specifying
585 the /s option when formatting the disk in DOS, or by running the
592 2. Copy the DOS boot sector from the disk into a file. The file
593 *must* have extension .bss:
597 3. Run SYSLINUX on the disk:
601 4. Copy the Linux kernel image(s), initrd(s), etc to the disk, and
602 create/edit syslinux.cfg and help files if desired:
608 ++++ COMBOOT EXECUTABLES ++++
610 SYSLINUX supports simple standalone programs, using a file format
611 similar to DOS ".com" files. A 32-bit version, called COM32, is also
612 provided. A simple API provides access to a limited set of filesystem
613 and console functions.
615 See the file comboot.doc for more information on COMBOOT and COM32
619 ++++ NOVICE PROTECTION ++++
621 SYSLINUX will attempt to detect booting on a machine with too little
622 memory, which means the Linux boot sequence cannot complete. If so, a
623 message is displayed and the boot sequence aborted. Holding down the
624 Ctrl key while booting disables this feature.
626 Any file that SYSLINUX uses can be marked hidden, system or readonly
627 if so is convenient; SYSLINUX ignores all file attributes. The
628 SYSLINUX installed automatically sets the readonly/hidden/system
629 attributes on LDLINUX.SYS.
632 ++++ NOTES ON BOOTABLE CD-ROMS ++++
634 SYSLINUX can be used to create bootdisk images for El
635 Torito-compatible bootable CD-ROMs. However, it appears that many
636 BIOSes are very buggy when it comes to booting CD-ROMs. Some users
637 have reported that the following steps are helpful in making a CD-ROM
638 that is bootable on the largest possible number of machines:
640 a) Use the -s (safe, slow and stupid) option to SYSLINUX;
641 b) Put the boot image as close to the beginning of the
642 ISO 9660 filesystem as possible.
644 A CD-ROM is so much faster than a floppy that the -s option shouldn't
645 matter from a speed perspective.
647 Of course, you probably want to use ISOLINUX instead. See isolinux.doc.
650 ++++ BOOTING FROM A FAT FILESYSTEM PARTITION ON A HARD DISK ++++
652 SYSLINUX can boot from a FAT filesystem partition on a hard disk
653 (including FAT32). The installation procedure is identical to the
654 procedure for installing it on a floppy, and should work under either
655 DOS or Linux. To boot from a partition, SYSLINUX needs to be launched
656 from a Master Boot Record or another boot loader, just like DOS itself
659 Under DOS, you can install a standard simple MBR on the primary hard
660 disk by running the command:
664 Then use the FDISK command to mark the appropriate partition active.
666 A simple MBR, roughly on par with the one installed by DOS (but
667 unencumbered), is included in the SYSLINUX distribution. To install
668 it under Linux, simply type:
670 cat mbr.bin > /dev/XXX
672 ... where /dev/XXX is the device you wish to install it on.
674 Under DOS or Win32, you can install the SYSLINUX MBR with the -m
675 option to the SYSLINUX installer, and use the -a option to mark the
676 current partition active:
680 Note that this will also install SYSLINUX on the specified partition.
683 ++++ HARDWARE INFORMATION +++
685 I have started to maintain a web page of hardware with known
686 problems. There are, unfortunately, lots of broken hardware out
687 there; especially early PXE stacks (for PXELINUX) have lots of
690 A list of problems, and workarounds (if known), is maintained at:
692 http://syslinux.zytor.com/hardware.php
695 ++++ BOOT LOADER IDS USED ++++
697 The Linux boot protocol supports a "boot loader ID", a single byte
698 where the upper nybble specifies a boot loader family (3 = SYSLINUX)
699 and the lower nybble is version or, in the case of SYSLINUX, media:
706 In recent versions of Linux, this ID is available as
707 /proc/sys/kernel/bootloader_type.
710 ++++ BUG REPORTS ++++
712 I would appreciate hearing of any problems you have with SYSLINUX. I
713 would also like to hear from you if you have successfully used SYSLINUX,
714 *especially* if you are using it for a distribution.
716 If you are reporting problems, please include all possible information
717 about your system and your BIOS; the vast majority of all problems
718 reported turn out to be BIOS or hardware bugs, and I need as much
719 information as possible in order to diagnose the problems.
721 There is a mailing list for discussion among SYSLINUX users and for
722 announcements of new and test versions. To join, or to browse the
725 http://www.zytor.com/mailman/listinfo/syslinux
727 Please DO NOT send HTML messages or attachments to the mailing list
728 (including multipart/alternative or similar.) All such messages will