1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
|
SYSLINUX
A bootloader for Linux using MS-DOS floppies
Copyright (C) 1994-2003 H. Peter Anvin
This program is provided under the terms of the GNU General Public
License, version 2 or, at your option, any later version. There is no
warranty, neither expressed nor implied, to the function of this
program. Please see the included file COPYING for details.
----------------------------------------------------------------------
SYSLINUX now has a home page at http://syslinux.zytor.com/
----------------------------------------------------------------------
SYSLINUX is a boot loader for the Linux operating system which
operates off an MS-DOS/Windows FAT filesystem. It is intended to
simplify first-time installation of Linux, and for creation of rescue-
and other special-purpose boot disks.
SYSLINUX can be used, when properly set up, completely eliminate the
need for distribution of raw diskette images for boot floppies. A
SYSLINUX floppy can be manipulated using standard MS-DOS (or any other
OS that can access an MS-DOS filesystem) tools once it has been
created.
++++ WHAT SYSLINUX IS NOT ++++
SYSLINUX is probably not suitable as a general purpose boot loader.
It can only boot Linux from a FAT filesystem, and not, for example,
ext2. Since a native Linux implementation will typically use ext2,
another boot loader (e.g. LILO) is probably more suitable. In a
system which actually contains DOS or Windows, LOADLIN may be simpler
to use.
However, SYSLINUX has shown itself to be quite useful in a number of
special-purpose applications.
++++ CREATING A BOOTABLE LINUX FLOPPY +++
In order to create a bootable Linux floppy using SYSLINUX, prepare a
normal MS-DOS formatted floppy. Copy one or more Linux kernel files to
it, then execute the DOS command:
syslinux [-s] a:
(or whichever drive letter is appropriate; the [] meaning -s is optional)
If you're running in a Win95/98/ME DOS box, you should execute the
command "lock a:" first. If you're running in a WinNT/2K DOS box, you
will probably get a dialog box about not getting exclusive access and
with Abort/Retry/Ignore buttons; people have reported that selecting
"Ignore" makes the command complete correctly.
Under Linux, execute the command:
syslinux [-s] [-o offset] /dev/fd0
(or, again, whichever device is the correct one.)
This will alter the boot sector on the disk and copy a file named
LDLINUX.SYS into its root directory.
The -s option, if given, will install a "safe, slow and stupid"
version of SYSLINUX. This version may work on some very buggy BIOSes
on which SYSLINUX would otherwise fail. If you find a machine on
which the -s option is required to make it boot reliably, please send
as much info about your machine as you can, and include the failure
mode.
The -o option is used with a disk image file and specifies the byte
offset of the filesystem image in the file.
On boot time, by default, the kernel will be loaded from the image named
LINUX on the boot floppy. This default can be changed, see the section
on the SYSLINUX config file.
If the Shift or Alt keys are held down during boot, or the Caps or Scroll
locks are set, SYSLINUX will display a LILO-style "boot:" prompt. The
user can then type a kernel file name followed by any kernel parameters.
The SYSLINUX loader does not need to know about the kernel file in
advance; all that is required is that it is a file located in the root
directory on the disk.
++++ CONFIGURATION FILE ++++
All the configurable defaults in SYSLINUX can be changed by putting a
file called SYSLINUX.CFG in the root directory of the boot floppy. This
is a text file in either UNIX or DOS format, containing one or more of
the following items (case is insensitive for keywords; upper case is used
here to indicate that a word should be typed verbatim):
All options here applies to PXELINUX as well as SYSLINUX unless
otherwise noted. See pxelinux.doc for additional information on
PXELINUX.
# comment
A comment line. The whitespace after the hash mark is mandatory.
DEFAULT kernel options...
Sets the default command line. If SYSLINUX boots automatically,
it will act just as if the entries after DEFAULT had been typed
in at the "boot:" prompt.
If no configuration file is present, or no DEFAULT entry is
present in the config file, the default is "linux auto".
NOTE: Earlier versions of SYSLINUX used to automatically
append the string "auto" to whatever the user specified using
the DEFAULT command. As of version 1.54, this is no longer
true, as it caused problems when using a shell as a substitute
for "init." You may want to include this option manually.
APPEND options...
Add one or more options to the kernel command line. These are
added both for automatic and manual boots. The options are
added at the very beginning of the kernel command line,
usually permitting explicitly entered kernel options to override
them. This is the equivalent of the LILO "append" option.
IPAPPEND flag_val [PXELINUX only]
The IPAPPEND option is available only on PXELINUX, and
indicates (if the flag value is 1) that an option of the
following format should be generated and added:
ip=<client-ip>:<boot-server-ip>:<gw-ip>:<netmask>
... based on the input from the DHCP/BOOTP or PXE boot server.
LABEL label
KERNEL image
APPEND options...
IPAPPEND flag_val [PXELINUX only]
Indicates that if "label" is entered as the kernel to boot,
SYSLINUX should instead boot "image", and the specified APPEND
and IPAPPEND options should be used instead of the ones
specified in the global section of the file (before the first
LABEL command.) The default for "image" is the same as
"label", and if no APPEND is given the default is to use the
global entry (if any). Up to 128 LABEL entries are permitted
(for ISOLINUX, 64 LABEL entries.)
Note that LILO uses the syntax:
image = mykernel
label = mylabel
append = "myoptions"
... whereas SYSLINUX uses the syntax:
label mylabel
kernel mykernel
append myoptions
Notes: Labels are mangled as if they were filenames, and must be
unique after mangling. For example, two labels
"v2.1.30" and "v2.1.31" will not be distinguishable
under SYSLINUX, since both mangle to the same DOS filename.
The "kernel" doesn't have to be a Linux kernel; it can
be a boot sector or a COMBOOT file (see below.)
APPEND -
Append nothing. APPEND with a single hyphen as argument in a
LABEL section can be used to override a global APPEND.
LOCALBOOT type [ISOLINUX, PXELINUX]
On PXELINUX, specifying "LOCALBOOT 0" instead of a "KERNEL"
option means invoking this particular label will cause a local
disk boot instead of booting a kernel.
The argument 0 means perform a normal boot. The argument 4
will perform a local boot with the Universal Network Driver
Interface (UNDI) driver still resident in memory. Finally,
the argument 5 will perform a local boot with the entire PXE
stack, including the UNDI driver, still resident in memory.
All other values are undefined. If you don't know what the
UNDI or PXE stacks are, don't worry -- you don't want them,
just specify 0.
On ISOLINUX, the "type" specifies the local drive number to
boot from; 0x00 is the primary floppy drive and 0x80 is the
primary hard drive. The special value -1 causes ISOLINUX to
report failure to the BIOS, which, on recent BIOSes, should
mean that the next boot device in the boot sequence should be
activated.
IMPLICIT flag_val
If flag_val is 0, do not load a kernel image unless it has been
explicitly named in a LABEL statement. The default is 1.
TIMEOUT timeout
Indicates how long to wait at the boot: prompt until booting
automatically, in units of 1/10 s. The timeout is cancelled as
soon as the user types anything on the keyboard, the assumption
being that the user will complete the command line already
begun. A timeout of zero will disable the timeout completely,
this is also the default.
NOTE: The maximum possible timeout value is 35996; corresponding to
just below one hour.
SERIAL port [[baudrate] flowcontrol]
Enables a serial port to act as the console. "port" is a
number (0 = /dev/ttyS0 = COM1, etc.) or an I/O port address
(e.g. 0x3F8); if "baudrate" is omitted, the baud rate defaults
to 9600 bps. The serial parameters are hardcoded to be 8
bits, no parity, 1 stop bit.
"flowcontrol" is a combination of the following bits:
0x001 - Assert DTR
0x002 - Assert RTS
0x010 - Wait for CTS assertion
0x020 - Wait for DSR assertion
0x040 - Wait for RI assertion
0x080 - Wait for DCD assertion
0x100 - Ignore input unless CTS asserted
0x200 - Ignore input unless DSR asserted
0x400 - Ignore input unless RI asserted
0x800 - Ignore input unless DCD asserted
All other bits are reserved.
Typical values are:
0 - No flow control (default)
0x303 - Null modem cable detect
0x013 - RTS/CTS flow control
0x813 - RTS/CTS flow control, modem input
0x023 - DTR/DSR flow control
0x083 - DTR/DCD flow control
For the SERIAL directive to be guaranteed to work properly, it
should be the first directive in the configuration file.
NOTE: "port" values from 0 to 3 means the first four serial
ports detected by the BIOS. They may or may not correspond to
the legacy port values 0x3F8, 0x2F8, 0x3E8, 0x2E8.
FONT filename
Load a font in .psf format before displaying any output
(except the copyright line, which is output as ldlinux.sys
itself is loaded.) SYSLINUX only loads the font onto the
video card; if the .psf file contains a Unicode table it is
ignored. This only works on EGA and VGA cards; hopefully it
should do nothing on others.
KBDMAP keymap
Install a simple keyboard map. The keyboard remapper used is
*very* simplistic (it simply remaps the keycodes received from
the BIOS, which means that only the key combinations relevant
in the default layout -- usually U.S. English -- can be
mapped) but should at least help people with AZERTY keyboard
layout and the locations of = and , (two special characters
used heavily on the Linux kernel command line.)
The included program keytab-lilo.pl from the LILO distribution
can be used to create such keymaps. The file keytab-lilo.doc
contains the documentation for this program.
DISPLAY filename
Displays the indicated file on the screen at boot time (before
the boot: prompt, if displayed). Please see the section below
on DISPLAY files.
NOTE: If the file is missing, this option is simply ignored.
SAY message
Prints the message on the screen.
PROMPT flag_val
If flag_val is 0, display the boot: prompt only if the Shift or Alt
key is pressed, or Caps Lock or Scroll lock is set (this is the
default). If flag_val is 1, always display the boot: prompt.
F1 filename
F2 filename
...etc...
F9 filename
F0 filename
Displays the indicated file on the screen when a function key is
pressed at the boot: prompt. This can be used to implement
pre-boot online help (presumably for the kernel command line
options.) Note that F10 MUST be entered in the config file as
"F0", not "F10", and that there is currently no way to bind
file names to F11 and F12. Please see the section below on
DISPLAY files.
When using the serial console, press <Ctrl-F><digit> to get to
the help screens, e.g. <Ctrl-F><2> to get to the F2 screen,
and <Ctrl-F><0> for the F10 one.
Blank lines are ignored.
Note that the configuration file is not completely decoded. Syntax
different from the one described above may still work correctly in this
version of SYSLINUX, but may break in a future one.
++++ LARGE KERNELS AND INITIAL RAMDISK SUPPORT ++++
This version of SYSLINUX supports large kernels (bzImage format),
eliminating the 500K size limit of the zImage kernel format. bzImage
format kernels are detected automatically and handled transparently to
the user.
This version of SYSLINUX also supports a boot-time-loaded ramdisk
(initrd). An initrd is loaded from a DOS file if the option
"initrd=filename" (where filename is the filename of the initrd image;
the file must be located in the root directory on the boot floppy) is
present on the processed command line (after APPEND's have been added,
etc.). If several initrd options are present, the last one has
precedence; this permits user-entered options to override a config
file APPEND. Specifying "initrd=" without a filename inhibits initrd
loading. The file specified by the initrd= option will typically be a
gzipped filesystem image.
NOTE: One of the main advantages with SYSLINUX is that it makes it
very easy to support users with new or unexpected configurations,
especially in a distribution setting. If initrd is used to
extensively modularize the distribution kernel, it is strongly
recommended that a simple way of adding drivers to the boot floppy be
provided. The suggested manner is to let the initrd system mount the
boot floppy and look for additional drivers in a predetermined
location.
To bzImage and recent zImage kernels, SYSLINUX 1.30 and higher will
identify using the ID byte 0x31. PXELINUX identifies using the ID
byte 0x32, and ISOLINUX 0x33. The ID range 0x34-0x3f is reserved for
future versions or derivatives of SYSLINUX.
++++ DISPLAY FILE FORMAT ++++
DISPLAY and function-key help files are text files in either DOS or UNIX
format (with or without <CR>). In addition, the following special codes
are interpreted:
<FF> <FF> = <Ctrl-L> = ASCII 12
Clear the screen, home the cursor. Note that the screen is
filled with the current display color.
<SI><bg><fg> <SI> = <Ctrl-O> = ASCII 15
Set the display colors to the specified background and
foreground colors, where <bg> and <fg> are hex digits,
corresponding to the standard PC display attributes:
0 = black 8 = dark grey
1 = dark blue 9 = bright blue
2 = dark green a = bright green
3 = dark cyan b = bright cyan
4 = dark red c = bright red
5 = dark purple d = bright purple
6 = brown e = yellow
7 = light grey f = white
Picking a bright color (8-f) for the background results in the
corresponding dark color (0-7), with the foreground flashing.
Colors are not visible over the serial console.
<CAN>filename<newline> <CAN> = <Ctrl-X> = ASCII 24
If a VGA display is present, enter graphics mode and display
the graphic included in the specified file. The file format
is an ad hoc format called LSS16; the included Perl program
"ppmtolss16" can be used to produce these images. This Perl
program also includes the file format specification.
The image is displayed in 640x480 16-color mode. Once in
graphics mode, the display attributes (set by <SI> code
sequences) work slightly differently: the background color is
ignored, and the foreground colors are the 16 colors specified
in the image file. For that reason, ppmtolss16 allows you to
specify that certain colors should be assigned to specific
color indicies.
Color indicies 0 and 7, in particular, should be chosen with
care: 0 is the background color, and 7 is the color used for
the text printed by SYSLINUX itself.
<EM> <EM> = <Ctrl-Y> = ASCII 25
If we are currently in graphics mode, return to text mode.
<DLE>..<ETB> <Ctrl-P>..<Ctrl-W> = ASCII 16-23
These codes can be used to select which modes to print a
certain part of the message file in. Each of these control
characters select a specific set of modes (text screen,
graphics screen, serial port) for which the output is actually
displayed:
Character Text Graph Serial
------------------------------------------------------
<DLE> = <Ctrl-P> = ASCII 16 No No No
<DC1> = <Ctrl-Q> = ASCII 17 Yes No No
<DC2> = <Ctrl-R> = ASCII 18 No Yes No
<DC3> = <Ctrl-S> = ASCII 19 Yes Yes No
<DC4> = <Ctrl-T> = ASCII 20 No No Yes
<NAK> = <Ctrl-U> = ASCII 21 Yes No Yes
<SYN> = <Ctrl-V> = ASCII 22 No Yes Yes
<ETB> = <Ctrl-W> = ASCII 23 Yes Yes Yes
For example:
<DC1>Text mode<DC2>Graphics mode<DC4>Serial port<ETB>
... will actually print out which mode the console is in!
<SUB> <SUB> = <Ctrl-Z> = ASCII 26
End of file (DOS convention).
++++ COMBOOT IMAGES AND OTHER OPERATING SYSTEMS ++++
This version of SYSLINUX supports chain loading of other operating
systems (such as MS-DOS and its derivatives, including Windows 95/98),
as well as COMBOOT-style standalone executables (a subset of DOS .COM
files; see separate section below.)
Chain loading requires the boot sector of the foreign operating system
to be stored in a file in the root directory of the filesystem.
Because neither Linux kernels, boot sector images, nor COMBOOT files
have reliable magic numbers, SYSLINUX will look at the file extension.
The following extensions are recognized (case insensitive):
none or other Linux kernel image
.0 PXE bootstrap program (NBP) [PXELINUX only]
.bin "CD boot sector" [ISOLINUX only]
.bs Boot sector [SYSLINUX only]
.bss Boot sector, DOS superblock will be patched in [SYSLINUX only]
.c32 COM32 image (32-bit COMBOOT)
.cbt COMBOOT image (not runnable from DOS)
.com COMBOOT image (runnable from DOS)
.img Disk image [ISOLINUX only]
For filenames given on the command line, SYSLINUX will search for the
file by adding extensions in the order listed above if the plain
filename is not found. Filenames in KERNEL statements must be fully
qualified.
++++ BOOTING DOS (OR OTHER SIMILAR OPERATING SYSTEMS) ++++
This section applies to SYSLINUX only, not to PXELINUX or ISOLINUX.
See isolinux.doc for an equivalent procedure for ISOLINUX.
This is the recommended procedure for creating a SYSLINUX disk that
can boot either DOS or Linux. This example assumes the drive is A: in
DOS and /dev/fd0 in Linux; for other drives, substitute the
appropriate drive designator.
---- Linux procedure ----
1. Make a DOS bootable disk. This can be done either by specifying
the /s option when formatting the disk in DOS, or by running the
DOS command SYS (this can be done under DOSEMU if DOSEMU has
direct device access to the relevant drive):
format a: /s
or
sys a:
2. Boot Linux. Copy the DOS boot sector from the disk into a file:
dd if=/dev/fd0 of=dos.bss bs=512 count=1
3. Run SYSLINUX on the disk:
syslinux /dev/fd0
4. Mount the disk and copy the DOS boot sector file to it. The file
*must* have extension .bss:
mount -t msdos /dev/fd0 /mnt
cp dos.bss /mnt
5. Copy the Linux kernel image(s), initrd(s), etc to the disk, and
create/edit syslinux.cfg and help files if desired:
cp vmlinux /mnt
cp initrd.gz /mnt
6. Unmount the disk (if applicable.)
umount /mnt
---- DOS procedure ----
To make this installation in DOS only, you need the utility copybs.com
(included with SYSLINUX) as well as the syslinux.com installer.
1. Make a DOS bootable disk. This can be done either by specifying
the /s option when formatting the disk in DOS, or by running the
DOS command SYS:
format a: /s
or
sys a:
2. Copy the DOS boot sector from the disk into a file. The file
*must* have extension .bss:
copybs a: a:dos.bss
3. Run SYSLINUX on the disk:
[lock a: if you're running under Win95/98/ME]
syslinux a:
4. Copy the Linux kernel image(s), initrd(s), etc to the disk, and
create/edit syslinux.cfg and help files if desired:
copy vmlinux a:
copy initrd.gz a:
++++ COMBOOT EXECUTABLES ++++
SYSLINUX supports simple standalone programs, using a file format
similar to DOS ".com" files. A 32-bit version, called COM32, is also
provided. A simple API provides access to a limited set of filesystem
and console functions.
See the file comboot.doc for more information on COMBOOT and COM32
programs.
++++ NOVICE PROTECTION ++++
SYSLINUX will attempt to detect if the user is trying to boot on a 286
or lower class machine, or a machine with less than 608K of low ("DOS")
RAM (which means the Linux boot sequence cannot complete). If so, a
message is displayed and the boot sequence aborted. Holding down the
Ctrl key while booting disables this feature.
The compile time and date of a specific SYSLINUX version can be obtained
by the DOS command "type ldlinux.sys". This is also used as the
signature for the LDLINUX.SYS file, which must match the boot sector.
Any file that SYSLINUX uses can be marked hidden, system or readonly if
so is convenient; SYSLINUX ignores all file attributes. The SYSLINUX
installed automatically sets the readonly attribute on LDLINUX.SYS.
++++ NOTES ON BOOTABLE CD-ROMS ++++
SYSLINUX can be used to create bootdisk images for El
Torito-compatible bootable CD-ROMs. However, it appears that many
BIOSes are very buggy when it comes to booting CD-ROMs. Some users
have reported that the following steps are helpful in making a CD-ROM
that is bootable on the largest possible number of machines:
a) Use the -s (safe, slow and stupid) option to SYSLINUX;
b) Put the boot image as close to the beginning of the
ISO 9660 filesystem as possible.
A CD-ROM is so much faster than a floppy that the -s option shouldn't
matter from a speed perspective.
Of course, you may want to use ISOLINUX instead. See isolinux.doc.
++++ BOOTING FROM A FAT FILESYSTEM PARTITION ON A HARD DISK ++++
SYSLINUX can boot from a FAT12 or FAT16 filesystem partition on a hard
disk (FAT32, introduced in Windows 95 OSR-2, is not supported,
however.) The installation procedure is identical to the procedure
for installing it on a floppy, and should work under either DOS or
Linux. To boot from a partition, SYSLINUX needs to be launched from a
Master Boot Record or another boot loader, just like DOS itself would.
Under DOS, you can install a standard simple MBR on the primary hard
disk by running the command:
FDISK /MBR
Then use the FDISK command to mark the appropriate partition active.
A simple MBR, roughly on par with the one installed by DOS (but
unencumbered), is included in the SYSLINUX distribution
++++ KNOWN BUGS ++++
SYSLINUX is unsafe to use on any filesystem that extends past cylinder
1024. This is a fundamental limitation of the standard BIOS API. The
"extended" BIOS API can *sometimes* be used to work around it, but
there simply is not enough space in the SYSLINUX boot sector to
support both APIs.
SYSLINUX will not work (and will refuse to install) on filesystems
with a cluster size of more than 16K (typically means a filesystem of
more than 1 GB.)
++++ HARDWARE INFORMATION +++
I have started to maintain a web page of hardware with known
problems. There are, unfortunately, lots of broken hardware out
there; especially early PXE stacks (for PXELINUX) have lots of
problems.
A list of problems, and workarounds (if known), is maintained at:
http://syslinux.zytor.com/hardware.php
++++ BUG REPORTS ++++
I would appreciate hearing of any problems you have with SYSLINUX. I
would also like to hear from you if you have successfully used SYSLINUX,
*especially* if you are using it for a distribution.
If you are reporting problems, please include all possible information
about your system and your BIOS; the vast majority of all problems
reported turn out to be BIOS or hardware bugs, and I need as much
information as possible in order to diagnose the problems.
There is a mailing list for discussion among SYSLINUX users and for
announcements of new and test versions. To join, or to browse the
archive, go to:
http://www.zytor.com/mailman/listinfo/syslinux
Please DO NOT send HTML messages or attachments to the mailing list
(including multipart/alternative or similar.) All such messages will
be bounced.
|