From owner-freebsd-stable@FreeBSD.ORG Fri Dec 27 16:08:11 2013 Return-Path: Delivered-To: freebsd-stable@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 72A3485B; Fri, 27 Dec 2013 16:08:11 +0000 (UTC) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 01FBC1A14; Fri, 27 Dec 2013 16:08:10 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.7/8.14.7) with ESMTP id rBRG89b4032430; Fri, 27 Dec 2013 09:08:09 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.7/8.14.7/Submit) with ESMTP id rBRG88im032427; Fri, 27 Dec 2013 09:08:08 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Fri, 27 Dec 2013 09:08:08 -0700 (MST) From: Warren Block To: Mathieu Arnold Subject: Re: FreeBSD 10.0-RC3 Now Available In-Reply-To: <38B0C411B75D7482B92033D2@ogg.in.absolight.net> Message-ID: References: <20131226162521.GK2009@glenbarber.us> <20131226212158.GD13109@glenbarber.us> <2F6DABD655B7C3230EC0F15D@ogg.in.absolight.net> <38B0C411B75D7482B92033D2@ogg.in.absolight.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Fri, 27 Dec 2013 09:08:09 -0700 (MST) Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: Thomas Hoffmann , freebsd-stable@freebsd.org, freebsd-current X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 16:08:11 -0000 On Fri, 27 Dec 2013, Mathieu Arnold wrote: > +--On 27 décembre 2013 10:28:07 -0500 Thomas Hoffmann > wrote: > | All the examples I've seen for updating bootcode assume GPT. If one has > | MBR (as I do) and assuming the following basic scheme: > | > | gpart show ada0 > | => 63 976773105 ada0 MBR (466G) > | 63 976773105 1 freebsd [active] (466G) > | > | gpart show ada0s1 > | => 0 976773105 ada0s1 BSD (466G) > | 0 943218736 1 freebsd-zfs (450G) > | 943218736 33554369 2 freebsd-swap (16G) > | > | would the equivalent bootcode statement be: > | > | gpart bootcode -b /boot/pmbr -p /boot/zfsboot ada0s1 No, the PMBR is for GPT partitioning only. > | where the boot code is /boot/zfsboot (rather than /boot/gptzfsboot) and > | ada0s1 is the slice on which FreeBSD is installed? > > Hum, no, if you're using MBR and not GPT, you can't use gpart, Why not? gpart is not GPT-specific. It handles MBR and BSDlabel bootcode correctly. > you have to > do something aweful like this : > # dd if=/boot/zfsboot of=/dev/ada0 count=1 That will overwrite the MBR partition table. > # sysctl kern.geom.debugflags=0x10 > # dd if=/boot/zfsboot of=/dev/ada0 skip=1 seek=1024 That seems dangerous. I have not tried with zfsboot, but this should be close: # gpart bootcode -b /boot/zfsboot ada0 # gpart bootcode -b /boot/zfsboot ada0s1 Untested! The first one may need to use /boot/mbr. A better way to do this, provided the system does not have a broken BIOS, would be to backup, repartition with GPT, and restore, avoiding the complication of multiple partitioning schemes. From owner-freebsd-stable@FreeBSD.ORG Fri Dec 27 16:17:22 2013 Return-Path: Delivered-To: freebsd-stable@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 9251ADBE; Fri, 27 Dec 2013 16:17:22 +0000 (UTC) Received: from thyme.infocus-llc.com (server.infocus-llc.com [206.156.254.44]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 62F561ABC; Fri, 27 Dec 2013 16:17:21 +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-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by thyme.infocus-llc.com (Postfix) with ESMTPSA id 4907D37B596; Fri, 27 Dec 2013 10:17:15 -0600 (CST) Received: by draco.over-yonder.net (Postfix, from userid 100) id 3drY8V5S82zKfJ; Fri, 27 Dec 2013 10:17:14 -0600 (CST) Date: Fri, 27 Dec 2013 10:17:14 -0600 From: "Matthew D. Fuller" To: Mathieu Arnold Subject: Re: FreeBSD 10.0-RC3 Now Available Message-ID: <20131227161714.GF99219@over-yonder.net> References: <20131226162521.GK2009@glenbarber.us> <20131226212158.GD13109@glenbarber.us> <2F6DABD655B7C3230EC0F15D@ogg.in.absolight.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2F6DABD655B7C3230EC0F15D@ogg.in.absolight.net> X-Editor: vi X-OS: FreeBSD User-Agent: Mutt/1.5.22 (2013-10-16) X-Virus-Scanned: clamav-milter 0.98 at thyme.infocus-llc.com X-Virus-Status: Clean Cc: Zenny , freebsd-current , freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 16:17:22 -0000 On Fri, Dec 27, 2013 at 03:33:23PM +0100 I heard the voice of Mathieu Arnold, and lo! it spake thus: > > All you have to do is adapt it to run your particular setup, > replacing da0 with the correct disk (and running it for each disk > where your pool is, in my case, it was mfid0 and mfid1.) I've taken to just dumping a rewrite-bootcode.sh script in /boot/ on systems. That way I don't have to remember or re-figure the invocation, or worry about typos, or whatnot. Makes it easy to just kick the script after every installworld whether I really need it or not, without having to think about it. e.g., % cat /boot/rewrite-bootcode.sh #!/bin/sh -x for i in /dev/ada0 /dev/ada1; do gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ${i} done -- Matthew Fuller (MF4839) | fullermd@over-yonder.net Systems/Network Administrator | http://www.over-yonder.net/~fullermd/ On the Internet, nobody can hear you scream.