summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Hajnoczi2009-12-15 08:42:31 +0100
committerStefan Hajnoczi2009-12-15 21:22:04 +0100
commit9760005fe861af75b7693f1020186ea60ba8e467 (patch)
treebd8a1e4c2d8b3fbc1689904a763c7bc0d446e102
parent[multiboot] Build memory map after shutting down and unhiding gPXE (diff)
downloadipxe-9760005fe861af75b7693f1020186ea60ba8e467.tar.gz
ipxe-9760005fe861af75b7693f1020186ea60ba8e467.tar.xz
ipxe-9760005fe861af75b7693f1020186ea60ba8e467.zip
[build] Pad .hd image type to 32 KB
The disk partition prefix code in hdprefix.S reads the gPXE image in tracks, not individual sectors. This means it will attempt to read beyond the end of the image if the .hd image type is not padded to 32 KB. This issue is affects virtualization software which may execute a .hd or .usb image file directly - effectively running a machine with a tiny disk containing just the gPXE image. Boot will fail when gPXE tries to read beyond the end of disk.
-rw-r--r--src/arch/i386/Makefile.pcbios2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/i386/Makefile.pcbios b/src/arch/i386/Makefile.pcbios
index d4044567..ff555593 100644
--- a/src/arch/i386/Makefile.pcbios
+++ b/src/arch/i386/Makefile.pcbios
@@ -31,7 +31,7 @@ MEDIA += exe
#
PAD_rom = $(PADIMG) --blksize=512 --byte=0xff $@
PAD_dsk = $(PADIMG) --blksize=512 $@
-PAD_hd = $(PADIMG) --blksize=512 $@
+PAD_hd = $(PADIMG) --blksize=32768 $@
# rule to make a non-emulation ISO boot image
NON_AUTO_MEDIA += iso