[syslinux] chainboot from grub to syslinux in logical partition

H. Peter Anvin hpa at zytor.com
Fri Feb 27 16:13:31 PST 2009


Cynthia Flynn wrote:
> On Fri Feb 27 05:25:06 PST 2009, H. Peter Anvin wrote:
>> There is a bug in quite a few versions of Grub when it comes to
>> chainloading logical partitions: it passes bogus partition informations
>> to the chainloaded boot sector.  That's most likely what you are running
>> into.
> 
> Thanks. Could you point me at more detailed information about this bug? 
> I'm using the grub 0.97_3 port for FreeBSD so it would obviously help to 
> know whether this version is affected or not. All I found was the 
> following report, but since I'm using what the writer would refer to as 
> grub1 instead of grub2 and I'm not getting the error message he saw (or 
> indeed any) from grub itself, I don't imagine this is what you're 
> referring to:
> 
>    http://savannah.gnu.org/bugs/?8252
> 

There is a bit of subtlety in chainloading logical partitions.  There is
a copy of the partition information in memory which is passed to the VBR
in memory pointed to by DS:SI, but that doesn't work "straight off" for
a logical partition, because the partition record for a logical
partition isn't based at zero.  Therefore, the chainloader (or MBR) has
to adjust the offset to point to the absolute location of the VBR, since
the whole point is so that the VBR doesn't need to understand the format
of the disk outside its own partition.

At least at one point Grub didn't do this.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.




More information about the Syslinux mailing list