Can't boot on ZFS -- /boot/zfsloader not found
Jeremie Le Hen
jlh at freebsd.org
Thu Jan 12 21:12:24 UTC 2017
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 at 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 at FreeBSD.org
More information about the freebsd-stable
mailing list