Setting up SYSLINUX

tested on stretch, artful, Slackware 14.2, Slackware current

Installation

See syslinux-install. Recent versions of EXTLINUX are also capable to read XFS partitions. XFS support is only available since v5.01. Ubuntu has v6.03 but slackware has v4.07.

Bootable flag

Assuming MBR

fdisk -l /dev/sda | grep ^Disklabel

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

fdisk -l /dev/sda

BIOS / CSM / legacy

Put the primary boot-code in place

dd if=./bios/mbr/mbr.bin of=/dev/sda
#conv=notrunc

Deploy the secondary boot-code

mkdir /boot/syslinux/
./bios/extlinux/extlinux --install /boot/syslinux/
#--device /dev/sda1

for multiboot protocol support

cp -f ./bios/com32/lib/libcom32.c32 /boot/syslinux/
cp -f ./bios/com32/mboot/mboot.c32 /boot/syslinux/

to make a menu appear, also deploy libutil.c32 and menu.c32.

EFI

mkdir /boot/efi/EFI/syslinux
cp -r /usr/share/syslinux/efi64/* /boot/efi/EFI/syslinux

gdisk -l /dev/sda
efibootmgr --create --disk /dev/sda --part 1 --loader /EFI/syslinux/syslinux.efi --label "SYSLINUX"
efibootmgr -v

and check BootOrder: – you should see your new entry in first position

Setup

There are two kinds of boot prompts, the command-line based one and the menu, which looks as cool as LILO’s.

For the command-line prompt and timeout

    vi /boot/syslinux/syslinux.cfg
    vi /boot/efi/EFI/syslinux/syslinux.cfg

default XEN
prompt 1
timeout 30

label Linux
        linux /vmlinuz
        append root=/dev/sda1 ro vt.default_utf8=0 mitigations=off vga=791
        #initrd=/initrd.img
    #ipv6.disable=1

label XEN
        kernel mboot.c32
        append /xen.gz loglvl=info noreboot=true smt=1 ept=exec-sp --- /vmlinuz root=/dev/sda1 ro console=tty0 vt.default_utf8=0 mitigations=off vga=791 max_loop=128
        #--- /initrd.img
    #dom0=pvh dom0_mem=1024M,max:8192M

or for the menu to show up

    default menu.c32
    prompt 0
    menu title SYSLINUX

TODO

Ready to go

ls -lF /boot/syslinux/*.{cfg,sys,c32}
ls -lF /boot/xen.gz
ls -lF /boot/vmlinuz

shutdown -r now

More XEN options

debug

    #loglvl=all
    #pv-linear-pt=true

production

    #4096M 8192M 10240M 12288M
    #dom0_max_vcpus=1 dom0_vcpus_pin

Troubles with multiboot for NetBSD

fails

cp -i /usr/lib/syslinux/modules/bios/libcom32.c32 /tftpboot/
cp -i /usr/lib/syslinux/modules/bios/mboot.c32 /tftpboot/

vi /tftpboot/pxelinux.cfg/default

label NetBSD multiboot
com32 mboot.c32
append netbsd7/amd64/binary/kernel/netbsd-INSTALL.gz

but this is what I get so far

Invalid Multiboot image: neither ELF header nor a.out kludge found

More crash dump options

            #crashkernel=128M
            #crashkernel=128M@16M
            #crashkernel=auto
            #crashkernel=X@Y
            #crashkernel=0M-2G:128M,2G-6G:256M,6G-8G:512M,8G-:768M

Other pathes

Debian

ls -lF /usr/lib/syslinux/modules/bios/
ls -lF /usr/lib/EXTLINUX/*.bin

Ubuntu

ls -lF /usr/lib/syslinux/modules/bios/
ls -lF /usr/lib/SYSLINUX/*.bin

Deal with GPT/MBR

draft

in case of GPT/MBR

#dd if=/usr/share/syslinux/gptmbr.bin of=/dev/sda conv=notrunc

bootloader is on gpt3

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

Resources

EXTLINUX https://wiki.syslinux.org/wiki/index.php?title=EXTLINUX

Mboot.c32 http://www.syslinux.org/wiki/index.php?title=Mboot.c32

Installing Slackware Using GPT with a BIOS motherboard https://docs.slackware.com/howtos:slackware_admin:installing_with_gpt_without_uefi

How to install extlinux (syslinux) as a bootloader http://shallowsky.com/linux/extlinux.html

How to boot Linux with extlinux https://superuser.com/questions/743802/how-to-boot-linux-with-extlinux

Syslinux https://wiki.archlinux.org/index.php/syslinux

multiboot

msc-thesis/dfly-multiboot.md https://github.com/erszcz/msc-thesis/blob/master/dfly-multiboot.md

Mboot.c32 http://www.syslinux.org/wiki/index.php/Mboot.c32

efi

UEFI https://wiki.syslinux.org/wiki/index.php?title=Install#UEFI

UEFI Systems https://wiki.archlinux.org/index.php/syslinux#UEFI_Systems

xen

1 Xen Hypervisor Command Line Options https://xenbits.xen.org/docs/4.13-testing/misc/xen-command-line.html


HOME | GUIDES | BENCHMARKS | html