From owner-freebsd-stable@FreeBSD.ORG Mon May 13 02:20:29 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 04025C4B for ; Mon, 13 May 2013 02:20:29 +0000 (UTC) (envelope-from cross+freebsd@distal.com) Received: from mail.distal.com (mail.distal.com [IPv6:2001:470:e24c:200::ae25]) by mx1.freebsd.org (Postfix) with ESMTP id BBEA6DEA for ; Mon, 13 May 2013 02:20:28 +0000 (UTC) Received: from magrathea.distal.com (magrathea.distal.com [IPv6:2001:470:e24c:200:ea06:88ff:feca:960e]) (authenticated bits=0) by mail.distal.com (8.14.3/8.14.3) with ESMTP id r4D2KQoI010397 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 12 May 2013 22:20:27 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: Reinstalling boot blocks on a ZFS-only system From: Chris Ross In-Reply-To: <20130512205837.GA69605@icarus.home.lan> Date: Sun, 12 May 2013 22:20:26 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <28B5181C-E185-40E5-90EC-9600297BE590@distal.com> References: <20130512205837.GA69605@icarus.home.lan> To: Jeremy Chadwick X-Mailer: Apple Mail (2.1503) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.2 (mail.distal.com [IPv6:2001:470:e24c:200::ae25]); Sun, 12 May 2013 22:20:27 -0400 (EDT) Cc: "freebsd-stable@freebsd.org" X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 May 2013 02:20:29 -0000 On May 12, 2013, at 16:58 , Jeremy Chadwick wrote: > The command is "gpart bootcode", however I cannot be bothered to > remember the syntax; I imagine it greatly depends on if you're using = GPT > vs. MBR, in addition to what your partition layout look like. = Meaning: > there is no "universal standard", it depends entirely on how you set > your stuff up. But the command is definitely "gpart bootcode". >=20 > Next, AFAIK there is no need to boot alternate media (CD etc.) to > accomplish this. >=20 > You may also need to set kern.geom.debugflags=3D0x10 to inhibit GEOM's > "safety measure" / to permit writing to LBA 0; see GEOM(4) and search > for the word "foot". In the past, I've found I've been unable to install all of the = bootblocks if I boot from the ZFS root. When booting from a cd, the basic: gpart bootcode -p ${bootdir}/zfsboot ${disk} dd if=3D${bootdir}zfsloader of=3D/dev/${disk}a bs=3D512 = oseek=3D1024 conv=3Dnotrunc,sync works. But, if I boot from ZFS, then I can't dd anything into the front = of the=20 drives. Right now, the problem after booting from the CD, is trying to = mount a read/write filesystem (mfs, or the like) so that I can scp the = bootblocks onto the system and install them. BUt, I eventually found the command I'd lost. = so I=20 think I'm alright. Thanks... - Chris