[syslinux] Syslinux 6.03pre18 cannot boot kernel from btrfs

Anatol Pomozov anatol.pomozov at gmail.com
Fri Jul 11 18:35:30 PDT 2014


Hi

I keep trying syslinux on my testing machine with BIOS and btrfs on
root partition. I use syslinux 6.03pre18, kernel 3.15.4.

A number of btrfs related bugs has been fixed in syslinux 6.03
recently, but I still see one more. Syslinux stops booting my kernel
from btrfs partition. The partition itself is fine - I can mount it
from other kernel booted from USB. The partition superblock is fine,
no errors in dmesg.

The problem happened to me several times recently. It appears after a
kernel update/initrd generation. To fix the problem I tried to
reinstall syslinux, kernel, regenerate initrd and after several
retries it helped. I do not know exact algorithm how to fix this
problem though.

I enabled syslinux debug and it says "Invalid boot magic". Thus the
problem either corrupted vmlinuz or, most likely, syslinux does not
read btrfs filesystem correctly.

I mounted my root partition and here is filefrag information about
/boot/* files [2]. Note to physical file offsets for vmlinuz and
initramfs, it is about 10^12 bytes and corresponds to 280G on
/dev/sda1. This number makes sense as my sda harddrive is 500G.

syslinux also reports numbers, see [1]. It says "EDD...." and I
believe the third field is disk offset, right? If so the number looks
suspiciously large, it is ~10^17. Could it be that syslinux has some
kind of integer overflow in calculating disk offsets? How syslinux (or
bios?) is able to load anything with such big offset?

Is there any additional information I can provide? What is the easiest
way to check that my vmlinuz file has correct "boot magic number"? I
would like to check that this file is not corrupted.

[1] http://bit.ly/1sJ61yb
[2] http://bit.ly/1m2eBCG


More information about the Syslinux mailing list