[syslinux] Using *Syslinux 6.02* on *BTRFS* volumes corrupts the superblock.

Raphael S Carvalho
2013-10-15T20:40:18Z

BTRFS file systems will be corrupted on 6.02 (mainstream) and some
previous versions.

DYNAMIC_DEBUG makes the core larger than the allowed.
Even before its introduction, building Syslinux with DEBUG_PORT
enabled would probably corrupt BTRFS images (IIRC) *if* ldlinux.sys
surpasses the maximum allowed size.

Besides, the installer isn't safe at all... The check could be easily
made there to avoid overwriting BTRFS superblocks. It simply install
ldlinux.sys blindly even when it could be done otherwise (Not good in
my opinion).

I compiled Syslinux with several options in order to analyze how the
size of ldlinux.sys behaves. Follow the log:

DYNAMIC_DEBUG DISABLED & DEBUG_PORT DISABLED:  60474 bytes
DYNAMIC_DEBUG ENABLED & DEBUG_PORT DISABLED: 67114 bytes
DYNAMIC_DEBUG DISABLED & DEBUG_PORT ENABLED: 65673 bytes
DYNAMIC_DEBUG ENABLED & DEBUG_PORT ENABLED: 65774 bytes

PS: ldlinux.sys can currently be at most 64000 bytes (ADV_SIZE: 512).
PS: Strangely, '*DYNAMIC_DEBUG ENABLED* WITH *DEBUG_PORT DISABLED*'
makes the core larger than with both options enabled.

Any comments on the matter *or not =) * would be really appreciated.
--
Raphael S. Carvalho