Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 May 2013 13:58:37 -0700
From:      Jeremy Chadwick <jdc@koitsu.org>
To:        Chris Ross <cross+freebsd@distal.com>
Cc:        "freebsd-stable@freebsd.org" <freebsd-stable@freebsd.org>
Subject:   Re: Reinstalling boot blocks on a ZFS-only system
Message-ID:  <20130512205837.GA69605@icarus.home.lan>
In-Reply-To: <A6940C2F-17B4-4ECF-85B6-BA8CB335486E@distal.com>
References:  <A6940C2F-17B4-4ECF-85B6-BA8CB335486E@distal.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 |



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130512205837.GA69605>