From owner-freebsd-stable@FreeBSD.ORG Sun May 12 20:58:39 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 463363C5 for ; Sun, 12 May 2013 20:58:39 +0000 (UTC) (envelope-from jdc@koitsu.org) Received: from qmta03.emeryville.ca.mail.comcast.net (qmta03.emeryville.ca.mail.comcast.net [IPv6:2001:558:fe2d:43:76:96:30:32]) by mx1.freebsd.org (Postfix) with ESMTP id 182A1E91 for ; Sun, 12 May 2013 20:58:39 +0000 (UTC) Received: from omta07.emeryville.ca.mail.comcast.net ([76.96.30.59]) by qmta03.emeryville.ca.mail.comcast.net with comcast id b8q51l0031GXsucA38yeAL; Sun, 12 May 2013 20:58:38 +0000 Received: from koitsu.strangled.net ([67.180.84.87]) by omta07.emeryville.ca.mail.comcast.net with comcast id b8yd1l00Z1t3BNj8U8yesx; Sun, 12 May 2013 20:58:38 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id A73EB73A33; Sun, 12 May 2013 13:58:37 -0700 (PDT) Date: Sun, 12 May 2013 13:58:37 -0700 From: Jeremy Chadwick To: Chris Ross Subject: Re: Reinstalling boot blocks on a ZFS-only system Message-ID: <20130512205837.GA69605@icarus.home.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1368392318; bh=MJiOrHDkYDNOtV65PuBN66ThEC1AcewHvriyC/m6z6Y=; h=Received:Received:Received:Date:From:To:Subject:Message-ID: MIME-Version:Content-Type; b=FBXmEZW6d9sSwsYv1qQcVeDcvYBVdMltXa26PXaYOCajUbLqFQd/sSL9v6mqfWIFq 1118uX9G2D33Zq9hVlpMLSVlSE23TRoWruI5ScFIXiEQxsg2qF99gRbEp4Hfm4MgY+ LN/uGJI06adQYM1P+wYX7exWj+hR9/1IrJ2WlCBRgpRIvFQWClGE1UNWBNnLaQgJ49 nx00FNLAc4802w16wO2BmNNdeWBWcJuXMRQbEwS1DvtzWbky/mtnpOLmYsvFQrNdLq +AAMjZ1tljQvnCpBY+4aigOsz7Qw2UHeFDewWrKFaNmudvs77KOuB1rVQ0+Bny9o4L 7OtbbJuGx1UzQ== 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: Sun, 12 May 2013 20:58:39 -0000 On Sun, May 12, 2013 at 04:50:46PM -0400, Chris Ross wrote: > > So, I've long known and it makes sense that when you're booted from a ZFS volume, you can't mess with the boot-loader. And, I know a few months ago I had a set of commands I would use when booted from a CD that would initialize the network and copy the "release/boot" from somewhere else so that I could install bootblocks and boot-loaders from more recent code. Sadly, I didn't _record_ those commands I was using. > > What do "people in the know" do when they want to update the bootblocks of a ZFS-boot system? Or, have too few people followed this path so far that they can boot UFS and do it with less difficulty? 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". Next, AFAIK there is no need to boot alternate media (CD etc.) to accomplish this. You may also need to set kern.geom.debugflags=0x10 to inhibit GEOM's "safety measure" / to permit writing to LBA 0; see GEOM(4) and search for the word "foot". -- | Jeremy Chadwick jdc@koitsu.org | | UNIX Systems Administrator http://jdc.koitsu.org/ | | Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB |