Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Jan 2017 22:12:22 +0100
From:      Jeremie Le Hen <jlh@freebsd.org>
To:        Steven Hartland <killing@multiplay.co.uk>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Can't boot on ZFS -- /boot/zfsloader not found
Message-ID:  <CAGSa5y0v2BhdbQ-WmbeZSXPKNzN6RUO8QynL2AiXP5ODWDCFQg@mail.gmail.com>
In-Reply-To: <e885ba54-397c-70f3-0748-0c0fcab8715c@multiplay.co.uk>
References:  <CAGSa5y12dKYF-sG5at7zeqttYnZHuSHcC0Zpn7rsekgeFCaRUg@mail.gmail.com> <e885ba54-397c-70f3-0748-0c0fcab8715c@multiplay.co.uk>

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

(Please cc: me on reply)

On Thu, Jan 12, 2017 at 1:32 AM, Steven Hartlan
> The reason I'd recommend 512k for boot is to provide room for expansion
> moving forward, as repartitioning to upgrade is a scary / hard thing to do.
> Remember it wasn't long ago when it was well under 64k and that's what was
> recommend, its not like with disk sizes these days you'll miss the extra
> 384k ;-)

Yeah, that's wise you're right.

> Boot to a live cd, I'd recommend mfsbsd, and make sure the boot loader was
> written to ALL boot disks correctly e.g.
> if you have a mirrored pool with ada0 and ada1:
> gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0
> gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0
>
> If this doesn't help the output from gpart show, uname -a and zpool status
> would also be helpful.
>
> This is all assuming standard BIOS mode and not UEFI which is done
> differently.

I just use the installation media on an USB key and then drop to the
shell.  This is a full FreeBSD running, so that's fine.

% # gpart show ada0
% =>       40  312581728  ada0  GPT  (149G)
%         40       1024     1  freebsd-boot  (512K)
%       1064    8387840     2  freebsd-swap  (4.0G)
%    8388904  304192864     3  freebsd-zfs  (145G)
%
% # uname -a
% FreeBSD  11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep
29 01:43:23 UTC 2016     % %
root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
%
% # zpool status
%  pool: zroot
% state: ONLINE
%  scan: none requested
% config:
%
%        NAME                                          STATE     READ
WRITE CKSUM
%        zroot                                         ONLINE       0
   0     0
%          gptid/1c387d3b-d892-11e6-944b-f44d30620eeb  ONLINE       0
   0     0
%
% errors: No known data errors

Here are the steps to write the bootloader:

% # gpart bootcode -b /boot/pmbr -p  /boot/gptzfsboot -i 1 ada0
% partcode written to ada0p1
% bootcode written to ada0
% # zpool get bootfs zroot
% NAME   PROPERTY  VALUE   SOURCE
% zroot  bootfs    zroot   local


-- 
Jeremie Le Hen
jlh@FreeBSD.org



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