3 A bootloader for Linux using MS-DOS floppies
5 Copyright (C) 1994-2003 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 SYSLINUX is a boot loader for the Linux operating system which
19 operates off an MS-DOS/Windows FAT filesystem. It is intended to
20 simplify first-time installation of Linux, and for creation of rescue-
21 and other special-purpose boot disks.
23 SYSLINUX can be used, when properly set up, completely eliminate the
24 need for distribution of raw diskette images for boot floppies. A
25 SYSLINUX floppy can be manipulated using standard MS-DOS (or any other
26 OS that can access an MS-DOS filesystem) tools once it has been
30 ++++ WHAT SYSLINUX IS NOT ++++
32 SYSLINUX is probably not suitable as a general purpose boot loader.
33 It can only boot Linux from a FAT filesystem, and not, for example,
34 ext2. Since a native Linux implementation will typically use ext2,
35 another boot loader (e.g. LILO) is probably more suitable. In a
36 system which actually contains DOS or Windows, LOADLIN may be simpler
39 However, SYSLINUX has shown itself to be quite useful in a number of
40 special-purpose applications.
43 ++++ CREATING A BOOTABLE LINUX FLOPPY +++
45 In order to create a bootable Linux floppy using SYSLINUX, prepare a
46 normal MS-DOS formatted floppy. Copy one or more Linux kernel files to
47 it, then execute the DOS command:
51 (or whichever drive letter is appropriate; the [] meaning -s is optional)
53 If you're running in a Win95/98/ME DOS box, you should execute the
54 command "lock a:" first. If you're running in a WinNT/2K DOS box, you
55 will probably get a dialog box about not getting exclusive access and
56 with Abort/Retry/Ignore buttons; people have reported that selecting
57 "Ignore" makes the command complete correctly.
59 Under Linux, execute the command:
61 syslinux [-s] [-o offset] /dev/fd0
63 (or, again, whichever device is the correct one.)
65 This will alter the boot sector on the disk and copy a file named
66 LDLINUX.SYS into its root directory.
68 The -s option, if given, will install a "safe, slow and stupid"
69 version of SYSLINUX. This version may work on some very buggy BIOSes
70 on which SYSLINUX would otherwise fail. If you find a machine on
71 which the -s option is required to make it boot reliably, please send
72 as much info about your machine as you can, and include the failure
75 The -o option is used with a disk image file and specifies the byte
76 offset of the filesystem image in the file.
78 On boot time, by default, the kernel will be loaded from the image named
79 LINUX on the boot floppy. This default can be changed, see the section
80 on the SYSLINUX config file.
82 If the Shift or Alt keys are held down during boot, or the Caps or Scroll
83 locks are set, SYSLINUX will display a LILO-style "boot:" prompt. The
84 user can then type a kernel file name followed by any kernel parameters.
85 The SYSLINUX loader does not need to know about the kernel file in
86 advance; all that is required is that it is a file located in the root
87 directory on the disk.
90 ++++ CONFIGURATION FILE ++++
92 All the configurable defaults in SYSLINUX can be changed by putting a
93 file called SYSLINUX.CFG in the root directory of the boot floppy. This
94 is a text file in either UNIX or DOS format, containing one or more of
95 the following items (case is insensitive for keywords; upper case is used
96 here to indicate that a word should be typed verbatim):
98 All options here applies to PXELINUX as well as SYSLINUX unless
99 otherwise noted. See pxelinux.doc for additional information on
103 A comment line. The whitespace after the hash mark is mandatory.
105 DEFAULT kernel options...
106 Sets the default command line. If SYSLINUX boots automatically,
107 it will act just as if the entries after DEFAULT had been typed
108 in at the "boot:" prompt.
110 If no configuration file is present, or no DEFAULT entry is
111 present in the config file, the default is "linux auto".
113 NOTE: Earlier versions of SYSLINUX used to automatically
114 append the string "auto" to whatever the user specified using
115 the DEFAULT command. As of version 1.54, this is no longer
116 true, as it caused problems when using a shell as a substitute
117 for "init." You may want to include this option manually.
120 Add one or more options to the kernel command line. These are
121 added both for automatic and manual boots. The options are
122 added at the very beginning of the kernel command line,
123 usually permitting explicitly entered kernel options to override
124 them. This is the equivalent of the LILO "append" option.
126 IPAPPEND flag_val [PXELINUX only]
127 The IPAPPEND option is available only on PXELINUX. The
128 flag_val is an OR of the following options:
130 1: indicates that an option of the following format
131 should be generated and added to the kernel command line:
133 ip=<client-ip>:<boot-server-ip>:<gw-ip>:<netmask>
135 ... based on the input from the DHCP/BOOTP or PXE boot server.
137 THE USE OF THIS OPTION IS NOT RECOMMENDED. If you have to use
138 it, it is probably an indication that your network configuration
139 is broken. Using just "ip=dhcp" on the kernel command line
140 is a preferrable option, or, better yet, run dhcpcd/dhclient,
141 from an initrd if necessary.
143 2: indicates that an option of the following format
144 should be generated and added to the kernel command line:
146 BOOTIF=<hardware-address-of-boot-interface>
148 ... in dash-separated hexadecimal with leading hardware type
149 (same as for the configuration file; see pxelinux.doc.)
151 This allows an initrd program to determine from which
152 interface the system booted.
157 IPAPPEND flag_val [PXELINUX only]
158 Indicates that if "label" is entered as the kernel to boot,
159 SYSLINUX should instead boot "image", and the specified APPEND
160 and IPAPPEND options should be used instead of the ones
161 specified in the global section of the file (before the first
162 LABEL command.) The default for "image" is the same as
163 "label", and if no APPEND is given the default is to use the
164 global entry (if any). Up to 64 LABEL entries are permitted
165 (for SYSLINUX, 128 LABEL entries.)
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.
182 The "kernel" doesn't have to be a Linux kernel; it can
183 be a boot sector or a COMBOOT file (see below.)
186 Append nothing. APPEND with a single hyphen as argument in a
187 LABEL section can be used to override a global APPEND.
189 LOCALBOOT type [ISOLINUX, PXELINUX]
190 On PXELINUX, specifying "LOCALBOOT 0" instead of a "KERNEL"
191 option means invoking this particular label will cause a local
192 disk boot instead of booting a kernel.
194 The argument 0 means perform a normal boot. The argument 4
195 will perform a local boot with the Universal Network Driver
196 Interface (UNDI) driver still resident in memory. Finally,
197 the argument 5 will perform a local boot with the entire PXE
198 stack, including the UNDI driver, still resident in memory.
199 All other values are undefined. If you don't know what the
200 UNDI or PXE stacks are, don't worry -- you don't want them,
203 On ISOLINUX, the "type" specifies the local drive number to
204 boot from; 0x00 is the primary floppy drive and 0x80 is the
205 primary hard drive. The special value -1 causes ISOLINUX to
206 report failure to the BIOS, which, on recent BIOSes, should
207 mean that the next boot device in the boot sequence should be
211 If flag_val is 0, do not load a kernel image unless it has been
212 explicitly named in a LABEL statement. The default is 1.
215 Indicates how long to wait at the boot: prompt until booting
216 automatically, in units of 1/10 s. The timeout is cancelled as
217 soon as the user types anything on the keyboard, the assumption
218 being that the user will complete the command line already
219 begun. A timeout of zero will disable the timeout completely,
220 this is also the default.
222 NOTE: The maximum possible timeout value is 35996; corresponding to
225 ONTIMEOUT kernel options...
226 Sets the command line invoked on a timeout. Normally this is
227 the same thing as invoked by "DEFAULT". If this is specified,
228 then "DEFAULT" is used only if the user presses <Enter> to
231 ONERROR kernel options...
232 If a kernel image is not found (either due to it not existing,
233 or because IMPLICIT is set), run the specified command. The
234 faulty command line is appended to the specified options, so
235 if the ONERROR directive reads as:
239 ... and the command line as entered by the user is:
243 ... SYSLINUX will execute the following as if entered by the
246 xyzzy plugh foo bar baz
248 SERIAL port [[baudrate] flowcontrol]
249 Enables a serial port to act as the console. "port" is a
250 number (0 = /dev/ttyS0 = COM1, etc.) or an I/O port address
251 (e.g. 0x3F8); if "baudrate" is omitted, the baud rate defaults
252 to 9600 bps. The serial parameters are hardcoded to be 8
253 bits, no parity, 1 stop bit.
255 "flowcontrol" is a combination of the following bits:
258 0x010 - Wait for CTS assertion
259 0x020 - Wait for DSR assertion
260 0x040 - Wait for RI assertion
261 0x080 - Wait for DCD assertion
262 0x100 - Ignore input unless CTS asserted
263 0x200 - Ignore input unless DSR asserted
264 0x400 - Ignore input unless RI asserted
265 0x800 - Ignore input unless DCD asserted
267 All other bits are reserved.
271 0 - No flow control (default)
272 0x303 - Null modem cable detect
273 0x013 - RTS/CTS flow control
274 0x813 - RTS/CTS flow control, modem input
275 0x023 - DTR/DSR flow control
276 0x083 - DTR/DCD flow control
278 For the SERIAL directive to be guaranteed to work properly, it
279 should be the first directive in the configuration file.
281 NOTE: "port" values from 0 to 3 means the first four serial
282 ports detected by the BIOS. They may or may not correspond to
283 the legacy port values 0x3F8, 0x2F8, 0x3E8, 0x2E8.
286 Load a font in .psf format before displaying any output
287 (except the copyright line, which is output as ldlinux.sys
288 itself is loaded.) SYSLINUX only loads the font onto the
289 video card; if the .psf file contains a Unicode table it is
290 ignored. This only works on EGA and VGA cards; hopefully it
291 should do nothing on others.
294 Install a simple keyboard map. The keyboard remapper used is
295 *very* simplistic (it simply remaps the keycodes received from
296 the BIOS, which means that only the key combinations relevant
297 in the default layout -- usually U.S. English -- can be
298 mapped) but should at least help people with AZERTY keyboard
299 layout and the locations of = and , (two special characters
300 used heavily on the Linux kernel command line.)
302 The included program keytab-lilo.pl from the LILO distribution
303 can be used to create such keymaps. The file keytab-lilo.doc
304 contains the documentation for this program.
307 Displays the indicated file on the screen at boot time (before
308 the boot: prompt, if displayed). Please see the section below
311 NOTE: If the file is missing, this option is simply ignored.
314 Prints the message on the screen.
317 If flag_val is 0, display the boot: prompt only if the Shift or Alt
318 key is pressed, or Caps Lock or Scroll lock is set (this is the
319 default). If flag_val is 1, always display the boot: prompt.
326 Displays the indicated file on the screen when a function key is
327 pressed at the boot: prompt. This can be used to implement
328 pre-boot online help (presumably for the kernel command line
329 options.) Note that F10 MUST be entered in the config file as
330 "F0", not "F10", and that there is currently no way to bind
331 file names to F11 and F12. Please see the section below on
334 When using the serial console, press <Ctrl-F><digit> to get to
335 the help screens, e.g. <Ctrl-F><2> to get to the F2 screen,
336 and <Ctrl-F><0> for the F10 one.
338 Blank lines are ignored.
340 Note that the configuration file is not completely decoded. Syntax
341 different from the one described above may still work correctly in this
342 version of SYSLINUX, but may break in a future one.
345 ++++ LARGE KERNELS AND INITIAL RAMDISK SUPPORT ++++
347 This version of SYSLINUX supports large kernels (bzImage format),
348 eliminating the 500K size limit of the zImage kernel format. bzImage
349 format kernels are detected automatically and handled transparently to
352 This version of SYSLINUX also supports a boot-time-loaded ramdisk
353 (initrd). An initrd is loaded from a DOS file if the option
354 "initrd=filename" (where filename is the filename of the initrd image;
355 the file must be located in the root directory on the boot floppy) is
356 present on the processed command line (after APPEND's have been added,
357 etc.). If several initrd options are present, the last one has
358 precedence; this permits user-entered options to override a config
359 file APPEND. Specifying "initrd=" without a filename inhibits initrd
360 loading. The file specified by the initrd= option will typically be a
361 gzipped filesystem image.
363 NOTE: One of the main advantages with SYSLINUX is that it makes it
364 very easy to support users with new or unexpected configurations,
365 especially in a distribution setting. If initrd is used to
366 extensively modularize the distribution kernel, it is strongly
367 recommended that a simple way of adding drivers to the boot floppy be
368 provided. The suggested manner is to let the initrd system mount the
369 boot floppy and look for additional drivers in a predetermined
372 To bzImage and recent zImage kernels, SYSLINUX 1.30 and higher will
373 identify using the ID byte 0x31. PXELINUX identifies using the ID
374 byte 0x32, and ISOLINUX 0x33. The ID range 0x34-0x3f is reserved for
375 future versions or derivatives of SYSLINUX.
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).
457 ++++ COMBOOT IMAGES AND OTHER OPERATING SYSTEMS ++++
459 This version of SYSLINUX supports chain loading of other operating
460 systems (such as MS-DOS and its derivatives, including Windows 95/98),
461 as well as COMBOOT-style standalone executables (a subset of DOS .COM
462 files; see separate section below.)
464 Chain loading requires the boot sector of the foreign operating system
465 to be stored in a file in the root directory of the filesystem.
466 Because neither Linux kernels, boot sector images, nor COMBOOT files
467 have reliable magic numbers, SYSLINUX will look at the file extension.
468 The following extensions are recognized (case insensitive):
470 none or other Linux kernel image
471 .0 PXE bootstrap program (NBP) [PXELINUX only]
472 .bin "CD boot sector" [ISOLINUX only]
473 .bs Boot sector [SYSLINUX only]
474 .bss Boot sector, DOS superblock will be patched in [SYSLINUX only]
475 .c32 COM32 image (32-bit COMBOOT)
476 .cbt COMBOOT image (not runnable from DOS)
477 .com COMBOOT image (runnable from DOS)
478 .img Disk image [ISOLINUX only]
480 For filenames given on the command line, SYSLINUX will search for the
481 file by adding extensions in the order listed above if the plain
482 filename is not found. Filenames in KERNEL statements must be fully
486 ++++ BOOTING DOS (OR OTHER SIMILAR OPERATING SYSTEMS) ++++
488 This section applies to SYSLINUX only, not to PXELINUX or ISOLINUX.
489 See isolinux.doc for an equivalent procedure for ISOLINUX.
491 This is the recommended procedure for creating a SYSLINUX disk that
492 can boot either DOS or Linux. This example assumes the drive is A: in
493 DOS and /dev/fd0 in Linux; for other drives, substitute the
494 appropriate drive designator.
496 ---- Linux procedure ----
498 1. Make a DOS bootable disk. This can be done either by specifying
499 the /s option when formatting the disk in DOS, or by running the
500 DOS command SYS (this can be done under DOSEMU if DOSEMU has
501 direct device access to the relevant drive):
507 2. Boot Linux. Copy the DOS boot sector from the disk into a file:
509 dd if=/dev/fd0 of=dos.bss bs=512 count=1
511 3. Run SYSLINUX on the disk:
515 4. Mount the disk and copy the DOS boot sector file to it. The file
516 *must* have extension .bss:
518 mount -t msdos /dev/fd0 /mnt
521 5. Copy the Linux kernel image(s), initrd(s), etc to the disk, and
522 create/edit syslinux.cfg and help files if desired:
527 6. Unmount the disk (if applicable.)
531 ---- DOS/Windows procedure ----
533 To make this installation in DOS only, you need the utility copybs.com
534 (included with SYSLINUX) as well as the syslinux.com installer. If
535 you are on an WinNT-based system (WinNT, Win2k, WinXP or later), use
536 syslinux.exe instead.
538 1. Make a DOS bootable disk. This can be done either by specifying
539 the /s option when formatting the disk in DOS, or by running the
546 2. Copy the DOS boot sector from the disk into a file. The file
547 *must* have extension .bss:
551 3. Run SYSLINUX on the disk:
555 4. Copy the Linux kernel image(s), initrd(s), etc to the disk, and
556 create/edit syslinux.cfg and help files if desired:
562 ++++ COMBOOT EXECUTABLES ++++
564 SYSLINUX supports simple standalone programs, using a file format
565 similar to DOS ".com" files. A 32-bit version, called COM32, is also
566 provided. A simple API provides access to a limited set of filesystem
567 and console functions.
569 See the file comboot.doc for more information on COMBOOT and COM32
573 ++++ NOVICE PROTECTION ++++
575 SYSLINUX will attempt to detect if the user is trying to boot on a 286
576 or lower class machine, or a machine with less than 608K of low ("DOS")
577 RAM (which means the Linux boot sequence cannot complete). If so, a
578 message is displayed and the boot sequence aborted. Holding down the
579 Ctrl key while booting disables this feature.
581 The compile time and date of a specific SYSLINUX version can be obtained
582 by the DOS command "type ldlinux.sys". This is also used as the
583 signature for the LDLINUX.SYS file, which must match the boot sector.
585 Any file that SYSLINUX uses can be marked hidden, system or readonly if
586 so is convenient; SYSLINUX ignores all file attributes. The SYSLINUX
587 installed automatically sets the readonly attribute on LDLINUX.SYS.
590 ++++ NOTES ON BOOTABLE CD-ROMS ++++
592 SYSLINUX can be used to create bootdisk images for El
593 Torito-compatible bootable CD-ROMs. However, it appears that many
594 BIOSes are very buggy when it comes to booting CD-ROMs. Some users
595 have reported that the following steps are helpful in making a CD-ROM
596 that is bootable on the largest possible number of machines:
598 a) Use the -s (safe, slow and stupid) option to SYSLINUX;
599 b) Put the boot image as close to the beginning of the
600 ISO 9660 filesystem as possible.
602 A CD-ROM is so much faster than a floppy that the -s option shouldn't
603 matter from a speed perspective.
605 Of course, you may want to use ISOLINUX instead. See isolinux.doc.
608 ++++ BOOTING FROM A FAT FILESYSTEM PARTITION ON A HARD DISK ++++
610 SYSLINUX can boot from a FAT12 or FAT16 filesystem partition on a hard
611 disk (FAT32, introduced in Windows 95 OSR-2, is not supported,
612 however.) The installation procedure is identical to the procedure
613 for installing it on a floppy, and should work under either DOS or
614 Linux. To boot from a partition, SYSLINUX needs to be launched from a
615 Master Boot Record or another boot loader, just like DOS itself would.
617 Under DOS, you can install a standard simple MBR on the primary hard
618 disk by running the command:
622 Then use the FDISK command to mark the appropriate partition active.
624 A simple MBR, roughly on par with the one installed by DOS (but
625 unencumbered), is included in the SYSLINUX distribution
630 SYSLINUX is unsafe to use on any filesystem that extends past cylinder
631 1024. This is a fundamental limitation of the standard BIOS API. The
632 "extended" BIOS API can *sometimes* be used to work around it, but
633 there simply is not enough space in the SYSLINUX boot sector to
636 SYSLINUX will not work (and will refuse to install) on filesystems
637 with a cluster size of more than 16K (typically means a filesystem of
641 ++++ HARDWARE INFORMATION +++
643 I have started to maintain a web page of hardware with known
644 problems. There are, unfortunately, lots of broken hardware out
645 there; especially early PXE stacks (for PXELINUX) have lots of
648 A list of problems, and workarounds (if known), is maintained at:
650 http://syslinux.zytor.com/hardware.php
653 ++++ BUG REPORTS ++++
655 I would appreciate hearing of any problems you have with SYSLINUX. I
656 would also like to hear from you if you have successfully used SYSLINUX,
657 *especially* if you are using it for a distribution.
659 If you are reporting problems, please include all possible information
660 about your system and your BIOS; the vast majority of all problems
661 reported turn out to be BIOS or hardware bugs, and I need as much
662 information as possible in order to diagnose the problems.
664 There is a mailing list for discussion among SYSLINUX users and for
665 announcements of new and test versions. To join, or to browse the
668 http://www.zytor.com/mailman/listinfo/syslinux
670 Please DO NOT send HTML messages or attachments to the mailing list
671 (including multipart/alternative or similar.) All such messages will