syslinux-legacy
Make a partition bootable with SYSLINUX
SYNOPSIS
syslinux-legacy [OPTIONS] DEVICE
PARAMETERS
-s, --safe
Only install if no valid SYSLINUX boot sector is found. Prevents accidental overwrites.
-f, --force
Force installation, overwriting any existing boot sector. Use with caution.
-r, --root DIRECTORY
Specify the root directory of the SYSLINUX installation.
-d, --directory DIRECTORY
Look for ldlinux.sys in this directory on the target filesystem.
-m, --mbr
Install SYSLINUX into the Master Boot Record (MBR) of the device, making the entire disk bootable.
-o, --offset SECTOR
When installing to MBR, specify the MBR offset in sectors (typically 0).
-C, --check
Perform a check of the boot sector without writing anything.
-i, --install
Explicitly indicates an install operation (default).
-U, --uninstall
Uninstall SYSLINUX from the boot sector, restoring the original boot sector if possible.
-v, --verbose
Enable verbose output, showing more details about the installation process.
-h, --help
Display a help message and exit.
-V, --version
Display version information and exit.
DEVICE
The target device (e.g., /dev/sda1, /dev/sdb, /dev/fd0) where SYSLINUX should be installed.
DESCRIPTION
syslinux-legacy is a utility from the SYSLINUX project used to install the SYSLINUX bootloader on various storage devices. Its primary function is to write the necessary boot sector code to either the Master Boot Record (MBR) of a hard disk or the Volume Boot Record (VBR) of a specific partition. This makes the device bootable using SYSLINUX. As the name suggests, this command refers to the older, more direct installation method, contrasting with potentially newer or more abstract installation methods found in later SYSLINUX versions.
The command prepares the target device (e.g., a floppy disk, USB drive, or hard drive partition) to load the ldlinux.sys file, which must be present on the filesystem of the target device. syslinux-legacy handles the low-level writing of the boot sector, making it an essential tool for setting up minimalistic and efficient boot environments for Linux or other operating systems, particularly on older BIOS-based systems. It is often used for creating live USBs, rescue disks, or simple embedded systems.
CAVEATS
Incorrect usage of syslinux-legacy can render a disk or partition unbootable. Always double-check the target DEVICE.
This command primarily targets BIOS-based systems and FAT filesystems. While SYSLINUX itself supports other filesystems (like Ext2/3/4 via EXTLINUX) and boot methods (PXE, ISO), syslinux-legacy's direct boot sector installation is most robust for FAT.
The ldlinux.sys file (and potentially syslinux.cfg) must be present and correctly located on the target filesystem for SYSLINUX to function after installation.
Being "legacy," it might not receive as much active development or support as the main SYSLINUX tools.
THE <I>LDLINUX.SYS</I> FILE
For SYSLINUX to function correctly, the ldlinux.sys file, which contains the core bootloader stages and modules, must reside in the root directory (or a specified directory) of the filesystem on the target device. syslinux-legacy writes a small boot sector that points to and loads this file, making its presence crucial for a successful boot.
THE <I>SYSLINUX.CFG</I> CONFIGURATION FILE
After syslinux-legacy installs the boot sector, SYSLINUX relies on a configuration file, typically named syslinux.cfg (or extlinux.conf for Ext filesystems), located in the root or a specified directory of the boot device. This file defines the boot menu entries, kernel parameters, timeout, and other boot-time options. Without a valid configuration file, SYSLINUX may fail to present a boot menu or load an operating system.
HISTORY
The SYSLINUX project, initiated by H. Peter Anvin, began in the mid-1990s as a lightweight bootloader primarily for floppy disks. syslinux-legacy represents the original, direct method of installing the SYSLINUX boot sector. Over time, as boot environments diversified (e.g., Ext filesystems, PXE, ISOs, and later UEFI), the SYSLINUX project expanded into EXTLINUX, ISOLINUX, and PXELINUX, and the main syslinux command evolved to handle these various targets. The syslinux-legacy designation typically indicates a package or executable that preserves the original, simpler, direct-to-sector installation mechanism, often for compatibility with older systems or specific use cases where the more generalized syslinux command might have different behaviors or dependencies. Its continued existence ensures that the foundational SYSLINUX boot sector installation method remains available.