[syslinux] Why does the extlinux installer rewrite the first sector of extlinux.sys?

H. Peter Anvin hpa at zytor.com
Mon May 31 08:50:00 PDT 2010


On 05/31/2010 08:22 AM, Ferenc Wagner wrote:
> "H. Peter Anvin" <hpa at zytor.com> writes:
> 
>> On 05/30/2010 02:17 AM, Ferenc Wagner wrote:
>>
>>> I don't get the point of the write-patch-rewrite sequence.  Why is it
>>> done this way?  I mean, why patch the first sector if you rewrite it
>>> anyway?  Or why rewrite it, if you don't patch it?  (I didn't check
>>> whether patch_file_and_bootblock touches the first sector or not.)
>>
>> It needs to know where on the disk it will be allocated blocks by the
>> filesystem.
> 
> I understand that part.
> 
>> The patching is putting in pointers to the file itself into the file.
> 
> Do you mean that patching is done in memory, not on the disk?  Hmm, it
> looks like so.  That explains it.  So patch_file_and_bootblock() doesn't
> actually modify the on-disk file, right?

Right.

	-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