syslinux
Create bootable Linux systems on FAT filesystems
SYNOPSIS
N/A - SYSLINUX is a suite of tools, not a single command.
PARAMETERS
device
Specifies the target drive or partition for installing the SYSLINUX boot sector.
-d directory
Specifies the directory where the SYSLINUX loader files are located.
-i
Installs a sector-based loader instead of a file-based loader. This is needed for some BIOSes.
-s
Creates a safe copy of the boot sector before writing the new one.
-f
Force install even if a file system already exists.
-m
Uses MBR (Master Boot Record) rather than VBR (Volume Boot Record). Required on some systems.
DESCRIPTION
SYSLINUX is a suite of lightweight bootloaders designed for booting Linux from various filesystems, primarily FAT (used on floppy disks, USB drives, and occasionally hard drives).
It provides a menu-driven interface allowing users to select different operating systems or kernel options at boot time. Unlike GRUB or LILO, SYSLINUX is specifically tailored for simple boot scenarios and FAT-based systems, making it a popular choice for rescue disks, live distributions, and embedded systems.
The SYSLINUX suite comprises several loaders including SYSLINUX itself (for FAT), ISOLINUX (for ISO 9660), PXELINUX (for network booting via PXE), and EXTLINUX (for ext2/3/4 filesystems). Each loader offers similar configuration options, focusing on kernel loading and initial RAM disk (initrd) loading.
Configuration is typically done via a text-based configuration file (usually `syslinux.cfg` or `isolinux.cfg`) which specifies the boot menu entries, kernel filenames, and boot parameters. The configuration files are highly flexible.
The command is not actually a single executable that is directly invoked at the prompt. Rather, it is a suite of utilities. To install syslinux, one of the utilities (often called `syslinux`, depending on the distribution) is used to write the boot sector code to a drive.
CAVEATS
SYSLINUX is primarily designed for FAT filesystems and may not be suitable for more complex boot scenarios requiring features like LVM or encryption without the use of EXTLINUX.
The command `syslinux` is only used to install the bootloader to the drive. Configuring the boot options, like specifying the kernel and initrd image, requires editing the configuration file (syslinux.cfg/isolinux.cfg), which must be present on the bootable media.
CONFIGURATION FILE
The SYSLINUX configuration file (usually `syslinux.cfg` or `isolinux.cfg`) controls the boot menu and boot options. It allows specifying kernel filenames, initrd paths, and boot parameters.
The configuration file uses a simple text-based syntax with keywords such as `LABEL`, `KERNEL`, `APPEND`, and `INITRD` to define menu entries. A default label is used if a boot option is not selected.
Example:LABEL linux
KERNEL vmlinuz
APPEND root=/dev/sda1 ro
LABEL failsafe
KERNEL vmlinuz
APPEND root=/dev/sda1 ro failsafe
INSTALLATION EXAMPLE
Assuming you are using a Debian/Ubuntu system and want to make `/dev/sdb1` bootable, and that SYSLINUX files are under `/usr/lib/syslinux/modules/bios`, you may have to manually copy them to your partition.sudo syslinux /dev/sdb1
You may need to manually copy the right `ldlinux.c32` from the folder `/usr/lib/syslinux/modules/bios` into your `/dev/sdb1`.
Then you need to manually create the `/dev/sdb1/syslinux.cfg`.
Please refer to the SYSLINUX documentation for detailed steps.
HISTORY
SYSLINUX was originally developed by H. Peter Anvin in 1994. It was initially designed as a simple bootloader for booting Linux from floppy disks. Over time, it evolved into a suite of bootloaders supporting various media and network booting (PXELINUX).
It gained popularity due to its small size, ease of configuration, and suitability for embedded systems, rescue disks, and live distributions. It is still actively maintained, providing ongoing support for new hardware and features.