[syslinux] [extlinux] Failed to load ldlinux.c32 with btrfs subvolume
erik at Broadlux.com
erik at Broadlux.com
Tue Oct 1 15:32:48 PDT 2019
I also tried the "btrfs subvolume set-default ..." approach without
using rootflags=subvol=/root. It did not work with the same error message.
Thank you for your help.
On 10/1/19 2:52 PM, H. Peter Anvin wrote:
> On 2019-09-30 16:09, Erik via Syslinux wrote:
>> I am new to syslinux/extlinux. Can I boot from a linux btrfs subvolume? I am
>> getting "Failed to load ldlinux.c32" when I attempt to boot from a btrfs
> I can confirm this as a problem. The algorithm for btrfs subvolume search
> seems to be completely braindead, and at least in the current Linux kernels
> there are ioctls that perform the entire subvolume identification for us;
> unfortunately they were added quite recently (kernel 4.18), but perhaps that
> is recent enough to do something saner than what we have now.
> Even worse, due to *another* bug, we don't even execute the subvolume search
> code (which appears to only search for the default subvolume for some reason,
> too) at all.
> Either way, *in general*, I recommend putting /boot on a separate partition
> anyway; there are some BIOSes which have problems accessing disks beyond some
> point, and putting /boot on a smallish separate partition at the beginning of
> the disk avoids that problem.
> That being said, there is absolutely no question that this is a problem, and
> it needs to be fixed. There is also no reason to use the subvolume name (which
> consumes precious space in the very early boot code) as we currently do;
> storing the subvolume ID is far more efficient.
> If I'm reading the code correctly, it currently expects the root of the btrfs
> mount tree to be the default subvolume, so the problem occurs when the root of
> the tree of the mounted device is not the default subvolume. You could work
> around this by using "btrfs subvolume set-default" around the call to
> extlinux. You might even want to consider if that doesn't make sense in
> general for the preferred root of your filesystem.
More information about the Syslinux