From owner-freebsd-stable@FreeBSD.ORG Fri Dec 27 16:24:46 2013 Return-Path: Delivered-To: freebsd-stable@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 68BAD55B; Fri, 27 Dec 2013 16:24:46 +0000 (UTC) Received: from mail-vc0-x229.google.com (mail-vc0-x229.google.com [IPv6:2607:f8b0:400c:c03::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EB9571CA1; Fri, 27 Dec 2013 16:24:45 +0000 (UTC) Received: by mail-vc0-f169.google.com with SMTP id hu19so4961925vcb.28 for ; Fri, 27 Dec 2013 08:24:45 -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; bh=9zdIpjN9w1XgaXsOw+6fN+7OPJ8oRzCjyYZZ96ZHRfw=; b=bxTQiq6G8cHONrFYXQShy3zTwQIbwwe/3fNntp+e+zgU4HW9EJiIM7VKZhsNyZ97wu QGzZsilY7RM3NfKzTzg4aq3GsFrpOgcdDn2CCnhUs4OooZiLq0zw+4GSIJcvpVse/AbA s2DbdbpDXTwe5ahcxg6X8UiqoT3X+AgFk7VdY++shkwC8N328VmyN1m7/cc2QJPZo9z4 jbx0Oc3eMi0TdycGu48cBK3B1K2618umv6uopbDap2z0V9iyp5cXKEheTinT9jSkQm7B HH5TlA0LyWi65jaEYxxnA+evZpmLnR8L4ns3SfjkbgJTn5yWbfdzXuXp7WuPVhiZk5+e Ee6g== MIME-Version: 1.0 X-Received: by 10.52.135.201 with SMTP id pu9mr22391567vdb.13.1388161484958; Fri, 27 Dec 2013 08:24:44 -0800 (PST) Received: by 10.58.165.2 with HTTP; Fri, 27 Dec 2013 08:24:44 -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:24:44 -0500 Message-ID: Subject: Re: FreeBSD 10.0-RC3 Now Available From: Thomas Hoffmann To: Warren Block Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: Mathieu Arnold , 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:24:46 -0000 After I posted, it occurred to me to check out the ../bsdinstall/scripts/zfsboot script to see how the boot code was laid down when the MBR was created. It shows only: dd if=3D/boot/zfsboot of=3D/dev/ada0s1 count =3D1 But, adding to my confusion, the FreeBSD wiki for ZFS on root (MBR-style) shows something very close to what Mathieu suggested. Unfortunately, I'm using an iMac with FreeBSD as the only OS. MBR is the only way I can get it to boot after an install. Looks like I've got some testing (and possible system restores) ahead of me= . Thanks. On Fri, Dec 27, 2013 at 11: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.