From owner-freebsd-current@FreeBSD.ORG Tue Jan 31 18:21:12 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 13CEC16A420 for ; Tue, 31 Jan 2006 18:21:12 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 85AAB43D5E for ; Tue, 31 Jan 2006 18:21:10 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.12.11) with ESMTP id k0VIL2ju057605; Tue, 31 Jan 2006 10:21:02 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id k0VIL2IL057604; Tue, 31 Jan 2006 10:21:02 -0800 (PST) (envelope-from rizzo) Date: Tue, 31 Jan 2006 10:21:02 -0800 From: Luigi Rizzo To: "M. Warner Losh" Message-ID: <20060131102102.B57192@xorpc.icir.org> References: <20060131061812.A53329@xorpc.icir.org> <43DF77B7.4050800@samsco.org> <20060131.085804.96587431.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20060131.085804.96587431.imp@bsdimp.com>; from imp@bsdimp.com on Tue, Jan 31, 2006 at 08:58:04AM -0700 Cc: current@freebsd.org Subject: Re: boot block differences between 4.x and 6.x ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 31 Jan 2006 18:21:12 -0000 On Tue, Jan 31, 2006 at 08:58:04AM -0700, M. Warner Losh wrote: ... > : The big difference is that the boot blocks grew significantly to > : support UFS2. > > And boot1/boot2 were merged into boot... ok problem solved, thanks for the pointers. For the records (and the list archives): the old-style picobsd script would do image[0..511] = boot1[0..511] image[1024..8191] = boot2[512..7679] counting on a 512-bytes hole which is taken, for the first 0x114 = 276 (dec) bytes by the label. The new boot blocks, however have code immediately after the label so the offset for copying boot2 (or the equivalent part of /boot/boot) must be set to 276 on the source and 276+512 = 788 on the destination: image[0..511] = boot1[0..511] image[788..8191] = boot2[276..7679] don't know how much of a hack it is to hardwire the disklabel size into the script, but given that this approach of explicit constants is used in all the related pieces of code, i guess there is no better way around... cheers luigi