[syslinux] Syslinux 6.03pre18 cannot boot kernel from btrfs

Gert Hulselmans hulselmansgert at gmail.com
Tue Jul 22 09:49:19 PDT 2014


I never had this problem with internal (SATA) disks, but I encountered it
when trying to boot from an external USB drive, but if you have a very old
BIOS,
it is possible that this also happens for you for internal drives.

> Some BIOSes have problems with booting USB drives larger than 128GiB
(137GB) (28-bit LBA limit).
> (If the drive can also be connected via SATA, it is entirely possible
that it will boots fine.)
> When Syslinux,another bootloader or an OS that uses BIOS calls to read
from the drive, wants to access any data beyond this 128GiB limit, it won't
get what it wants.

http://www.syslinux.org/wiki/index.php/Hardware_Compatibility#USB_drives_larger_than_128GiB_.28.3D137GB.29


Some now for most people obsolete info:
> Many computer BIOS will be unable to recognize hard disks over 137 GB,
> since they are limited to using only 28 bits to keep track of the LBA
> sector count (28-bit binaries can hold a maximum value of FFFFFFF Hex,
> or 268,435,455 sectors; if you multiply that by 512, you get:
> 137,438,952,960 bytes; thus, the 137GB size limit).

http://thestarman.pcministry.com/asm/mbr/Limits.htm

Greetings,
Gert




2014-07-18 19:01 GMT+02:00 Ady <ady-sf at hotmail.com>:

>
> > Hi
> >
> > On Fri, Jul 11, 2014 at 6:35 PM, Anatol Pomozov
> > <anatol.pomozov at gmail.com> wrote:
> > > 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
> >
> >
> > I was able to restore my machine by moving /boot folder to a separate
> > ext4 partition at the beginning of the disk.
> >
> > I have quite old PC BIOS machine with 500GB disk. I've had one large
> > partition where root and boot lived. When I initially installed the
> > system it booted fine, but after kernel reinstall it got broken as
> > described above. If I understand correctly syslinux uses BIOS
> > functionality to get access to the disk and BIOS cannot access it
> > above some limit (what is the limit btw, is it 1024 cylinder i.e.
> > 8GB?). And I guess reinstall process put my initrd/kernel above this
> > limit and syslinux was not able to load it. Does it sound right?
> >
> > Does it mean that one always need to put /boot to a separate partition
> > at the beginning of the disk?
> >
> > Also I believe grub does not have this '/boot' location restriction.
> > Does it mean that their stage1.5 blob contains sata drivers so
> > stage1.5 uses sata directly instead of BIOS EDD?
> >
>
> I doubt your "old" BIOS doesn't support LBA48 (if I understand
> correctly, it supports SATA already).
> I am going to guess that you also performed your tests with an
> updated mbr.bin.
> I am also going to guess that, during your tests, you (re)installed
> Syslinux manually (not with scripts).
> We should also discard the possibility of some other issue. For
> instance, if _some specific_ kernels are failing with other
> bootloaders after an update, then there is a chance that some update
> could be messing with Syslinux too, right?
>
> You seem to be suggesting that Syslinux is not really installed in
> EDD mode, or that the EDD mode is somehow failing (or buggy) when
> Syslinux is installed in Btrfs.
>
> Regards,
> Ady.
> _______________________________________________
> Syslinux mailing list
> Submissions to Syslinux at zytor.com
> Unsubscribe or set options at:
> http://www.zytor.com/mailman/listinfo/syslinux
>


More information about the Syslinux mailing list