Bug 91719 - [pxeboot] BZ2_bzDecompress returned -3 error on loading bzipped kernel
Summary: [pxeboot] BZ2_bzDecompress returned -3 error on loading bzipped kernel
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-12 19:20 UTC by Ruben Kerkhof
Modified: 2017-12-09 18:34 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ruben Kerkhof 2006-01-12 19:20:06 UTC
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
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2006-02-21 21:44:22 UTC
Responsible Changed
From-To: freebsd-i386->freebsd-bugs

This does not sound i386-specific.
Comment 2 Björn König 2006-02-22 01:29:08 UTC
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
Comment 3 Björn König 2006-02-22 13:31:58 UTC
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