Syslinux is a collection of boot loaders capable of booting from hard drives, CDs, and over the network via PXE. It supports the fat, ext2, ext3, ext4, and btrfs file systems.

+

{{Merge|Network_Installation_Guide#Pxelinux|No mention of PXE capability in this article}}

−

{{Note|Since Syslinux 4, Extlinux and Syslinux are the same thing.}}

+

[[Wikipedia:SYSLINUX|Syslinux]] is a collection of boot loaders capable of booting from hard drives, CDs, and over the network via PXE. It supports the [[Wikipedia:File Allocation Table|FAT]], [[Wikipedia:ext2|ext2]], [[Ext3|ext3]], [[Ext4|ext4]], and [[Btrfs]] file systems.

−

{{Note|Syslinux does not support [[UEFI]] as of May 2012. According to upstream, UEFI support will be eventually added to Syslinux, but there is no time-frame as to when it will be functional.}}

#'''Load MBR'''. At boot, the computer loads the [[MBR]] ({{ic|/usr/lib/syslinux/mbr.bin}}).

+

# '''Search active partition'''. The MBR looks for the partition that is marked as active (boot flag).

−

#'''Search active partition'''. The MBR looks for the partition that is marked as active (boot flag).

+

# '''Execute volume boot record'''. Once found, the volume boot record (VBR) will be executed. In the case of ext2/3/4 and FAT12/16/32, the starting sector of {{ic|ldlinux.sys}} is hard-coded into the VBR.

−

#'''Execute volume boot record'''. Once found, the volume boot record (VBR) will be executed. In the case of ext2/3/4 and fat12/16/32, the starting sector of {{ic|ldlinux.sys}} is hard-coded into the VBR.

+

# '''Execute ldlinux.sys'''. The VBR will execute ({{ic|ldlinux.sys}}). Therefore, if the location of {{ic|ldlinux.sys}} changes, Syslinux will no longer boot. (In the case of Btrfs, the above method will not work since files move around resulting in the sector location of {{ic|ldlinux.sys}} changing. Therefore, the entire Syslinux code needs to be stored outside the filesystem. The code is stored in the sectors following the VBR.)

−

#'''Execute ldlinux.sys'''. The VBR will execute ({{ic|ldlinux.sys}}). Therefore, if the location of {{ic|ldlinux.sys}} changes, syslinux will no longer boot. (In the case of btrfs, the above method will not work since files move around resulting in the sector location of {{ic|ldlinux.sys}} changing. Therefore, the entire Syslinux code needs to be stored outside the filesystem. The code is stored in the sectors following the VBR.)

+

# '''Search configuration file'''. Once Syslinux is fully loaded, it looks for a configuration file, either {{ic|extlinux.conf}} or {{ic|syslinux.cfg}}.

−

#'''Search configuration file'''. Once Syslinux is fully loaded, it looks for a configuration file, either {{ic|extlinux.conf}} or {{ic|syslinux.cfg}}.

+

# '''Load configuration'''. If one is found, the configuration file is loaded. If no configuration file is found, you will be given a Syslinux prompt.

−

#'''Load configuration'''. If one is found, the configuration file is loaded. If no configuration file is found, you will be given a syslinux prompt.

+

−

==Installation==

+

== Installation ==

−

===Automatic Install ===

+

−

The syslinux-install_update script will install Syslinux, copy COM32 modules to {{ic|/boot/syslinux}}, set the boot flag, and install the MBR. It can handle MBR and GPT disks along with softraid.

+

[[pacman|Install]] {{Pkg|syslinux}} from the [[official repositories]]. If your boot partition is FAT, you will also need {{Pkg|mtools}}.

+

{{Note|

+

* Since Syslinux 4, Extlinux and Syslinux are the same thing.

+

* Syslinux UEFI support is present in version 6.00-preXX and is currently of alpha quality. See [[UEFI_Bootloaders#SYSLINUX]] for more info.

+

}}

+

+

=== Automatic Install ===

+

+

The {{ic|syslinux-install_update}} script will install Syslinux, copy/symlink {{ic|*.c32}} modules to {{ic|/boot/syslinux}}, set the boot flag and install the boot code in the MBR. It can handle [[Master Boot Record|MBR]] and [[GUID Partition Table|GPT]] disks along with software RAID.

−

1. Install {{Pkg|syslinux}}:

+

:1. If you use a separate boot partition make sure that it is mounted. Check with {{ic|lsblk}}; if you don't see a {{ic|/boot}} mountpoint, mount it before you go any further.

{{Note| If you are unsure of which partition table you are using (MBR or GPT), you are likely using the MBR partition table. Most of the time GPT will create a special MBR-style partition (type 0xEE) using the whole disk which will be displayed with the following command:

+

# syslinux-install_update -i -a -m

−

fdisk -l /dev/sda

+

+

:3. Edit {{ic|/boot/syslinux/syslinux.cfg}}.

+

+

{{Note|For this to work with [[GUID Partition Table|GPT]], the {{pkg|gptfdisk}} package is needed as the backend for setting the boot flag.}}

+

+

=== Manual install ===

+

+

{{Note|

+

* If you are unsure of which partition table you are using (MBR or GPT), you are likely using the MBR partition table. Most of the time GPT will create a special MBR-style partition (type {{ic|0xEE}}) using the whole disk which will be displayed with the following command:

+

# fdisk -l /dev/sda

or alternatively:

or alternatively:

−

sgdisk -l /dev/sda

+

# sgdisk -p /dev/sda

will show "GPT: not present" if it is not a GPT disk.

will show "GPT: not present" if it is not a GPT disk.

+

* If you are trying to rescue an installed system with a live CD, be sure to [[Change_Root|chroot]] into it before executing these commands. If you do not chroot first, you must prepend all file paths (not {{ic|/dev/}} paths) with the mount point.

}}

}}

−

{{Note| If you are trying to rescue an installed system with a live CD, be sure to [[Change_Root|chroot]] into it before executing these commands. If you do not chroot first, you must prepend all file paths (not {{ic|/dev/}} paths) with the mount point.}}

+

Your boot partition, on which you plan to install Syslinux, must contain a FAT, ext2, ext3, ext4, or Btrfs file system. You should install it on a mounted directory—not a {{ic|/dev/sdXY}} device. You do not have to install it on the root directory of a file system, e.g., with device {{ic|/dev/sda1}} mounted on {{ic|/boot}}. You can install Syslinux in the {{ic|syslinux}} directory:

+

# mkdir /boot/syslinux

+

# extlinux --install /boot/syslinux

+

This is assuming the target partition is ext[234]. If it is FAT, the syslinux command must be used instead.

−

Make sure you have the {{Pkg|syslinux}} package installed. Then install Syslinux onto your boot partition, which must contain a fat, ext2, ext3, ext4, or btrfs file system.

+

==== MBR partition table ====

−

You should install it on a mounted directory, not a {{ic|/dev/sdXY}} device. You do not have to install it on the root directory of a file system, e.g., with device {{ic|/dev/sda1}} mounted on {{ic|/boot}} you can install syslinux in the syslinux directory:

+

−

mkdir /boot/syslinux

+

−

extlinux --install /boot/syslinux

+

−

====MBR Partition Table====

+

{{Box||See the main article: [[Master Boot Record]]|#E5E5FF|#FCFCFC}}

−

Next you need mark your boot partition active in your partition table. Applications capable of doing this include {{ic|fdisk}}, {{ic|cfdisk}}, {{ic|sfdisk}}, {{ic|(g)parted}}. It should look like this:

+

−

fdisk -l /dev/sda

+

−

[...]

+

−

Device Boot Start End Blocks Id System

+

−

/dev/sda1 * 2048 104447 51200 83 Linux

+

−

/dev/sda2 104448 625142447 312519000 83 Linux

+

−

Install the master boot record:

+

Next you need to mark your boot partition active in your partition table. Applications capable of doing this include {{ic|fdisk}}, {{ic|cfdisk}}, {{ic|sfdisk}}, {{ic|parted/gparted}}. It should look like this:

<!-- conv=notrunc helps if {{ic|/dev/sda}} is actually a file not a block device -->

+

[...]

+

Device Boot Start End Blocks Id System

+

/dev/sda1 * 2048 104447 51200 83 Linux

+

/dev/sda2 104448 625142447 312519000 83 Linux

+

}}

−

{{Note|1=An alternate MBR doesn't work properly in '''Syslinux 4.05''' - it always invokes first partition. This bug was fixed in this commit: https://git.kernel.org/?p=boot/syslinux/syslinux.git;a=commit;h=794ff174175734a0974e1846f0db29040b096e45.}}

An alternate MBR which Syslinux provides is: altmbr.bin. This MBR does ''not'' scan for bootable partitions; instead, the last byte of the MBR is set to a value indicating which partition to boot from. Here is an example of how {{ic|altmbr.bin}} can be copied into position:

+

An alternate MBR which Syslinux provides is: {{ic|altmbr.bin}}. This MBR does ''not'' scan for bootable partitions; instead, the last byte of the MBR is set to a value indicating which partition to boot from. Here is an example of how {{ic|altmbr.bin}} can be copied into position:

In this case, a single byte of value 5 is appended to the contents of {{ic|altmbr.bin}} and the resulting 440 bytes are written to the MBR on device {{ic|sda}}. Syslinux was installed on the first logical partition ({{ic|/dev/sda5}}) of the disk.

−

In this case, a single byte of value 5 is appended to the contents of {{ic|altmbr.bin}} and the resulting 440 bytes are written to the MBR on device sda. Syslinux was installed on the first logical partition ({{ic|/dev/sda5}}) of the disk.

If you are using software [[Wikipedia:RAID|RAID]] using [http://neil.brown.name/blog/mdadm mdadm], change the {{ic|APPEND}} line to accommodate your RAID arrays. As an example the following accommodates three RAID 1 array's and sets the appropriate one as root:

If booting from a software raid partition fails using the kernel device node method above an alternative, a more reliable, way is to use partition labels:

+

APPEND root=LABEL=THEROOTPARTITIONLABEL ro

==== Text Boot menu ====

==== Text Boot menu ====

−

Syslinux also allows you to use a boot menu. To use it, copy the menu COM32 module to your syslinux directory:

+

+

Syslinux also allows you to use a boot menu. To use it, copy the {{ic|menu}} COM32 module to your Syslinux directory:

# cp /usr/lib/syslinux/menu.c32 /boot/syslinux/

# cp /usr/lib/syslinux/menu.c32 /boot/syslinux/

Line 135:

Line 164:

# ln -s /usr/lib/syslinux/menu.c32 /boot/syslinux/

# ln -s /usr/lib/syslinux/menu.c32 /boot/syslinux/

−

Config:

+

Configuration:

+

{{hc|/boot/syslinux/syslinux.cfg|<nowiki>

UI menu.c32

UI menu.c32

PROMPT 0

PROMPT 0

Line 153:

Line 183:

LINUX ../vmlinuz-linux

LINUX ../vmlinuz-linux

APPEND root=/dev/sda2 ro

APPEND root=/dev/sda2 ro

−

INITRD ../initramfs-linux-fallback.img

+

INITRD ../initramfs-linux-fallback.img</nowiki>

+

}}

+

+

For more details about the menu system, see [http://git.kernel.org/?p=boot/syslinux/syslinux.git;a=blob;f=doc/menu.txt the Syslinux documentation].

−

For more details about the menu system, see http://git.kernel.org/?p=boot/syslinux/syslinux.git;a=blob;f=doc/menu.txt.

+

==== Graphical boot menu ====

−

==== Graphical Boot menu ====

+

Syslinux also allows you to use a graphical boot menu. To use it, copy the {{ic|vesamenu}} COM32 module to your Syslinux folder:

−

Syslinux also allows you to use a graphical boot menu. To use it, copy the vesamenu COM32 module to your syslinux folder:

+

# cp /usr/lib/syslinux/vesamenu.c32 /boot/syslinux/

# cp /usr/lib/syslinux/vesamenu.c32 /boot/syslinux/

Line 164:

Line 196:

# ln -s /usr/lib/syslinux/vesamenu.c32 /boot/syslinux/

# ln -s /usr/lib/syslinux/vesamenu.c32 /boot/syslinux/

−

[http://projects.archlinux.org/archiso.git/tree/configs/releng/syslinux This config] uses the same menu design as the Arch Install CD. The background file can be found there too.

+

[https://projects.archlinux.org/archiso.git/tree/configs/releng/syslinux This config] uses the same menu design as the Arch Install CD. The background file can be found there too. To make sure that your system can boot with this config, check that it is pointing to the correct partition.

To use it, insert {{ic|MENU RESOLUTION 1440 900}} into your config for a 1440x900 resolution.

To use it, insert {{ic|MENU RESOLUTION 1440 900}} into your config for a 1440x900 resolution.

−

The background picture has to have exactly the right resolution, however, as syslinux will otherwise refuse to load the menu.

+

The background picture has to have exactly the right resolution, however, as Syslinux will otherwise refuse to load the menu.

−

=== Auto Boot ===

+

=== Auto boot ===

−

If you don't want to see the syslinux menu at all, comment out all {{ic|UI}} commands and make sure there is a {{ic|DEFAULT}} set in your {{ic|syslinux.cfg}}.

+

+

If you don't want to see the Syslinux menu at all, comment out all {{ic|UI}} commands and make sure there is a {{ic|DEFAULT}} set in your {{ic|syslinux.cfg}}.

=== Chainloading ===

=== Chainloading ===

−

If you want to chainload other operating systems (such as Windows) or boot loaders, copy (or symlink) the {{ic|chain.c32}} module to the syslinux directory (for details, see the instructions in the previous section). Then create a section in the configuration file:

+

If you want to chainload other operating systems (such as Windows) or boot loaders, copy (or symlink) the {{ic|chain.c32}} module to the Syslinux directory (for details, see the instructions in the previous section). Then create a section in the configuration file:

+

{{hc|/boot/syslinux/syslinux.cfg|

+

...

LABEL windows

LABEL windows

MENU LABEL Windows

MENU LABEL Windows

COM32 chain.c32

COM32 chain.c32

APPEND hd0 3

APPEND hd0 3

+

...

+

}}

−

{{ic|hd0 3}} is the third partition on the first BIOS drive - drives are counted from zero, but partitions are counted from one. For more details about chainloading, see [http://syslinux.zytor.com/wiki/index.php/Comboot/chain.c32].

+

{{ic|hd0 3}} is the third partition on the first BIOS drive - drives are counted from zero, but partitions are counted from one.

−

If you have [[grub2]] installed in your boot partition, you can chainload it by using:

+

If you are unsure about which drive your BIOS thinks is "first", you can instead use the MBR identifier, or if you are using GPT, the filesystem labels. To use the MBR identifier, run the command

+

{{hc|# fdisk -l /dev/sdb|<nowiki>

+

Disk /dev/sdb: 128.0 GB, 128035676160 bytes

+

255 heads, 63 sectors/track, 15566 cylinders, total 250069680 sectors

+

Units = sectors of 1 * 512 = 512 bytes

+

Sector size (logical/physical): 512 bytes / 512 bytes

+

I/O size (minimum/optimal): 512 bytes / 512 bytes

+

Disk identifier: 0xf00f1fd3

+

+

Device Boot Start End Blocks Id System

+

/dev/sdb1 2048 4196351 2097152 7 HPFS/NTFS/exFAT

+

/dev/sdb2 4196352 250066943 122935296 7 HPFS/NTFS/exFAT</nowiki>

+

}}

+

+

replacing {{ic|/dev/sdb}} with the drive you wish to chainload. Using the hexadecimal number under Disk identifier: {{ic|0xf00f1fd3}} in this case, the syntax in {{ic|syslinux.cfg}} is

+

{{hc|/boot/syslinux/syslinux.cfg|

+

...

+

LABEL windows

+

MENU LABEL Windows

+

COM32 chain.c32

+

APPEND mbr:0xf00f1fd3

+

...

+

}}

+

+

For more details about chainloading, see [http://www.syslinux.org/wiki/index.php/Comboot/chain.c32 the Syslinux wiki].

+

If you have [[GRUB]] installed on the same partition, you can chainload it by using:

+

{{hc|/boot/syslinux/syslinux.cfg|<nowiki>

+

...

LABEL grub2

LABEL grub2

MENU LABEL Grub2

MENU LABEL Grub2

COM32 chain.c32

COM32 chain.c32

append file=../grub/boot.img

append file=../grub/boot.img

+

...</nowiki>

+

}}

This may be required for booting from ISO images.

This may be required for booting from ISO images.

+

+

=== Chainloading other Linux systems ===

+

+

Chainloading another bootloader such as Windows' is pretty obvious, as there is a definite bootloader to chain to. But with Syslinux, it is only able to load files residing on the same partition as the configuration file. Thus, if you have another version of Linux on a separate partition, without a shared {{ic|/boot}}, it becomes necessary to employ Extlinux. Essentially, Extlinux can be installed on the partition superblock and be called as a separate bootloader from the MBR installed by Syslinux. Extlinux is part of the Syslinux project and is included with the {{Pkg|syslinux}} package.

+

+

The following instructions assume you have Syslinux installed already. These instructions will also assume that the typical Arch Linux configuration path of {{ic|/boot/syslinux}} is being used and the chainloaded {{ic|/}} is on {{ic|/dev/sda3}}.

+

+

From a booted Linux (likely the partition that Syslinux is set up to boot), mount the other root partition to your desired mount point. In this example this will be {{ic|/mnt}}. Also, if a separate {{ic|/boot}} partition is used on the second operating system, that will also need to be mounted. The example assumes this is {{ic|/dev/sda2}}.

+

# mount /dev/sda3 /mnt

+

# mount /dev/sda2 /mnt/boot (only necessary for separate /boot)

+

Install Extlinux and copy necessary {{ic|*.c32}} files

+

# extlinux -i /mnt/boot/syslinux

+

# cp /usr/lib/syslinux/{chain,menu}.c32 /mnt/boot/syslinux

+

+

Create {{ic|/mnt/boot/syslinux/syslinux.cfg}}. Below is an example:

+

{{hc|/boot/syslinux/syslinux.cfg '''on /dev/sda3'''|<nowiki>

+

timeout 10

+

+

ui menu.c32

+

+

+

label Other Linux

+

linux /boot/vmlinuz-linux

+

initrd /boot/initramfs-linux.img

+

append root=/dev/sda3 ro quiet

+

+

+

label MAIN

+

com32 chain.c32

+

append hd0 0</nowiki>

+

}}

+

+

taken from [[User:Djgera|Djgera's user wiki page]].

=== Using memtest ===

=== Using memtest ===

−

Use this {{ic|LABEL}} section to launch memtest (install the {{Pkg|memtest86+}} package):

+

Install {{Pkg|memtest86+}} from the [[official repositories]].

+

+

Use this {{ic|LABEL}} section to launch [[Wikipedia:Memtest86|memtest]]:

+

{{hc|/boot/syslinux/syslinux.cfg|

+

...

LABEL memtest

LABEL memtest

MENU LABEL Memtest86+

MENU LABEL Memtest86+

LINUX ../memtest86+/memtest.bin

LINUX ../memtest86+/memtest.bin

+

...

+

}}

=== HDT ===

=== HDT ===

−

HDT (Hardware Detection Tool) displays hardware information. Like before, the {{ic|.c32}} file has to be copied or symlinked from {{ic|/boot/syslinux/}}.

−

For PCI info, either copy or symlink {{ic|/usr/share/hwdata/pci.ids}} to {{ic|/boot/syslinux/pci.ids}}

+

[http://hdt-project.org/ HDT (Hardware Detection Tool)] displays hardware information. Like before, the {{ic|.c32}} file has to be copied or symlinked from {{ic|/boot/syslinux/}}.

+

For PCI info, either copy or symlink {{ic|/usr/share/hwdata/pci.ids}} to {{ic|/boot/syslinux/pci.ids}} and add the following to your configuration file:

+

{{hc|/boot/syslinux/syslinux.cfg|

LABEL hdt

LABEL hdt

MENU LABEL Hardware Info

MENU LABEL Hardware Info

COM32 hdt.c32

COM32 hdt.c32

+

}}

=== Reboot and power off ===

=== Reboot and power off ===

−

Use the following sections to reboot or power off your machine:

+

Use the following sections to reboot or power off your machine:

+

{{hc|/boot/syslinux/syslinux.cfg|

LABEL reboot

LABEL reboot

MENU LABEL Reboot

MENU LABEL Reboot

Line 261:

Line 371:

MENU LABEL Power Off

MENU LABEL Power Off

COMBOOT poweroff.com

COMBOOT poweroff.com

+

}}

+

+

=== Clear menu ===

−

=== Clear Menu ===

To clear the screen when exiting the menu, add the following line:

To clear the screen when exiting the menu, add the following line:

+

{{hc|/boot/syslinux/syslinux.cfg|

MENU CLEAR

MENU CLEAR

+

}}

=== Keyboard remapping ===

=== Keyboard remapping ===

+

If you often have to edit your boot parameters, you might want to remap your keyboard layout. This allows you to enter "=", "/" and other characters easily on a non-US keyboard.

If you often have to edit your boot parameters, you might want to remap your keyboard layout. This allows you to enter "=", "/" and other characters easily on a non-US keyboard.

−

First you have to create a compatible keymap (for example a german one):

+

First you have to create a compatible keymap (for example a German one):

−

cp /usr/share/kbd/keymaps/i386/qwerty/us.map.gz ./

+

# cp /usr/share/kbd/keymaps/i386/qwerty/us.map.gz ./

−

cp /usr/share/kbd/keymaps/i386/qwertz/de.map.gz ./

+

# cp /usr/share/kbd/keymaps/i386/qwertz/de.map.gz ./

−

gunzip {de,us}.map.gz

+

# gunzip {de,us}.map.gz

−

mv de.{,k}map

+

# mv de.{,k}map

−

mv us.{,k}map

+

# mv us.{,k}map

−

keytab-lilo de > de.ktl

+

# keytab-lilo de > de.ktl

+

+

The last command has to be run as root, otherwise it won't work.

Copy {{ic|de.ktl}} as root to {{ic|/boot/syslinux/}} and set ownership to root:

Copy {{ic|de.ktl}} as root to {{ic|/boot/syslinux/}} and set ownership to root:

−

chown root:root /boot/syslinux/de.ktl

+

# chown root:root /boot/syslinux/de.ktl

−

Now edit {{ic|syslinux.conf}} and add

+

Now edit {{ic|syslinux.conf}} and add:

+

{{hc|/boot/syslinux/syslinux.cfg|

KBDMAP de.ktl

KBDMAP de.ktl

+

}}

+

+

=== Hiding the menu ===

+

+

Use the option:

+

{{hc|/boot/syslinux/syslinux.cfg|

+

MENU HIDDEN

+

}}

+

to hide the menu while displaying only the timeout. Press any key to bring up the menu.

+

+

== Troubleshooting ==

+

+

=== Using the Syslinux prompt===

−

==Troubleshooting==

+

You can type in the {{ic|LABEL}} name of the entry that you want to boot (as per your {{ic|syslinux.cfg}}). If you used the example configurations, just type:

−

===I have a Syslinux Prompt - Yikes!===

+

−

You can type in the {{ic|LABEL}} name of the entry that you want to boot (as per your {{ic|syslinux.cfg}}). If you used the example configs, just type:

+

boot: arch

boot: arch

−

If you get an error that the config file could not be loaded, you can pass your needed boot parameters, e.g.:

+

If you get an error that the configuration file could not be loaded, you can pass your needed boot parameters, e.g.:

If you do not have access to {{ic|boot:}} in ramfs, and therefore temporarily unable to boot kernel again,

+

If you do not have access to {{ic|boot:}} in [[Ramdisk|ramfs]], and therefore temporarily unable to boot kernel again,

+

:1. Create a temporary directory, in order to mount your root partition (if it does not exist already):

+

# mkdir -p /new_root

+

:2. Mount {{ic|/}} under {{ic|/new_root}} (in case {{ic|/boot/}} is on the same partition, otherwise you will need to mount them both):

+

{{Note|Busybox cannot mount {{ic|/boot}} if it is on its own ext2 partition.}}

+

# mount /dev/sd[a-z][1-9] /new_root

−

1) Create temp directory, in order to mount your root partition (if it does not exist already):

+

:3. Use {{ic|vim}} and edit {{ic|syslinux.cfg}} again to suit your needs and save file.

+

:4. Reboot.

−

mkdir -p /new_root

+

==== Fsck fails on root partition ====

−

2) Mount {{ic|/}} under {{ic|/new_root}} (in case {{ic|/boot/}} is on the same partition, otherwise you will need to mount them both):

+

In the case of a badly corrupted root partition (in which the journal is damaged), open the Syslinux emergency shell, mount the root file system:

−

{{Note|If {{ic|/boot}} is on its own ext2 partition then busybox cannot mount it.}}

+

−

+

−

mount /dev/sd[a-z][1-9] /new_root

+

−

3) Use {{ic|vim}} and edit {{ic|syslinux.cfg}} again to suit your needs and save file.

+

# mount /dev/''root partition'' /new_root

+

And grab the tune2fs binary from the root partition (it is not included in Syslinux):

+

# cp /new_root/sbin/tune2fs /sbin/

−

4) Reboot.

+

Follow the instructions at [https://wiki.archlinux.org/index.php/Fsck#ext2fs_:_no_external_journal ext2fs: no external journal] to create a new journal for the root partition.

−

===No Default or UI found on some computers===

+

=== No Default or UI found on some computers ===

−

Certain motherboard manufacturers have less compatibility for booting from USB devices than others. While an ext4 formatted USB drive may boot on a more recent computer, some computers may hang if the boot partition containing the kernel and initrd are not on a fat16 partition. To prevent an older machine from loading ldlinux and failing to read {{ic|syslinux.cfg}}, use cfdisk to create a fat16 partition (<=2GB) and format with

+

−

pacman -S dosfstools

+

−

mkfs.msdos -F 16 /dev/sda1

+

−

then install and configure syslinux.

+

Certain motherboard manufacturers have less compatibility for booting from USB devices than others. While an ext4 formatted USB drive may boot on a more recent computer, some computers may hang if the boot partition containing the ''kernel'' and ''initrd'' are not on a FAT16 partition. To prevent an older machine from loading {{ic|ldlinux}} and failing to read {{ic|syslinux.cfg}}, use {{ic|cfdisk}} to create a FAT16 partition (<=2GB) and format using {{Pkg|dosfstools}}:

+

# mkfs.msdos -F 16 /dev/sda1

−

===MISSING OPERATING SYSTEM===

+

then install and configure Syslinux.

−

If you get this message, check if the partition that contains {{ic|/boot}} has the boot flag enabled. If the flag is enabled, then perhaps this partition starts at sector 1 rather than sector 63 or 2048. Check this with fdisk -l. If it starts at sector 1, you can move the partition(s) with gparted from a rescue disk. Or, if you have a separate boot partition, you can back up /boot with

+

=== Missing operating system ===

−

cp -a /boot /boot.bak

+

−

and then boot up with the arch install disk. Next, use cfdisk to delete the /boot partition, and recreate it. This time it should begin at the proper sector, 63. Now mount your partitions and chroot into your mounted system, as described in the beginners guide. Restore /boot with the command

+

If you get this message, check if the partition that contains {{ic|/boot}} has the boot flag enabled. If the flag is enabled, then perhaps this partition starts at sector 1 rather than sector 63 or 2048. Check this with {{ic|fdisk -l}}. If it starts at sector 1, you can move the partition(s) with {{ic|gparted}} from a rescue disk. Or, if you have a separate boot partition, you can back up {{ic|/boot}} with

−

cp -a /boot.bak/* /boot

+

# cp -a /boot /boot.bak

−

Check if /etc/fstab is correct. Then run

+

and then boot up with the Arch install disk. Next, use {{ic|cfdisk}} to delete the {{ic|/boot}} partition, and recreate it. This time it should begin at the proper sector, '''63'''. Now mount your partitions and {{ic|chroot}} into your mounted system, as described in the beginners guide. Restore {{ic|/boot}} with the command

−

/usr/sbin/syslinux-install_update -iam

+

# cp -a /boot.bak/* /boot

+

Check if {{ic|/etc/fstab}} is correct, run:

+

# syslinux-install_update -iam

and reboot.

and reboot.

−

===Windows boots up! No Syslinux!===

+

=== Windows boots up, ignoring Syslinux ===

+

'''Solution:''' Make sure the partition that contains {{ic|/boot}} has the boot flag enabled. Also, make sure the boot flag is not enabled on the Windows partition. See the installation section above.

'''Solution:''' Make sure the partition that contains {{ic|/boot}} has the boot flag enabled. Also, make sure the boot flag is not enabled on the Windows partition. See the installation section above.

−

The MBR that comes with syslinux looks for the first active partition that has the boot flag set. The Windows partition was likely found first and had the boot flag set. If you wanted, you could use the MBR that Windows or MS-DOS fdisk provides.

+

The MBR that comes with Syslinux looks for the first active partition that has the boot flag set. The Windows partition was likely found first and had the boot flag set. If you wanted, you could use the MBR that Windows or MS-DOS {{ic|fdisk}} provides.

−

===Menu entries do nothing===

+

=== Menu entries do nothing ===

−

You select a menu entry and it does nothing, it just "refreshes" the menu. This usually means that you have an error in your {{ic|syslinux.cfg}} file. Hit {{Keypress|Tab}} to edit your boot parameters. Alternatively, press {{Keypress|Esc}} and type in the LABEL of your boot entry (e.g. ''arch'').

+

−

===Cannot remove ldlinux.sys===

+

You select a menu entry and it does nothing, it just ''"refreshes"'' the menu. This usually means that you have an error in your {{ic|syslinux.cfg}} file. Hit {{Keypress|Tab}} to edit your boot parameters. Alternatively, press {{Keypress|Esc}} and type in the {{ic|LABEL}} of your boot entry (e.g. ''arch'').

−

The {{ic|ldlinux.sys}} file has the immutable attribute set, which prevents it from being deleted or overwritten. This is because the sector location of the file must not change or else Syslinux has to be reinstalled. To remove it, run:

+

=== Cannot remove ldlinux.sys ===

+

The {{ic|ldlinux.sys}} file has the immutable attribute set, which prevents it from being deleted or overwritten. This is because the sector location of the file must not change or else Syslinux has to be reinstalled. To remove it, run:

# chattr -i /boot/syslinux/ldlinux.sys

# chattr -i /boot/syslinux/ldlinux.sys

# rm /boot/syslinux/ldlinux.sys

# rm /boot/syslinux/ldlinux.sys

−

===A white block on the upper left corner appears when a kernel is loaded with modesetting on in early stage and when using vesamenu===

+

=== White block in upper left corner when using vesamenu ===

−

'''Brain0''' said:

+

−

''As of linux-3.0, the modesetting driver tries to keep the current contents of the screen after changing the resolution (at least it does so with my Intel, when having syslinux in text mode). It seems that this goes wrong when combined with the vesamenu module in syslinux (the white block is actually an attempt to keep the syslinux menu, but the driver fails to capture the picture from vesa graphics mode).''

+

−

If you have a custom resolution and a vesamenu with early modesetting, try to append the following in {{ic|syslinux.cfg}} to remove the white block and continue in graphics mode:

+

Problem:

+

''As of linux-3.0, the modesetting driver tries to keep the current contents of the screen after changing the resolution (at least it does so with my Intel, when having Syslinux in text mode). It seems that this goes wrong when combined with the vesamenu module in Syslinux (the white block is actually an attempt to keep the Syslinux menu, but the driver fails to capture the picture from vesa graphics mode).''

+

If you have a custom resolution and a {{ic|vesamenu}} with early modesetting, try to append the following in {{ic|syslinux.cfg}} to remove the white block and continue in graphics mode:

Syslinux boot process

Load MBR. At boot, the computer loads the MBR (/usr/lib/syslinux/mbr.bin).

Search active partition. The MBR looks for the partition that is marked as active (boot flag).

Execute volume boot record. Once found, the volume boot record (VBR) will be executed. In the case of ext2/3/4 and FAT12/16/32, the starting sector of ldlinux.sys is hard-coded into the VBR.

Execute ldlinux.sys. The VBR will execute (ldlinux.sys). Therefore, if the location of ldlinux.sys changes, Syslinux will no longer boot. (In the case of Btrfs, the above method will not work since files move around resulting in the sector location of ldlinux.sys changing. Therefore, the entire Syslinux code needs to be stored outside the filesystem. The code is stored in the sectors following the VBR.)

Search configuration file. Once Syslinux is fully loaded, it looks for a configuration file, either extlinux.conf or syslinux.cfg.

Load configuration. If one is found, the configuration file is loaded. If no configuration file is found, you will be given a Syslinux prompt.

Installation

Syslinux UEFI support is present in version 6.00-preXX and is currently of alpha quality. See UEFI_Bootloaders#SYSLINUX for more info.

Automatic Install

The syslinux-install_update script will install Syslinux, copy/symlink *.c32 modules to /boot/syslinux, set the boot flag and install the boot code in the MBR. It can handle MBR and GPT disks along with software RAID.

1. If you use a separate boot partition make sure that it is mounted. Check with lsblk; if you don't see a /boot mountpoint, mount it before you go any further.

Note: For this to work with GPT, the gptfdisk package is needed as the backend for setting the boot flag.

Manual install

Note:

If you are unsure of which partition table you are using (MBR or GPT), you are likely using the MBR partition table. Most of the time GPT will create a special MBR-style partition (type 0xEE) using the whole disk which will be displayed with the following command:

# fdisk -l /dev/sda

or alternatively:

# sgdisk -p /dev/sda

will show "GPT: not present" if it is not a GPT disk.

If you are trying to rescue an installed system with a live CD, be sure to chroot into it before executing these commands. If you do not chroot first, you must prepend all file paths (not /dev/ paths) with the mount point.

Your boot partition, on which you plan to install Syslinux, must contain a FAT, ext2, ext3, ext4, or Btrfs file system. You should install it on a mounted directory—not a /dev/sdXY device. You do not have to install it on the root directory of a file system, e.g., with device /dev/sda1 mounted on /boot. You can install Syslinux in the syslinux directory:

# mkdir /boot/syslinux
# extlinux --install /boot/syslinux

This is assuming the target partition is ext[234]. If it is FAT, the syslinux command must be used instead.

An alternate MBR which Syslinux provides is: altmbr.bin. This MBR does not scan for bootable partitions; instead, the last byte of the MBR is set to a value indicating which partition to boot from. Here is an example of how altmbr.bin can be copied into position:

In this case, a single byte of value 5 is appended to the contents of altmbr.bin and the resulting 440 bytes are written to the MBR on device sda. Syslinux was installed on the first logical partition (/dev/sda5) of the disk.

Graphical boot menu

Syslinux also allows you to use a graphical boot menu. To use it, copy the vesamenu COM32 module to your Syslinux folder:

# cp /usr/lib/syslinux/vesamenu.c32 /boot/syslinux/

If /boot is the same partition as /, a symlink will also work:

# ln -s /usr/lib/syslinux/vesamenu.c32 /boot/syslinux/

This config uses the same menu design as the Arch Install CD. The background file can be found there too. To make sure that your system can boot with this config, check that it is pointing to the correct partition.

Since Syslinux 3.84, vesamenu.c32 supports the MENU RESOLUTION $WIDTH $HEIGHT directive.
To use it, insert MENU RESOLUTION 1440 900 into your config for a 1440x900 resolution.
The background picture has to have exactly the right resolution, however, as Syslinux will otherwise refuse to load the menu.

Auto boot

If you don't want to see the Syslinux menu at all, comment out all UI commands and make sure there is a DEFAULT set in your syslinux.cfg.

Chainloading

If you want to chainload other operating systems (such as Windows) or boot loaders, copy (or symlink) the chain.c32 module to the Syslinux directory (for details, see the instructions in the previous section). Then create a section in the configuration file:

/boot/syslinux/syslinux.cfg

...
LABEL windows
MENU LABEL Windows
COM32 chain.c32
APPEND hd0 3
...

hd0 3 is the third partition on the first BIOS drive - drives are counted from zero, but partitions are counted from one.

If you are unsure about which drive your BIOS thinks is "first", you can instead use the MBR identifier, or if you are using GPT, the filesystem labels. To use the MBR identifier, run the command

Chainloading other Linux systems

Chainloading another bootloader such as Windows' is pretty obvious, as there is a definite bootloader to chain to. But with Syslinux, it is only able to load files residing on the same partition as the configuration file. Thus, if you have another version of Linux on a separate partition, without a shared /boot, it becomes necessary to employ Extlinux. Essentially, Extlinux can be installed on the partition superblock and be called as a separate bootloader from the MBR installed by Syslinux. Extlinux is part of the Syslinux project and is included with the syslinux package.

The following instructions assume you have Syslinux installed already. These instructions will also assume that the typical Arch Linux configuration path of /boot/syslinux is being used and the chainloaded / is on /dev/sda3.

From a booted Linux (likely the partition that Syslinux is set up to boot), mount the other root partition to your desired mount point. In this example this will be /mnt. Also, if a separate /boot partition is used on the second operating system, that will also need to be mounted. The example assumes this is /dev/sda2.

Using memtest

HDT

HDT (Hardware Detection Tool) displays hardware information. Like before, the .c32 file has to be copied or symlinked from /boot/syslinux/.
For PCI info, either copy or symlink /usr/share/hwdata/pci.ids to /boot/syslinux/pci.ids and add the following to your configuration file:

No Default or UI found on some computers

Certain motherboard manufacturers have less compatibility for booting from USB devices than others. While an ext4 formatted USB drive may boot on a more recent computer, some computers may hang if the boot partition containing the kernel and initrd are not on a FAT16 partition. To prevent an older machine from loading ldlinux and failing to read syslinux.cfg, use cfdisk to create a FAT16 partition (<=2GB) and format using dosfstools:

# mkfs.msdos -F 16 /dev/sda1

then install and configure Syslinux.

Missing operating system

If you get this message, check if the partition that contains /boot has the boot flag enabled. If the flag is enabled, then perhaps this partition starts at sector 1 rather than sector 63 or 2048. Check this with fdisk -l. If it starts at sector 1, you can move the partition(s) with gparted from a rescue disk. Or, if you have a separate boot partition, you can back up /boot with

# cp -a /boot /boot.bak

and then boot up with the Arch install disk. Next, use cfdisk to delete the /boot partition, and recreate it. This time it should begin at the proper sector, 63. Now mount your partitions and chroot into your mounted system, as described in the beginners guide. Restore /boot with the command

# cp -a /boot.bak/* /boot

Check if /etc/fstab is correct, run:

# syslinux-install_update -iam

and reboot.

Windows boots up, ignoring Syslinux

Solution: Make sure the partition that contains /boot has the boot flag enabled. Also, make sure the boot flag is not enabled on the Windows partition. See the installation section above.

The MBR that comes with Syslinux looks for the first active partition that has the boot flag set. The Windows partition was likely found first and had the boot flag set. If you wanted, you could use the MBR that Windows or MS-DOS fdisk provides.

Menu entries do nothing

You select a menu entry and it does nothing, it just "refreshes" the menu. This usually means that you have an error in your syslinux.cfg file. Hit Template:Keypress to edit your boot parameters. Alternatively, press Template:Keypress and type in the LABEL of your boot entry (e.g. arch).

Cannot remove ldlinux.sys

The ldlinux.sys file has the immutable attribute set, which prevents it from being deleted or overwritten. This is because the sector location of the file must not change or else Syslinux has to be reinstalled. To remove it, run:

White block in upper left corner when using vesamenu

Problem:
As of linux-3.0, the modesetting driver tries to keep the current contents of the screen after changing the resolution (at least it does so with my Intel, when having Syslinux in text mode). It seems that this goes wrong when combined with the vesamenu module in Syslinux (the white block is actually an attempt to keep the Syslinux menu, but the driver fails to capture the picture from vesa graphics mode).

If you have a custom resolution and a vesamenu with early modesetting, try to append the following in syslinux.cfg to remove the white block and continue in graphics mode: