On Tue, May 20, 2014 1:52 pm, Anatol Pomozov wrote:> Ok, we've figured out potential cause of the problem. The next > question how to minimize the size of ldlinux.sys? > > BTW looking at official (?) binary > https://www.kernel.org/pub/linux/utils/boot/syslinux/Testing/6.03/syslinux-6.03-pre11.tar.xz > I see that their size is also more than 64KActually, there is *no* 64KiB limit on btrfs. Look at btrfs-progs (ctree.h:830): " /* * We don't want to overwrite 1M at the beginning of device, even though * there is our 1st superblock at 64k. Some possible reasons: * - the first 64k blank is useful for some boot loader/manager * - the first 1M could be scratched by buggy partitioner or somesuch */ #define BTRFS_BLOCK_RESERVED_1M_FOR_SUPER ((u64)1024 * 1024) " 1MiB seems to be a reasonable size to fit bootsector + LDLINUX.SYS in. I don't know exactly how Syslinux is handling this, but it should be using the whole available space (1MiB instead). -- Paulo Alcantara, C.E.S.A.R Speaking for myself only.
> > On Tue, May 20, 2014 1:52 pm, Anatol Pomozov wrote: > > > Ok, we've figured out potential cause of the problem. The next > > question how to minimize the size of ldlinux.sys? > > > > BTW looking at official (?) binary > > https://www.kernel.org/pub/linux/utils/boot/syslinux/Testing/6.03/syslinux-6.03-pre11.tar.xz > > I see that their size is also more than 64K > > Actually, there is *no* 64KiB limit on btrfs. Look at btrfs-progs > (ctree.h:830): > > " > /* > * We don't want to overwrite 1M at the beginning of device, even though > * there is our 1st superblock at 64k. Some possible reasons: > * - the first 64k blank is useful for some boot loader/manager > * - the first 1M could be scratched by buggy partitioner or somesuch > */ > #define BTRFS_BLOCK_RESERVED_1M_FOR_SUPER ((u64)1024 * 1024) > " > > 1MiB seems to be a reasonable size to fit bootsector + LDLINUX.SYS in. I > don't know exactly how Syslinux is handling this, but it should be using > the whole available space (1MiB instead). > > -- > Paulo Alcantara, C.E.S.A.R > Speaking for myself only.The issue about the 64KB size (for bootsector + ADV + ldlinux.sys) is that *Syslinux* (as of 6.03-pre11) doesn't know _yet_ how to take advantage of the additional available space in Btrfs (patches are welcome). That's the reason for suggesting workarounds instead of real solutions. At any rate, the 64KB issue doesn't explain every and all the problems reported about Syslinux in Btrfs. Regards, Ady.
On 05/20/2014 12:24 PM, Paulo Alcantara wrote:> > Actually, there is *no* 64KiB limit on btrfs. Look at btrfs-progs > (ctree.h:830): > > " > /* > * We don't want to overwrite 1M at the beginning of device, even though > * there is our 1st superblock at 64k. Some possible reasons: > * - the first 64k blank is useful for some boot loader/manager > * - the first 1M could be scratched by buggy partitioner or somesuch > */ > #define BTRFS_BLOCK_RESERVED_1M_FOR_SUPER ((u64)1024 * 1024) > " > > 1MiB seems to be a reasonable size to fit bootsector + LDLINUX.SYS in. I > don't know exactly how Syslinux is handling this, but it should be using > the whole available space (1MiB instead). >I have tried to get a formal ruling on the use of this from the btrfs crowd, but haven't gotten one yet. I might need to give up at playing it nice and Just Do It[TM]. http://www.spinics.net/lists/linux-btrfs/msg34117.html -hpa
Geert Stappers
2014-May-21 04:26 UTC
[syslinux] "EDD Load error" on btrfs, patch committed
Op 2014-05-20 om 16:28 schreef H. Peter Anvin:> On 05/20/2014 12:24 PM, Paulo Alcantara wrote: > > > > Actually, there is *no* 64KiB limit on btrfs. Look at btrfs-progs > > (ctree.h:830): > > > > " > > /* > > * We don't want to overwrite 1M at the beginning of device, even though > > * there is our 1st superblock at 64k. Some possible reasons: > > * - the first 64k blank is useful for some boot loader/manager > > * - the first 1M could be scratched by buggy partitioner or somesuch > > */ > > #define BTRFS_BLOCK_RESERVED_1M_FOR_SUPER ((u64)1024 * 1024) > > " > > > > 1MiB seems to be a reasonable size to fit bootsector + LDLINUX.SYS in. I > > don't know exactly how Syslinux is handling this, but it should be using > > the whole available space (1MiB instead). > > > > I have tried to get a formal ruling on the use of this from the btrfs > crowd, but haven't gotten one yet. I might need to give up at playing > it nice and Just Do It[TM].There was an patch committed on the btrfs branch in git. Is that ready for testing?> > http://www.spinics.net/lists/linux-btrfs/msg34117.htmlGroeten Geert Stappers -- Leven en laten leven
Hi On Tue, May 20, 2014 at 12:48 PM, Ady <ady-sf at hotmail.com> wrote:> >> >> On Tue, May 20, 2014 1:52 pm, Anatol Pomozov wrote: >> >> > Ok, we've figured out potential cause of the problem. The next >> > question how to minimize the size of ldlinux.sys? >> > >> > BTW looking at official (?) binary >> > https://www.kernel.org/pub/linux/utils/boot/syslinux/Testing/6.03/syslinux-6.03-pre11.tar.xz >> > I see that their size is also more than 64K >> >> Actually, there is *no* 64KiB limit on btrfs. Look at btrfs-progs >> (ctree.h:830): >> >> " >> /* >> * We don't want to overwrite 1M at the beginning of device, even though >> * there is our 1st superblock at 64k. Some possible reasons: >> * - the first 64k blank is useful for some boot loader/manager >> * - the first 1M could be scratched by buggy partitioner or somesuch >> */ >> #define BTRFS_BLOCK_RESERVED_1M_FOR_SUPER ((u64)1024 * 1024) >> " >> >> 1MiB seems to be a reasonable size to fit bootsector + LDLINUX.SYS in. I >> don't know exactly how Syslinux is handling this, but it should be using >> the whole available space (1MiB instead). >> >> -- >> Paulo Alcantara, C.E.S.A.R >> Speaking for myself only. > > The issue about the 64KB size (for bootsector + ADV + ldlinux.sys) is > that *Syslinux* (as of 6.03-pre11) doesn't know _yet_ how to take > advantage of the additional available space in Btrfs (patches are > welcome).FYI: I compiled syslinux without DEBUG options - the sys file size came down to 60K. Now I am able to boot from btrfs. Thanks for your help! I did not try the recent patches from Peter yet.> That's the reason for suggesting workarounds instead of real > solutions. > > At any rate, the 64KB issue doesn't explain every and all the > problems reported about Syslinux in Btrfs.