Setting up SYSLINUX

tested on Devuan/ascii, Ubuntu/artful, Slackware/14.2

Preliminary Note

If using MBR, make sure the needed partition has the bootable flag, for the mbr.bin bootcode to work,

fdisk -l /dev/sda

Also assuming you do NOT have a separate partition for /boot. I have / only as ext4, which EXTLINUX is able to read. Very recent versions of EXTLINUX are also capable to read XFS partitions – see the Building latest EXTLINUX section.

If you have XFS instead of EXT4 on Slackware Linux, see the From Scratch section below, as XFS support is only available since v5.01. Ubuntu has v6.03 but slackware has v4.07.

Install // Packages

Ubuntu artful,

apt install syslinux-utils extlinux

Avoiding Slackware 14.2’s obsolete v4.07,

ls -lhF /var/log/packages/syslinux*
#slackpkg install syslinux

Install // From Scratch

Install latest UCL library

#sbopkg -i ucl
#slackpkg install ucl

tar xzf ...
cd ...
nice make -j$j
nice make install

Install latest UPX

#sbopkg -i upx
#slackpkg install upx

tar xJf upx-3.95-src.tar.xz 
cd upx-3.95-src/src/
nice make -j$j
install -D upx.out /usr/local/bin/upx

Fetch the latest SYSLINUX stable

tar xzf syslinux-6.03.tar.gz 
cd syslinux-6.03

or testing

#tar xzf syslinux-6.04-pre1.tar.gz 
#cd syslinux-6.04-pre1

or current

#git clone --recursive git://
#cd syslinux

and proceed

which nasm
ls -lhF /usr/include/uuid/uuid.h
time nice make -j$j > make.log && echo BUILT
removepkg syslinux
nice make install > makeinstall.log && echo INSTALLED

which extlinux
ls -lhF /sbin/extlinux
extlinux -v
ls -lhF /usr/share/syslinux/mbr.bin
ls -lhF /usr/share/syslinux/efi64/syslinux.efi

Secondary Bootcode

extlinux --install /
#--device /dev/sda1
ls -lhF /ldlinux.c32 /ldlinux.sys

From source

cp -f /usr/share/syslinux/libcom32.c32 /
cp -f /usr/share/syslinux/mboot.c32 /
#cp -f /usr/share/syslinux/libutil.c32 /
#cp -f /usr/share/syslinux/menu.c32 /


cp -f /usr/lib/syslinux/modules/bios/libcom32.c32 /
cp -f /usr/lib/syslinux/modules/bios/mboot.c32 /
#cp -f /usr/lib/syslinux/modules/bios/libutil.c32 /
#cp -f /usr/lib/syslinux/modules/bios/menu.c32 /

Primary Bootcode

fdisk -l /dev/sda | grep ^Disklabel

In case you are using mbr.bin, you will have to MAKE THE PARTITION BOOTABLE,

cfdisk /dev/sda

From source

ls -lF /usr/share/syslinux/*.bin
dd if=/usr/share/syslinux/mbr.bin of=/dev/sda conv=notrunc
#dd if=/usr/share/syslinux/gptmbr.bin of=/dev/sda conv=notrunc


ls -lF /usr/lib/SYSLINUX/*.bin
dd if=/usr/lib/SYSLINUX/mbr.bin of=/dev/sda
#dd if=/usr/lib/SYSLINUX/gptmbr.bin of=/dev/sda


ls -lF /usr/lib/EXTLINUX/*.bin
dd if=/usr/lib/EXTLINUX/mbr.bin of=/dev/sda
#dd if=/usr/lib/EXTLINUX/gptmbr.bin of=/dev/sda


vi /extlinux.conf

default XEN
prompt 1
timeout 50

label Linux
    linux /boot/vmlinuz
    append root=/dev/sda1 ro ipv6.disable=1

label XEN
    kernel mboot.c32
    append /boot/xen.gz loglvl=info pv-linear-pt=true --- vmlinuz root=/dev/sda1 ro ipv6.disable=1
    #--- initrd.img
    #8192M 10240M 12288M

ls -lhF /*.{conf,sys,c32}
ls -lhF /xen.gz /vmlinuz



apt purge lilo
dpkg -l | grep grub
apt purge ...grub...

Slackware – no need to remove lilo, nothing is automated anyways, and there is no grub.


bootloader is on gpt3

#sgdisk /dev/sda --attributes=3:set:2
#sgdisk /dev/sda --attributes=3:show




Installing Slackware Using GPT with a BIOS motherboard

How to install extlinux (syslinux) as a bootloader

How to boot Linux with extlinux


Nethence | Pub | Lab | Pbraun | SNE Russia | xhtml