Syslinux/ru

Syslinux - это пакет, который содержит семейство загрузчиков. Пакет включает SYSLINUX (загрузчик для файловых систем FAT), EXTLINUX (загрузчик файловых систем ext2/3/4, btrfs и xfs), PXELINUX (сетевой загрузчик PXE) и ISOLINUX (ISO-9660) для загрузки CD/DVD.

Support for EFI was added in version 6.00 and greater.

Установка
The installation of the Syslinux package will provide the software on the system but not install or activate any of the various bootloaders contained in the package.

Настройка на системах с BIOS
The rest of this section will presume the boot partition is located at (which is a common location). If this is not the case be sure to make adjustments as needed.

To use EXTLINUX be sure to install the proper boot sector, then install the boot loader into the partition. If these steps are omitted EXTLINUX will not be operational. This type of a boot sector setup is not needed for the SYSLINUX, PXELINUX and ISOLINUX installations.

Настройка MBR (msdos)
First, install the boot sector provided by Syslinux. Use extra care with this command; if  is not given it will overwrite the entire disk rather than just the first 440 bytes:

Отметьте загрузочный раздел как активный. В столбце "Boot" появится  :

Настройка GPT
First, install the boot sector provided by Syslinux. Use special care with this command; if  is not given it will overwrite the entire disk rather than just the first 440 bytes:

Next, run 's utility and enable the legacy BIOS bootable attribute on the partition where  is stored.

Настройка EXTLINUX
Используйте команду для установки необходимых файлов в

The Syslinux package contains various modules to enable additional features. Starting with Syslinux version 5, some modules depends on others, so it is a good idea to copy most basic modules regardless of the use case. See Checking dynamic links to verify whether all dependencies are installed.

Настройка ISOLINUX
To install ISOLINUX, start off with a base directory in which all the files that need to reside on the CD or DVD are situated. In the base directory, create a subdirectory called and copy the  file from the Syslinux package into the  folder:

Создайте файл в соответствии с инструкциями приведенными ниже.

Затем создайте два дополнительных каталога и  в основном каталоге:

Скопируйте двоичный файл в каталог :

When the configuration has been made, the following command can be used to create the final ISO image (remember to substitute   with the same base directory used in the previous commands):

Файл будет создан автоматически.

Настройка PXELINUX
With PXELINUX is possible to netboot using images that are shared through a TFTP server. This article will assume there is a TFTP server installed, and its TFTP root directory is located at With this setup, copy the PXELINUX loader to the TFTP boot directory and create a configuration directory:

The config directory can be used to store different configurations for the netbooted clients. When a client tries to boot, the MAC address or the IP address is used to determine the appropriate client config file. First it tries to look for the MAC address, followed by a try on the hexadecimal representation of the client IP. After that a character is stripped from the end of this hexadecimal representation until no more characters are left, or until a configuration file is located. If none of the tries match, the default config file is used.

The hexadecimal representation of an IP can be found by using the command:

Пример подходящей последовательности в файле конфигурации выглядит так:

Настройка SYSLINUX
Используйте команду для установки загрузчика SYSLINUX на файловую систему (FAT):

EFI system partition
Create a partition of type  (MBR) or   (GPT) with a FAT32 file system. It is also possible to use an existing EFI system partition if one is present. It is advisable to mount this partition at

Boot loader install
In the EFI system partition, create a directory for the Syslinux files. This directory will also contain the configuration files that will be created later.

Copy the and  files along with the other desired .c32 files from  to the Syslinux directory. For example:

If the system has not been booted in EFI mode, then the Syslinux files need to be copied to the directory instead and  needs to be renamed to. If this is the case then skip the next section concerning the utility.

Making Syslinux known to EFI
Ensure that  is enabled in the kernel. If it was built as a module, ensure that it is loaded into memory. This action can be done using the utility. After the modules have been loaded create a new boot entry using :

will automatically adjust the EFI boot order to put the most recently created entry at the top of the list. If that is undesired, change the boot order with the  option.

Конфигурация
The configuration file for Syslinux is called. For compatibility with existing installs, the following legacy configuration file names are still supported:
 * EXTLINUX:
 * ISOLINUX:

The configuration format, however, is the same. The configuration file must be present in the directory where Syslinux is installed.

Простая конфигурация
This will provide a simple "" prompt, similar to the one in Gentoo's Minimal LiveCD:

Конфигурация меню
The following configuration provides a simple text menu example. This is done via the  module. In some cases where  is not compatible, the simpler menu module will work. Copy the VESA menu module into the boot filesystem or EFI system partition. BIOS systems should use the following example:

EFI systems should use:

Передача параметров ядра
Unless the kernel parameters are hard-coded and the initramfs is built-in into the kernel image, these may need to be passed on to the kernel through the boot loader. To do so, use the  and/or   parameter:

Checking dynamic links
Since syslinux-5.00, the modules use dynamic linking. To verify if the dependencies has been installed enter the Syslinux directory and use the command:

If any modules are missing be sure to copy them to the directory.