From nobody@FreeBSD.org  Thu Jan 12 19:13:18 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8CE3616A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 12 Jan 2006 19:13:18 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5816643D70
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 12 Jan 2006 19:13:13 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k0CJDDpr058874
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 12 Jan 2006 19:13:13 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k0CJDDRF058873;
	Thu, 12 Jan 2006 19:13:13 GMT
	(envelope-from nobody)
Message-Id: <200601121913.k0CJDDRF058873@www.freebsd.org>
Date: Thu, 12 Jan 2006 19:13:13 GMT
From: Ruben Kerkhof <ruben.kerkhof@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: BZ2_bzDecompress returned -3 error on loading bzipped kernel
X-Send-Pr-Version: www-2.3

>Number:         91719
>Category:       kern
>Synopsis:       [pxeboot] BZ2_bzDecompress returned -3 error on loading bzipped kernel
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 12 19:20:06 GMT 2006
>Closed-Date:    
>Last-Modified:  Thu May 01 05:53:43 UTC 2008
>Originator:     Ruben Kerkhof
>Release:        6.0.
>Organization:
>Environment:
FreeBSD 6.0-RELEASE
>Description:
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

>Fix:
              
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-i386->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Feb 21 21:44:22 UTC 2006 
Responsible-Changed-Why:  
This does not sound i386-specific. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=91719 

From: =?ISO-8859-15?Q?Bj=F6rn_K=F6nig?= <bkoenig@cs.tu-berlin.de>
To: bug-followup@FreeBSD.org,  ruben.kerkhof@gmail.com
Cc:  
Subject: Re: misc/91719: BZ2_bzDecompress returned -3 error on loading bzipped
 kernel
Date: Wed, 22 Feb 2006 02:29:08 +0100

 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 <--
 
 
 
 
 Bjrn

From: =?ISO-8859-15?Q?Bj=F6rn_K=F6nig?= <bkoenig@cs.tu-berlin.de>
To: bug-followup@FreeBSD.org,  linimon@freebsd.org, 
 ruben.kerkhof@gmail.com
Cc:  
Subject: Re: misc/91719: BZ2_bzDecompress returned -3 error on loading bzipped
 kernel
Date: Wed, 22 Feb 2006 14:31:58 +0100

 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.
 
 Bjrn
>Unformatted:
