Gene Cumm
2014-May-25 14:27 UTC
[syslinux] [PATCH 1/1] core: Check if ldlinux.sys exceeds the limit at its building time.
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 exceedsthe limit.> > ldlinux.sys must fit between the bootsector and two copies of ADV whosesize 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.sysbeing installed on the 0-64k range,> > thus it can't exceed the limit, otherwise the superblock would becorrupted. 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.plThis should be rendered obsolete and unnecessary with the recent patch for ldlinux.sys on btrfs (but might be relevant for UFS2). --Gene
Paulo Alcantara
2014-May-26 20:44 UTC
[syslinux] [PATCH 1/1] core: Check if ldlinux.sys exceeds the limit at its building time.
Hi Genec, On Sun, May 25, 2014 11:27 am, Gene Cumm wrote:> 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.I have no much experience with UFS2 filesystem. I've just took a quick look at its internals and I can see that UFS2 places its superblock at either 64KiB or 256KiB (depending on the media being used). I haven't found any code that tries to read superblock from 256KiB, but I'm not sure if we can rely on it being always at 64KiB.>> 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).Agreed. IMHO, I would use this script for the UFS2 case - since UFS2 superblock is _not_ placed in a fixed offset like btrfs is. There wouldn't be room enough for Syslinux when the superblock is in 64KiB instead of 256KiB, for example. Raphael, as you're certainly more experienced with UFS2 than me, what do you think? -- Paulo Alcantara, C.E.S.A.R Speaking for myself only.
H. Peter Anvin
2014-May-26 21:48 UTC
[syslinux] [PATCH 1/1] core: Check if ldlinux.sys exceeds the limit at its building time.
On 05/26/2014 01:44 PM, Paulo Alcantara wrote:> Hi Genec, > > On Sun, May 25, 2014 11:27 am, Gene Cumm wrote: > >> 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. > > I have no much experience with UFS2 filesystem. I've just took a quick > look at its internals and I can see that UFS2 places its superblock at > either 64KiB or 256KiB (depending on the media being used). > > I haven't found any code that tries to read superblock from 256KiB, but > I'm not sure if we can rely on it being always at 64KiB. > >>> 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). > > Agreed. IMHO, I would use this script for the UFS2 case - since UFS2 > superblock is _not_ placed in a fixed offset like btrfs is. There wouldn't > be room enough for Syslinux when the superblock is in 64KiB instead of > 256KiB, for example. > > Raphael, as you're certainly more experienced with UFS2 than me, what do > you think? >Does UFS2 move files around autonomously? If not, let's just use the normal way of handling ldlinux.sys. -hpa
Gene Cumm
2014-May-27 01:32 UTC
[syslinux] [PATCH 1/1] core: Check if ldlinux.sys exceeds the limit at its building time.
On Sun, May 25, 2014 at 10:27 AM, Gene Cumm <gene.cumm at gmail.com> wrote:> 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.Momentarily confused UFS2 and the madness of XFS putting its superblock into sector 0, rendering it unusable for typical boot purposes. -- -Gene
H. Peter Anvin
2014-May-27 03:53 UTC
[syslinux] [PATCH 1/1] core: Check if ldlinux.sys exceeds the limit at its building time.
On 05/26/2014 06:32 PM, Gene Cumm wrote:> On Sun, May 25, 2014 at 10:27 AM, Gene Cumm <gene.cumm at gmail.com> wrote: > >> 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. > > Momentarily confused UFS2 and the madness of XFS putting its > superblock into sector 0, rendering it unusable for typical boot > purposes. >Yes... we're working around it with a special hack in the MBR. -hpa
Possibly Parallel Threads
- [PATCH 1/1] core: Check if ldlinux.sys exceeds the limit at its building time.
- [PATCH 1/1] core: Check if ldlinux.sys exceeds the limit at its building time.
- [PATCH 1/1] core: Check if ldlinux.sys exceeds the limit at its building time.
- [PATCH 1/1] core: Check if ldlinux.sys exceeds the limit at its building time.
- [PATCH 1/1] core: Check if ldlinux.sys exceeds the limit at its building time.