Syslinux/ja

Syslinux is a package that contains a family of bootloaders. The package includes SYSLINUX (FAT filesystem bootloader), EXTLINUX (ext2/3/4, btrfs and xfs filesystem bootloader), PXELINUX (Network PXE bootloader) and ISOLINUX (ISO-9660 (CDROM) bootloader).

Installation
The installation of will provide the software on the system but not install (activate) the bootloader itself.

Setup on BIOS systems
To use EXTLINUX you need to make sure to both install the proper boot sector, and then to install the actual boot loader into the partition. Make sure not to omit steps.

The boot sector setups are not needed for the SYSLINUX, PXELINUX and ISOLINUX installations.

MBR (msdos) setup
First install the boot sector provided by syslinux. Take due care with this command; if  is not given it will overwrite the entire disk rather than just the first 440 bytes:

Mark the boot partition as active. A  will appear in the "Boot" column:

GPT setup
First install the boot sector provided by syslinux. Take due care with this command; if  is not given it will overwrite the entire disk rather than just the first 440 bytes:

Next, run  and enable legacy BIOS boot partition attributes on the partition where  is stored.

EXTLINUX setup
Use the  command to install the necessary files in :

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 setup
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 that base directory, create a subdirectory called and copy the  file from the syslinux package into it.

Create the file according to the instructions mentioned below.

Next, create two more directories and  in the base directory:

Copy the binary into the  directory:

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

The file will be automatically created.

PXELINUX setup
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 in. With this setup, copy the PXELINUX loader to the TFTP boot dir and create a config dir.

The config dir 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. Next, a character is stripped from the end of this hexadecimal representation until no more characters are left, or until a config file is found. If none of the tries match, the default config file is used.

The hexadecimal representation of an IP can be found with the following command:

An example config file matching sequence occurs as follows:

SYSLINUX setup
Use the  command to install the SYSLINUX bootloader on the (FAT) file system:

EFI system partition
Create a partition of type EF (MBR) or EF00 (GPT) with a FAT32 file system. You can also use an already existing EFI system partition.

It is advisable to mount this partition as.

Boot Loader Install
In the EFI system partition, create a directory for the syslinux files. This directory will also contain the configuration files that you will create later.

Copy the files, along with the other desired .c32 files from  to your syslinux directory. Example:

If you are not booted in EFI mode, then the syslinux files need to be copied to instead, and  needs to be renamed to. You can then skip the next section about.

Making Syslinux known to EFI
Ensure that  is enabled in your kernel. If built as a module, ensure that it is loaded.

Now create a new boot entry using :

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

Configuration
The configuration file 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.

Simple configuration
This will give you a simple "boot:" prompt, similar to the one in Gentoo's Minimal LiveCD:

Menu configuration
The following configuration provides a simple text menu example.

This is done via the vesamenu module, in some cases where vesa is not compatible, the simpler menu module will work.

Copy the VESA menu module into the boot filesystem or EFI system partition.

On BIOS systems:

On EFI systems:

Passing Kernel Parameters
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, like this:

Checking dynamic links
Since syslinux-5.00, the .c32 modules use dynamic linking. To verify whether you have installed the dependencies, enter the directory where syslinux is installed and use the ldd command:

If it shows any missing .c32 modules, copy them to the directory, too.