From owner-freebsd-current@FreeBSD.ORG Fri Dec 27 17:15:10 2013 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 55BA9D6E; Fri, 27 Dec 2013 17:15:10 +0000 (UTC) Received: from mail-ig0-x22c.google.com (mail-ig0-x22c.google.com [IPv6:2607:f8b0:4001:c05::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0A24A1FAF; Fri, 27 Dec 2013 17:15:10 +0000 (UTC) Received: by mail-ig0-f172.google.com with SMTP id hl1so30345861igb.5 for ; Fri, 27 Dec 2013 09:15:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=OYWlPJd+epMrLpmmvI1+fc8Uo6kLs0K0e+bU+gFFSiQ=; b=bsk49aupNOQR74+P8Hd2BDgFHBwZ+Pq+0rPDZ9cojrsR3DtyfYvTQ+uYYG837M0Mh8 +Wr5x68CoevGS3ye9WdY4lBNSLDe7TNcB1N3Mz2+Up4XkjMwn1frcYkMi6dgVjYUe0iW IDpt3p3aZOOFcP9d1S9DQEt3nJ4P924bxJKP8N/xUm3Qn59xA9l2B5sPRx87ljhsXxrX rJb4VOMKKMoKK504iFBpmjHD6neNuzG21IdE+Kvs3toSl9SRhd2LQwX2b2Ui+p9FFPrI gfkV5Zt3gQVQMelNiGBJSn0z2iyG7WB+dkfudL7oPR+9kkn5g9CKye0r5THS33HRMnyi jVKw== MIME-Version: 1.0 X-Received: by 10.50.6.99 with SMTP id z3mr41744676igz.27.1388164509432; Fri, 27 Dec 2013 09:15:09 -0800 (PST) Received: by 10.50.127.232 with HTTP; Fri, 27 Dec 2013 09:15:09 -0800 (PST) In-Reply-To: References: <20131226162521.GK2009@glenbarber.us> <20131226212158.GD13109@glenbarber.us> <2F6DABD655B7C3230EC0F15D@ogg.in.absolight.net> <38B0C411B75D7482B92033D2@ogg.in.absolight.net> Date: Fri, 27 Dec 2013 11:15:09 -0600 Message-ID: Subject: Re: FreeBSD 10.0-RC3 Now Available From: Scot Hetzel To: Warren Block Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Mathieu Arnold , Thomas Hoffmann , FreeBSD Stable , freebsd-current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 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, 27 Dec 2013 17:15:10 -0000 On Fri, Dec 27, 2013 at 10:08 AM, Warren Block wrote: > On Fri, 27 Dec 2013, Mathieu Arnold wrote: > >> +--On 27 d=E9cembre 2013 10:28:07 -0500 Thomas Hoffmann >> wrote: >> | All the examples I've seen for updating bootcode assume GPT. If one ha= s >> | MBR (as I do) and assuming the following basic scheme: >> | >> | gpart show ada0 >> | =3D> 63 976773105 ada0 MBR (466G) >> | 63 976773105 1 freebsd [active] (466G) >> | >> | gpart show ada0s1 >> | =3D> 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) an= d >> | 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 bootcod= e > correctly. > > >> you have to >> do something aweful like this : >> # dd if=3D/boot/zfsboot of=3D/dev/ada0 count=3D1 > > > That will overwrite the MBR partition table. > > >> # sysctl kern.geom.debugflags=3D0x10 >> # dd if=3D/boot/zfsboot of=3D/dev/ada0 skip=3D1 seek=3D1024 > > > 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. > The correct way to install/update ZFS Boot code on an MBR disk is: Install boot Manager (required on first install) # gpart bootcode -b /boot/boot0 ad0 Note: /boot/mbr could also be used if you are not multibooting Install ZFS boot1 stage # sysctl kern.geom.debugflags=3D0x10 # dd if=3D/boot/zfsboot of=3D/dev/ada0s1 count=3D1 or # dd if=3D/boot/zfsboot of=3D/tmp/zfsboot1 count=3D1 # gpart bootcode -b /tmp/zfsboot1 /dev/ada0s1 Install ZFS boot2 stage # dd if=3D/boot/zfsboot of=3D/dev/ada0s1a skip=3D1 seek=3D1024 --=20 DISCLAIMER: No electrons were maimed while sending this message. Only slightly bruised.