After commit 036fa4e1a8aefeba3, shouldn't bsCodeLen be adjusted to reflect added fields at the end ? Basically: -#define bsCodeLen (offsetof(struct boot_sector, bsSignature) - \ +#define bsCodeLen (offsetof(struct boot_sector, bsMagic) - \