Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 May 2013 22:20:26 -0400
From:      Chris Ross <cross+freebsd@distal.com>
To:        Jeremy Chadwick <jdc@koitsu.org>
Cc:        "freebsd-stable@freebsd.org" <freebsd-stable@freebsd.org>
Subject:   Re: Reinstalling boot blocks on a ZFS-only system
Message-ID:  <28B5181C-E185-40E5-90EC-9600297BE590@distal.com>
In-Reply-To: <20130512205837.GA69605@icarus.home.lan>
References:  <A6940C2F-17B4-4ECF-85B6-BA8CB335486E@distal.com> <20130512205837.GA69605@icarus.home.lan>

next in thread | previous in thread | raw e-mail | index | archive | help

On May 12, 2013, at 16:58 , Jeremy Chadwick <jdc@koitsu.org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?28B5181C-E185-40E5-90EC-9600297BE590>