📄 syslinux.doc
字号:
SYSLINUX A bootloader for Linux using MS-DOS floppies Copyright (C) 1994-2003 H. Peter AnvinThis program is provided under the terms of the GNU General PublicLicense, version 2 or, at your option, any later version. There is nowarranty, neither expressed nor implied, to the function of thisprogram. 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 whichoperates off an MS-DOS/Windows FAT filesystem. It is intended tosimplify 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 theneed for distribution of raw diskette images for boot floppies. ASYSLINUX floppy can be manipulated using standard MS-DOS (or any otherOS that can access an MS-DOS filesystem) tools once it has beencreated. ++++ 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 asystem which actually contains DOS or Windows, LOADLIN may be simplerto use.However, SYSLINUX has shown itself to be quite useful in a number ofspecial-purpose applications. ++++ CREATING A BOOTABLE LINUX FLOPPY +++In order to create a bootable Linux floppy using SYSLINUX, prepare anormal MS-DOS formatted floppy. Copy one or more Linux kernel files toit, 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 thecommand "lock a:" first. If you're running in a WinNT/2K DOS box, youwill probably get a dialog box about not getting exclusive access andwith 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 namedLDLINUX.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 BIOSeson which SYSLINUX would otherwise fail. If you find a machine onwhich the -s option is required to make it boot reliably, please sendas much info about your machine as you can, and include the failuremode.The -o option is used with a disk image file and specifies the byteoffset of the filesystem image in the file.On boot time, by default, the kernel will be loaded from the image namedLINUX on the boot floppy. This default can be changed, see the sectionon the SYSLINUX config file.If the Shift or Alt keys are held down during boot, or the Caps or Scrolllocks are set, SYSLINUX will display a LILO-style "boot:" prompt. Theuser can then type a kernel file name followed by any kernel parameters.The SYSLINUX loader does not need to know about the kernel file inadvance; all that is required is that it is a file located in the rootdirectory on the disk. ++++ CONFIGURATION FILE ++++All the configurable defaults in SYSLINUX can be changed by putting afile called SYSLINUX.CFG in the root directory of the boot floppy. Thisis a text file in either UNIX or DOS format, containing one or more ofthe following items (case is insensitive for keywords; upper case is usedhere to indicate that a word should be typed verbatim):All options here applies to PXELINUX as well as SYSLINUX unlessotherwise noted. See pxelinux.doc for additional information onPXELINUX.# 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. The flag_val is an OR of the following options: 1: indicates that an option of the following format should be generated and added to the kernel command line: ip=<client-ip>:<boot-server-ip>:<gw-ip>:<netmask> ... based on the input from the DHCP/BOOTP or PXE boot server. THE USE OF THIS OPTION IS NOT RECOMMENDED. If you have to use it, it is probably an indication that your network configuration is broken. Using just "ip=dhcp" on the kernel command line is a preferrable option, or, better yet, run dhcpcd/dhclient, from an initrd if necessary. 2: indicates that an option of the following format should be generated and added to the kernel command line: BOOTIF=<hardware-address-of-boot-interface> ... in dash-separated hexadecimal with leading hardware type (same as for the configuration file; see pxelinux.doc.) This allows an initrd program to determine from which interface the system booted.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 64 LABEL entries are permitted (for SYSLINUX, 128 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.ALLOWOPTIONS flag_val If flag_val is 0, the user is not allowed to specify any arguments on the kernel command line. The only options recognized are those specified in an APPEND 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.ONTIMEOUT kernel options... Sets the command line invoked on a timeout. Normally this is the same thing as invoked by "DEFAULT". If this is specified, then "DEFAULT" is used only if the user presses <Enter> to boot.ONERROR kernel options... If a kernel image is not found (either due to it not existing, or because IMPLICIT is set), run the specified command. The faulty command line is appended to the specified options, so if the ONERROR directive reads as: ONERROR xyzzy plugh ... and the command line as entered by the user is: foo bar baz ... SYSLINUX will execute the following as if entered by the user: xyzzy plugh foo bar bazSERIAL 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 filenameF2 filename ...etc...F9 filenameF0 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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -