From owner-freebsd-current@FreeBSD.ORG Fri Jul 11 23:42:29 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF3C6ABA for ; Fri, 11 Jul 2014 23:42:29 +0000 (UTC) Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5E4C245B for ; Fri, 11 Jul 2014 23:42:29 +0000 (UTC) Received: from aurora.physics.berkeley.edu (aurora.Physics.Berkeley.EDU [128.32.117.67]) (authenticated bits=0) by c.mail.sonic.net (8.14.9/8.14.9) with ESMTP id s6BNgRst027615 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 11 Jul 2014 16:42:27 -0700 Message-ID: <53C07662.6060200@freebsd.org> Date: Fri, 11 Jul 2014 16:42:26 -0700 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: "Matthew D. Fuller" Subject: Re: Boot loader too large References: <201407111345.25225.jhb@freebsd.org> <53C06780.8010702@freebsd.org> <20140711225043.GH50976@over-yonder.net> In-Reply-To: <20140711225043.GH50976@over-yonder.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-ID: C;XEzsA1UJ5BGprU2zUc16mQ== M;zEEYBFUJ5BGprU2zUc16mQ== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd Cc: freebsd-current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jul 2014 23:42:29 -0000 On 07/11/14 15:50, Matthew D. Fuller wrote: > On Fri, Jul 11, 2014 at 03:38:56PM -0700 I heard the voice of > Nathan Whitehorn, and lo! it spake thus: >> I don't honestly remember where that number came from. It's at line >> 72 of usr.sbin/bsdinstall/partedit/partedit_x86.c. If 128 works >> better, I'm happy to change it, but it would be nice to know what >> the actual bounds here are before putting in a new arbitrary number. > src/sys/boot/i386/pmbr/pmbr.s says > > ------------- > next_boot:. incl (%si). . . # Next LBA > . . adcl $0,4(%si) > . . mov %es,%ax. . . # Adjust segment for next > . . addw $SECSIZE/16,%ax. . # sector > . . cmp $0x9000,%ax.. . # Don't load past 0x90000, > . . jae err_big. . . # 545k should be enough for > . . mov %ax,%es. . . # any boot code. :) > ------------- > > (err_big being printing the "Boot loader too large" message). Though > 0x90000 is actually 576k, not 545, but presumably there's some other > adjustment lopping off bits somewhere; that's 62 sectors diff. > > Regardless, I settled on 512k for my boot partitions (after finding > the above error when I previously decided "it's a few dozen k, I'll > just set aside a meg to be safe" and then discovered the whole > "not-booting" thing that caused. > > I bumped it to 512K. Thanks! -Nathan