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

Ferenc Wagner wferi at niif.hu
Mon May 31 08:22:24 PDT 2010


"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?
-- 
Thanks,
Feri.




More information about the Syslinux mailing list