From owner-freebsd-current@FreeBSD.ORG Fri Jul 11 22:59:21 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A533FACA; Fri, 11 Jul 2014 22:59:21 +0000 (UTC) Received: from thyme.infocus-llc.com (server.infocus-llc.com [206.156.254.44]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "*.infocus-llc.com", Issuer "*.infocus-llc.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7BD592052; Fri, 11 Jul 2014 22:59:20 +0000 (UTC) Received: from draco.over-yonder.net (c-75-65-60-66.hsd1.ms.comcast.net [75.65.60.66]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by thyme.infocus-llc.com (Postfix) with ESMTPSA id 6E72037B5AB; Fri, 11 Jul 2014 17:50:44 -0500 (CDT) Received: by draco.over-yonder.net (Postfix, from userid 100) id 3h98c36zKGz2qx; Fri, 11 Jul 2014 17:50:43 -0500 (CDT) Date: Fri, 11 Jul 2014 17:50:43 -0500 From: "Matthew D. Fuller" To: Nathan Whitehorn Subject: Re: Boot loader too large Message-ID: <20140711225043.GH50976@over-yonder.net> References: <201407111345.25225.jhb@freebsd.org> <53C06780.8010702@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53C06780.8010702@freebsd.org> X-Editor: vi X-OS: FreeBSD User-Agent: Mutt/1.5.23-fullermd.4 (2014-03-12) X-Virus-Scanned: clamav-milter 0.98.4 at thyme.infocus-llc.com X-Virus-Status: Clean 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 22:59:21 -0000 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. -- Matthew Fuller (MF4839) | fullermd@over-yonder.net Systems/Network Administrator | http://www.over-yonder.net/~fullermd/ On the Internet, nobody can hear you scream.