]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[build] Pad .hd image type to 32 KB
authorStefan Hajnoczi <stefanha@gmail.com>
Tue, 15 Dec 2009 07:42:31 +0000 (07:42 +0000)
committerStefan Hajnoczi <stefanha@gmail.com>
Tue, 15 Dec 2009 20:22:04 +0000 (20:22 +0000)
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.

src/arch/i386/Makefile.pcbios

index d4044567c4be61694a5e2c181d29b14e96d9c3bf..ff5555938364bd91edf0039a2ccdae22c090e70c 100644 (file)
@@ -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