From 036fa4e1a8aefeba3f39ebd634fe242b0ab84ce3 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 25 Jan 2011 16:53:42 -0800 Subject: disk: put a magic at the end of the boot sector Put a magic signature at the end of the boot sector, and a backpointer to the code that contains the pointer to the main code extent. This is useful for integrity-checking tools, and could help the installer in the future. Signed-off-by: H. Peter Anvin --- libinstaller/syslxint.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libinstaller') diff --git a/libinstaller/syslxint.h b/libinstaller/syslxint.h index 14a7fc2b..80c40f76 100644 --- a/libinstaller/syslxint.h +++ b/libinstaller/syslxint.h @@ -1,6 +1,7 @@ /* ----------------------------------------------------------------------- * * * Copyright 2007-2008 H. Peter Anvin - All Rights Reserved + * Copyright 2009-2011 Intel Corporation; author: H. Peter Anvin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -156,6 +157,7 @@ void memcpy_from_sl(void *dst, const void *src, size_t len); #endif #define LDLINUX_MAGIC 0x3eb202fe +#define BS_MAGIC_VER (0x1b << 9) /* Patch area for disk-based installers */ struct patch_area { @@ -214,7 +216,7 @@ struct boot_sector { uint32_t VolumeID; char VolumeLabel[11]; char FileSysType[8]; - uint8_t Code[448]; + uint8_t Code[442]; } __attribute__ ((packed)) bs16; struct { uint32_t FATSz32; @@ -230,10 +232,12 @@ struct boot_sector { uint32_t VolumeID; char VolumeLabel[11]; char FileSysType[8]; - uint8_t Code[420]; + uint8_t Code[414]; } __attribute__ ((packed)) bs32; } __attribute__ ((packed)); + uint32_t bsMagic; + uint16_t bsForwardPtr; uint16_t bsSignature; } __attribute__ ((packed)); -- cgit v1.2.3