Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

How to Install Syslinux in Arch Linux?

  • Last Updated : 01 Feb, 2021

Syslinux is a bootloader for the Linux OS which runs on an MS-DOS/Windows FAT filesystem. It is intended to simplify the first-time installation of Linux, and for the creation of rescue and other special-purpose boot disks. When properly configured, SYSLINUX can be used to completely eliminate the need for the distribution of raw boot floppy images. A Syslinux floppy can be manipulated using standard MS-DOS (or any OS capable of accessing an MS-DOS filesystem) tools once it has been created. Compared to GRUB, Syslinux has pretty much taken a more minimalist approach. If memory serves, Syslinux supports a few formats and doesn’t require a secondary bootloader. It is mainly used for the creation of rescue and other special-purpose boot disks.

Installing Syslinux

Step 1: To install syslinux, type in the following command

sudo pacman -S syslinux

pacman installation of syslinux

Note: If you have an older version installed, a newer version will be overwritten and installed on your Linux. Before moving forward, you need to confirm the partition table of the installation of Arch Linux you are using. The partition table can either be MBR(MBR Partition table) or GPT(GUID Partition Table.

Step 2: If you are not sure, which partition table you are using, type in the following command

sudo blkid -s PTTYPE -o value /dev/sda gpt

sudo blkid -s PTTYPE -o value /dev/sda gpt

Step 3: Alternatively, you can also use the fdisk command as follows:

fdisk -l /dev/sda

fdisk -l /dev/sda

Step 4: Now copy all .c32 files from /usr/lib/syslinux/bios to /boot/syslinux, but first if you do not have the /boot/syslinux folder, create it first. You can do so using the following command :

# mkdir /boot/syslinux
# cp -r /usr/lib/syslinux/bios/*.c32 /boot/syslinux

Step 5: Next, use the extlinux command to install Syslinux on your ext4 filesystem.

# extlinux --install /boot/syslinux

Now, we will describe how to install syslinux both GPT and MBR Partition Tables:

Installing Syslinux For GUID Partition Table (GPT)

Step 1: First and foremost, bit 2 of the attributes have to be set for the boot partition as follows.

# sgdisk /dev/sda --attributes=1:set:2

Step 2: The following output should be shown if the given changes are correct.

# sgdisk /dev/sda --attributes=1:show 1:2:1 (legacy BIOS bootable)

Step 3: Finally, install the master boot record as follows:

# dd bs=440 conv=notrunc count=1 if=/usr/lib/syslinux/bios/gptmbr.bin of=/dev/sda

After successfully installing Syslinux we would get a boot menu like this :

Installing Syslinux For MBR Partition Table

Step 1: If the fdisk or blkid command showed you have the partition as mbr, install the master boot record as follows :

# dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/bios/mbr.bin of=/dev/sda

After successfully installing syslinux we would get a boot menu like this:

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!