[syslinux] chain.c32 Insane primary (MBR) partition

Ady ady-sf at hotmail.com
Wed Jan 8 07:48:35 PST 2014


> On 2014-01-03 08:07, Ady wrote:
> > The following boot entries:
> > #
> > COM32 chain.c32
> > APPEND fs ntldr=/bootmgr
> > #
> >
> > or:
> > #
> > COM32 chain.c32
> > APPEND hd0,1 ntldr=/bootmgr
> > #
> >
> > might result in the following error:
> >
> > #
> > Insane primary (MBR) partition.
> > Can't find myself on the drive I booted from.
> > #
> 
> The first line has been adjusted in later patches, but they are in 
> elflink and firmware branches only. Currently it would report:
> 
> Primary (MBR) with invalid offset and/or length.
> 
> This often happens if the disk/image is used on different computers 
> (e.g. on usb stick) and bios reports different disk sizes (usually +/- 1 
> sector). This is a bios bug (potentially nasty one, imagine GPT which 
> stores backup data at the end of the disk as well).
> 
> As current version of chain loader supports a good few potentially 
> dangerous operations - mostly related to fixing chs geometry to match 
> the one reported by bios - it's very strict at testing if everything is 
> OK before proceeding.
> 
> Current version also supports 'relax' option which turns off most sanity 
> checks, but it was added a good while after the v4 syslinuxes.
> 
> v4.05 works fine, as it was before merging new version of chain.
> 
 
I am not sure to which release(s) you are referring to when you say 
"current" chain.c32, but that's just a detail.

Indeed the patches for chain.c32 of 2013Feb14 were applied to the 
elflink and firmware branches, but not to the 4.xx branch.

Simultaneously, chain.c32 included in 4.06-pre2 (just before the 
application of the patches in the other branches) still works, and 
the one included in 4.06-pre3 (just after the patches in the other 
branches) fails as I previously described.

Performing a web search of this issue, the "solution" is always the 
same: to replace the chain.c32 file with the one from v.4.05, even 
when originally booting with Syslinux 4.06 or 4.07.

Probably, there are patches (not only for com32/chain) that were 
originally prepared for the 4.xx branch but were re-based for the 
elflink branch and applied to the latter. So perhaps some patches 
should be applied to the 4.xx branch too.

TIA,
Ady.


More information about the Syslinux mailing list