[syslinux] [PATCH 1/1] core: Check if ldlinux.sys exceeds the limit at its building time.

H. Peter Anvin hpa at zytor.com
Mon May 26 19:34:25 PDT 2014


Yes, 1 is the common code for all filesystem.  We only have to do special things for btrfs because of automatic storage rebalancing and and for XFS because of nonstandard VBR.

On May 26, 2014 6:57:49 PM PDT, Raphael S Carvalho <raphael.scarv at gmail.com> wrote:
>> On May 25, 2014 3:39 AM, "Geert Stappers" <stappers at stappers.nl>
>wrote:
>> >
>> >
>> > While going throug old posts found:
>> >
>> > Op 2013-08-31 om 17:01 schreef Raphael S.Carvalho:
>> > > Calc the size of ldlinux.sys from ldlinux.bin, and check if it
>exceeds
>> the limit.
>> > > ldlinux.sys must fit between the bootsector and two copies of ADV
>whose
>> size may vary.
>> > > Thus, the size of ldlinux.sys (limit) can be at most: 65536 - 2 *
>> ADV_SIZE - 512.
>> > >
>> > > Certain file systems (such as BTRFS and UFS2) will rely on
>ldlinux.sys
>> being installed on the 0-64k range,
>> > > thus it can't exceed the limit, otherwise the superblock would be
>> corrupted.
>>
>> Raphael/Paulo: does UFS2 have a hard 64kiB limit?  I know it's not
>> installed to the first sector where the first superblock is located.
>>
>> > IMNSHO is including core/ldlinux_limit.pl better
>> > than waiting for a better core/ldlinux_limit.pl
>>
>> This should be rendered obsolete and unnecessary with the recent
>patch for
>> ldlinux.sys on btrfs (but might be relevant for UFS2).
>>
>> --Gene
>
>Hi everyone, it's been a long time. Anyway, let's go to what really
>matters here.
>
>1) No, neither ufs1 nor ufs2 has support to the COW feature.
>That being said, ldlinux.sys can be installed as a regular file unlike
>BTRFS (should we fall back to this approach when ldlinux.sys size is
>greater than 64kb or make it a default decision for ufs1/2?). I don't
>know enough details of the installer, so here is my question: does it
>currently provide a way of patching the bootsector to point to a
>regular file rather than a fixed location?
>
>2) Unfortunately, ufs2 superblock location could be either 64K or
>256K, so we cannot assume the limit being higher than 64k.
>
>3) Regarding to the script, I think we actually need to shrink the
>core before applying it.
>With hpa's change (did it fix the btrfs problem at all?), the core is
>now theoretically allowed to grow further than the limit (e.g. for
>btrfs), right?!
>Also worth mentioning that there is a second version of this patch
>(reviewed by Matt, but wasn't applied due to the problems with the
>size of the core) that changes the script to dinamically gathers the
>ADV_SIZE from the respective header (as requested by Matt Fleming).
>
>4) Suppose that by re-working on the installer changes from my UFS1/2
>patchset, i.e. installing ldlinux.sys as a regular file instead (when
>ldlinux.sys is higher than 64KB?), it could be put on the queue of
>patches to go upstream. Right? Matt Fleming was about to apply it in
>the past, but then the limit problem showed up.
>
>Please tell me if I've missed some point here. Currently using digest
>mode, but I do really have to change it as replying each mail
>separately turns out to be very hard to accomplish.
>
>Thanks in advance,
>Raphael S. Carvalho

-- 
Sent from my mobile phone.  Please pardon brevity and lack of formatting.


More information about the Syslinux mailing list