mirror of
https://github.com/xcat2/xNBA.git
synced 2024-11-22 17:41:55 +00:00
xCAT Network Boot Agent
b149a99302
The zbin compressor fixup utility rounds down file sizes before calculating their difference. This produces incorrect values and may cause truncated gPXE images to be loaded at boot. The following example explains the problem: ilen = 48 bytes (uncompressed input file) olen = 17 bytes (compressed output file) divisor = 16 bytes (paragraph granularity) fixmeup = 3 paragraphs (value to fix up) olen / divisor - ilen / divisor = 1 - 3 = -2 paragraphs (old delta calculation) ( align ( olen, divisor ) - align ( ilen, divisor ) ) / divisor = 2 - 3 = -1 paragraphs (new delta calculation) If we perform the SUBx operation with old delta: fixmeup + -2 = 1 paragraph gets loaded by the prefix With the new delta: fixmeup + -1 = 2 paragraphs get loaded by the prefix The old delta calculation removes the last paragraph; the prefix will load a truncated copy of gPXE into memory. We need to load 2 paragraphs since olen is 17 bytes. Loading only 1 paragraph (16 bytes) would truncate the last byte. Signed-off-by: Michael Brown <mcb30@etherboot.org> |
||
---|---|---|
contrib | ||
src | ||
COPYING | ||
COPYRIGHTS | ||
LOG | ||
README |
gPXE README File gPXE is an implementation of the PXE specification for network booting, with extensions to allow additional features such as booting via HTTP, iSCSI, and AoE. In generally, gPXE is compatible with the industry-standard PXE specification, and also supports Etherboot .nbi file loading and some additional protocols and features. For more detailed information about gPXE, please visit our project website at: http://etherboot.org/ BUILDING gPXE IMAGE FROM SOURCE If you don't want to install development tools, and have access to the Web, you can get gPXE and Etherboot ROM images made on demand from http://rom-o-matic.net/ If you would like to compile gPXE images from source, here are some tips. We normally compile gPXE images on x86, 32-bit Linux machines. It is possible to also use x86-64 machines. We use gcc compiler options to create 32-bit output. It is important to have the necessary software packages installed. A gcc-based toolchain is required. The following packages (at least) are required: - a gcc tool chain (gcc 3.x or gcc 4.x) - binutils - perl - syslinux - mtools To test your environment, cd to the "src" directory and type: make You should see a lot of output, and when it stops, the "bin" directory should be populated with gPXE images and object files. To learn more about what to build and how to use gPXE, please visit our project website at http://etherboot.org/ , particularly the "howto" section. CONTACTING US Pointers to our project mailing lists are on http://etherboot.org/ Real-time help is often available on IRC on the #etherboot channel of irc.freenode.net.