If pxeboot loads a bzipped kernel, it errors with: bzf_read: BZ2_bzDecompress returned -3 Unable to load a kernel! \ Can't load 'kernel' How-To-Repeat: Recompile the bootloader for bzip2 support: # cd /usr/src/sys/boot # make -DLOADER_BZIP2_SUPPORT -DLOADER_TFTP_SUPPORT copy pxeloader to tftp root # cp i386/pxeldr/pxeboot /usr/tftpboot boot the client
Responsible Changed From-To: freebsd-i386->freebsd-bugs This does not sound i386-specific.
I had the same problem. Error -3 is BZ_MEM_ERROR and means that a memory allocation failed. I did further investigations and found out that it almost works if you pass the flag -1 to bzip2 command line utility. In this case the decompression routine needs only 250k instead of 2250k with -9 (default) according to bzip2(1); but it seems like that you still run into other memory related problems. The loader says: Can't work out which disk we are booting from. Guessed BIOS device 0xffffffff not found by probes, defaulting to disk0: panic: free: guard1 fail @ 0x36c54 from /usr/src/sys/boot/i386/loader/../../common/module.c:957 --> Press a key on the console to reboot <-- Björn
I slimmed the loader by removing some fs_ops from src/sys/boot/i386/loader/conf.c that are unnecessary for pxeboot and disabled Forth support. Under these preconditions there will be finally enough memory available to decompress a "bzip2 -1"-compressed kernel. However this might be a i386-specific problem nevertheless. I'm not aware of other architectures, but it could be that this memory related problem concerns i386 only due to architecture conditioned restrictions. Björn