From owner-freebsd-geom@FreeBSD.ORG Thu Feb 26 17:54:39 2009 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74EDC106564A; Thu, 26 Feb 2009 17:54:39 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout014.mac.com (asmtpout014.mac.com [17.148.16.89]) by mx1.freebsd.org (Postfix) with ESMTP id 613968FC1C; Thu, 26 Feb 2009 17:54:39 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from sutapab-t61.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp014.mac.com (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug 7 2008; 32bit)) with ESMTPSA id <0KFO00LLTMYINY50@asmtp014.mac.com>; Thu, 26 Feb 2009 08:54:19 -0800 (PST) Message-id: From: Marcel Moolenaar To: Andriy Gapon In-reply-to: <49A6C33E.70402@freebsd.org> Date: Thu, 26 Feb 2009 08:54:18 -0800 References: <4978C24D.9040706@icyb.net.ua> <49A6C33E.70402@freebsd.org> X-Mailer: Apple Mail (2.930.3) Cc: freebsd-geom@freebsd.org Subject: Re: gpart bootcode and /boot/boot X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Feb 2009 17:54:39 -0000 On Feb 26, 2009, at 8:28 AM, Andriy Gapon wrote: > on 22/01/2009 21:00 Andriy Gapon said the following: >> Sorry for being lazy - what is "gpart bootcode" equivalent of >> bsdlabel >> -B [-b boot] ? >> > > Marcel, guys, I am still curious. > > disklabel -B refuses do to anything because of what it thinks is > incorrect > partition info. > > And the following command gets "Operation not permitted" when it > opens ad6s1 for > writing: > gpart bootcode -p /boot/boot -i 1 ad6 Don't you mean "gpart bootcode -b /boot/boot ad6s1" If you say "-i 1 ad6", then what you want is bootcode in a partition that is controlled by the scheme on ad6 (the scheme on ad6 is the MBR). You can't do that, because that partition is sub-partitioned by the BSD scheme. Since you want bootcode in the BSD scheme, you need to add bootcode to ad6s1. > > This is amd64, stable/7, gpart-only kernel (gpart_mbr, gpart_bsd). Bootcode for the BSD scheme is not present in 7-STABLE yet. I just recently added that to -CURRENT (I must have missed it) and I need to get around MFCing it. Feel free to do the MFC for me. The code has been in -CURRENT long enough to do a MFC. FYI, -- Marcel Moolenaar xcllnt@mac.com